Closed victorsndvg closed 9 years ago
Hi victor, I am sorry, but I am out of office for 2 weeks, thus I cannot check the details of the bug. It seems really a bug and your patch is nice, please make a pull request thus I can easily accept it to fix the bug, with my smartphone/tablet I can only interact by means of github :-(
Added the workaround.
Hi Stefano,
we believe that we detected a BUG in FLAP. It is related to the management of (not required) varying size command-line parameters with a specified default value. In particular, the BUG is revealed whenever no value is specified thorough the command line. The code snippet (see the gist link) reproduces the BUG. When executing the program with no arguments, then the following error from the runtime system is obtained (We used the Intel compiler version 15.0.2.):
forrtl: severe (408): fort: (7): Attempt to use pointer VAL when it is not associated with a target
You can find the test program we have used in the following gist link: https://gist.github.com/victorsndvg/39b86ab888fec8d27bbd#file-test_flap_varying_size-f90
I think that the problem is that cla%val is not allocated at the following line: https://github.com/szaghi/FLAP/blob/master/src/Data_Type_Command_Line_Interface.F90#L1093
A workaround that we are using is to add:
inside the add subroutine at the following line: https://github.com/szaghi/FLAP/blob/master/src/Data_Type_Command_Line_Interface.F90#L2317
What do you think?
Best regards, Víctor.