wimvanderbauwhede / RefactorF4Acc

An Automated Fortran Code Refactoring Tool to Facilitate Acceleration of Numerical Simulations
Other
57 stars 9 forks source link

Issues with uninitialsed variable in perl #21

Open nwalet opened 1 year ago

nwalet commented 1 year ago

Use of uninitialized value $mtype in string ne at xxx/RefactorF4Acc/RefactorF4Acc/Parser.pm line 2862. Will see whether this is understandable, but not sure what causes this...

wimvanderbauwhede commented 1 year ago

Thanks for reporting this issue. Could you share the code that causes this error? I have not worked on the codebase for a long time but happen to be working on it at the moment.

nwalet commented 1 year ago

I can--Howevere, I have added a small test to your code, that showed me what was happening (just above line 2682 of Parser.pm) if (not defined $mtype) { say "var=$var has no type" } Which showed this was caused by an "INCLUDE" that was not resolved--this annoying code uses includes for the parameters used, which seems to cause this failure. I think the error message I generated was quite helpful.

wimvanderbauwhede commented 1 year ago

Thanks a lot! But the compiler should resolve includes, so there is definitely something wrong there. Is this include in the same folder (or in a subfolder) as the main code? Otherwise it needs an explicit path in the config file.

wimvanderbauwhede commented 10 months ago

@nwalet I have done a new release, maybe that will work better for you.