fortpy
fortpy copied to clipboard
Formatting error in file names in fpy_get_drange
When trying to read in an array of a user defined type fortpy uses fpy_get_drange to determine how large the array needs to be so it can be allocated. At present the code looks for files that look like:
get_rotation_perms_lists_RPlist.in.1/-1-v
to determine the size of the arrays. However aux_save creates files that look like:
get_rotation_perms_lists_RPlist.in.1/_-1-v
This discrepancy prevents the array from being allocated properly causing a segfault.
Turns out this is happening because the file prefix being handed to fpy_get_drange is wrong:
call fpy_get_drange(drange, folder//'-', (/ 'RotIndx', 'perm ', 'v ' /))
should be:
call fpy_get_drange(drange, folder//'_-', (/ 'RotIndx', 'perm ', 'v ' /))
Making this correction in fpy_auxilary.f90 corrects the segfault, however this means somehow the condition needs to be corrected in the routine that constructs fpy_auxilary.f90.