Code Coverage

How to generate code coverage with PGI Fortran?

Intel Fortran and GNU Fortran both have some compiler-directives and tools to generate Code Coverage report.

Hi cmehdi56131,

While we used to have the ability to do code coverage with our old profiler, this support required the compiler to instrument the code which considerably increased the runtime of the generated binary. Also, there were very few users that took advantage of this feature. Hence this support didn’t get carried into our new profiler which is sample based.

PGROF does allow you to see line level profiling information which can you can use to discern code coverage, but since it’s sample based, some lines of code may be missed if not executed frequently.