View Full Version : Fortran modules and PGI compiler?

07-21-2009, 01:07 AM

I am trying to use Totalview on Fortran code compiled with the PGI (7.1) compiler.

When using modules that have included source code from separate files via include statements, I cannot see the source code in the debugger. An example:

module testmodule


include 'file.f90'

endmodule testmodule

If, instead, I copy the code from file.f90 directly into the module, I can see it in the debugger. Why is that? Is there anything I can change in the settings of Totalview or any compiler options that will make the code visible? I have tried #include "file.f90" and using the preprocessor, but that did not help.

Thanks for any help.
Best regards

08-17-2009, 01:58 PM
Included code has always been a bit tricky. Much of the time it may be a compiler issue, but it's hard to tell for sure without an example, I assume this included code contains subroutines which are called by some other code? Is it possible to set a breakpoint on a line (hopefully not in it's own included code!) that calls into this included section, and then step from that breakpoint into that code? If that works does it show the source, or only assembler?

Another possible consideration is that the PGI 7.1 compiler is a somewhat older version of that compiler, with the current version being 9.0.3. Of course, the problem may still exist with a newer compiler, but if you have access to something more recent, it might be worth checking against that.

If this is still an issue, I'd suggest sending this problem report to


where we can look at it in a more timely fashion than my belated reply here.


08-24-2009, 06:19 AM
Dear Pete,

thanks for the reply. I actually have contacted the support in the meantime, and it turned out that the problem is solved in PGI version 9. Nothing to blame on Totalview then!

Best regards,
Rita Streich