- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I wondered if anyone had used the Intel codecov tool for analysis of a static library.
I am building a static library comprising mainly algorithmic content which I want to analyse and also have a driver program which is used to test the library. The driver is linked against a static .lib. If I follow the examples in the documentation and compile everything with /Qcov-gen I get a dyn file in the exe directory and when I use the tools on that it gives me coverage analysis for the exe not for the library. However it is the library I am most interested in.
Currently working on Windows in Visual Studio but also doing Linux and MacOSX builds as well if someone has a solution for that.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What options are you using to build the library?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve
The library source is in a separate directory, it is compiled with /Qcov-gen set at the project level. The files PGOPTI.SPI and PGOPTI.SPL are created in that location. The driver program is in another directory, also compiled with /Qcov-gen, with its own SPI and SPL files.
I am working in Visual Studio. The solution contains projects for the app and the library and I have added /Qcov-gen in each project on the Fortran Command Line tab under additional options. Linking to the static library is implicit, achieved by setting a project dependency in Visual Studio.
Simon.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Forgot to mention I have not set any options when building the library. Although I have compiled with /Qcov-gen I could not find anything to do with coverage or profiling in the Librarian tab of the Visual Studio gui.
Simon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Would you please attach a ZIP of the buildlog.htm files for both the library and executable project? You will find these in the Debug or Release folder, depending on configuration. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I wondered if there was any news regarding this problem. I would like to get a move on with coverage and also profiling which I anticipate will have the same problem/resolution.
Thanks
Simon.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Simon - I'm not aware of any news regarding this issue so I will have a look in Steve's absence.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please pardon the delay, Simon.
I created a working example with our latest PSXE 2016 release. My example is a single solution with separate Console and Static library projects, where the latter is a dependent of the former. In each, I initially I only added /Qcov-gen like what I see in your build logs.
With that build what I found is after running the console1.exe to create some .dyn files, you run profmerge to combine .dyn files and then when running the codecov you must use the -spi option to specify the path to the Static lib’s PGOPTI.SPI/SPL files. Those reside at the project-level directory and both the console and static lib have their own. When you do not use the -spi option the code coverage report will only include routines from in the Console program.
For a little more convenience, I also found you can have both projects create a single set of combined PGOPTI.SPI/SPL files. Doing this will also produce a combined code coverage report. For this you do the following:
- Create a folder to capture the prof-gen PGOPTI.SPI/SPL files. For convenience, I created a sub-folder inside the Console project’s directory.
- To each project add the /Qprof-dir option (along with /Qcov-gen) to specify the appropriate relative path to the folder created in step 1. The path is relative to each project’s folder. (e.g. for my Static lib, I added /Qprof-dir:..\Console1\CodeC, where in step 1 the folder CodeC was created inside the Console project's folder.)
Following those two setup steps, rebuild the app and run to generate .dyn files (which also will now appear in the folder created in step 1). Next, from an Intel compiler initialized command-prompt, navigate to the folder created in step 1, and then run profmerge and codecov. The resulting code coverage report will now include all routines from the Console and Static library.
Hope that helps!

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page