Indirect Fortran module dependencies

Questions on using the PGI Compilers and Tools
Posts: 8258
Joined: Jun 30 2004

Re: Indirect Fortran module dependencies

Post by mkcolg » Mon Sep 09, 2019 8:12 am

Thanks Gerhard.

I was able to reproduce the error here and have added an issue report (TPR#27597). We'll have our compiler engineers take a look and see if we can improve this.

In the meantime, I would suggest using the "-module <mod_dir>" flag so all the generated modules are saved in the same directory and thus eliminate the need to have multiple include directories.


Posts: 4
Joined: Sep 06 2019

Re: Indirect Fortran module dependencies

Post by gjt » Mon Sep 09, 2019 9:53 am

Thank you Mat for the TPR. I will be looking forward to seeing what the compiler folks think about this.

Again, the bigger issue is that for a real application the prog.F90 level wants to use a CompA and CompB module, each of which is using a different module named ABC underneath.

In the even bigger picture I might not even know all the modules CompA and CompB are using underneath - and on the prog.F90 level hopefully I would not have to worry about it at all. In fact CompA and CompB might have their own build systems so I cannot even collect all the module files easily into one location. All I have on the prog.F90 level when using them are the CompA and CompB modules. As for linking, the object files would be wrapped into archive libraries and liked as sort of black boxes against the prog.F90.

Thanks again for forwarding this to the engineers and setting up the TPR.

Post Reply