Reputation: 5875
I am looking for serious Fortran code-coverage tools. We are working on a large project with tens of thousands of lines of code and dozens and dozens of fortran files in fixed and free form. We use the ifort
compiler. I have not been able to find tools that can provide in-depth introspection for projects of this scale.
My main need is to create multiple runs for different configurations/inputs for our project and really analyze how they are the same/different. This implies that the runs are saved into some sort of data-conscious format which can be queried and used.
A simple code coverage tool such as that provided by intel's codecov
would not be sufficient. This merely indicates which lines are exercised and which are not. While this is useful information, I need to go a step further and compare two different code coverage runs programmatically.
I really had my hopes up with intel fortran, especially having become familiar with the various commands, etc. I thought I hit the gold nugget a few weeks ago when I saw that a differential coverage tool exists built-into ifort
. Unfortunately it is poorly documented and I have asked questions in StackOverflow and the official Intel Fortran forum with little response. This indicates to me that the tool is not sufficiently developed and will most likely not fit our needs.
Therefore I appeal to the SO community. Fortran is ancient, no doubt about it, however there are enough legacy codes/projects out there to render thorough code introspection useful and indeed necessary. Has anyone else ever faced a similar problem with large, spaghetti like Fortran code project which need to be cleaned up and tested? What high level programmatic code coverage tools exist that can enable one to shoot problems down efficiently?
Thanks
Upvotes: 3
Views: 1350
Reputation: 51
To compare coverage for different runs, I would suggest outputting the coverage report for each run in separate XML-formatted files.
Both codecov
(Intel) and gcov
(GNU, needs an additional tool like gcovr
) can produce XML-formatted coverage files. The exact workflow depends on the tool that you select.
Once you have XML files, you can then interface with standard coverage analysis tools. A tool such as pycobertura (github.com/aconrad/pycobertura) should fulfill your requirements of comparing the coverage given different executions. If you're testing the coverage for a unit testing suite, they can also be used to generate "coverage gutters".
Upvotes: 1