imesh_testF fails when pathname is too long
Found a little problem trying out spack in imoab_testF.F:
filename = MESHDIR2//fname
where MESHDIR2 is defined in the make command (-DMESHDIR2=/path/to/meshdir) spack uses really long names, this macro replacement makes the line too long:
-DMESHDIR2=\"/sandbox/sarich/spack/var/spack/stage/moab-tempest_new_api-ezr5t55pqpld5sz4srffqroaupl4rgvz/moab/MeshFiles/unittest\"
imoab_testF.F:92:18:
filename = MESHDIR2//fname
1
Error: Unterminated character constant beginning at (1)
Comments (7)
-
-
Ah, we have seen this before. @iulian07
I'm unaware of how to pass command line arguments cleanly to fortran. Thoughts ? We should see if we can create a wrapper to our ProgOptions class somehow.
-
reporter F77 doesn't have a portable way to get arguments, each compiler can do it's own thing. Another option would be to write the pathname to a file.
-
Did we fix this ?
-
we did not fix this yet
-
@iulian07 I know we run into this problem also on Bebop. Do we have a resolution ?
-
no, we do not have a fix, I think we will have to write file name to another file, and read it from there, to support out of source builds and bebop compiler
- Log in to comment
yes, thanks; I think the only solution is to read the name of the file at runtime; in Fortran 77, we cannot exceed 72 characters in one line, and the file name plus path will be longer than that. Is there another solution? The filename should be input to the test, and it resides in the repo. What is the best solution ? Or should we switch the test to fortran 90?