I am working with code that has the following structure:
I compile abc1.F90 and get abc.mod
I compile compA.F90 and get compa.mod
So far so good.
Now I compile the actual program:
And I get “PGF90-F-0004-Unable to open MODULE file abc.mod (abc1.F90: 10)”
I can solve the issue by specifying an additional -I option to point to the directory where abc.mod is located when compiling prog.F90. However, I don’t understand why this needs to be done. Why does the compilation of prog.F90 depend on having access to abc.mod? After all, I already compiled compA.F90.
The associated bigger issue here is that say I have compB.F90 that depends on its version of abc.mod (like from a abc2.F90 file). How could prog.F90 use both compA and compB and not get confused?
Is the answer that the Fortran standard simply does not support the case I am describing, and other compilers that do support it are doing this outside the standard’s restrictions?
Thank you for any insight you might provide on this!