- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We want to register the code coverage for a large Fortran library. This works fine, using the relevant compile option (-Qprof-gen:srcpos), when we use the library via a Fortran main program. However, to get the full functionality of the library it needs to cooperate with another library and the infrastructure we have for that has been implemented in C++.
Unfortunately, it appears that in this constellation the files that register the code coverage are not written (the *.dyn files).
Some details:
- We run on Windows
- The C++ compiler is MicroSoft Visual C++
The question now is: how can we arrange for the program to produce its coverage files anyway or is that not possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Intel code coverage feature does not handle code not compiled by Intel compilers. You should be getting .dyn files for the Fortran code. I don't think there's a requirement that the main program be compiled by an Intel compiler, but I am not certain.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Intel code coverage feature does not handle code not compiled by Intel compilers. You should be getting .dyn files for the Fortran code. I don't think there's a requirement that the main program be compiled by an Intel compiler, but I am not certain.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, that is not what I infer from my experiments: I did one calculation with the C++ program as the driver, that produced no .dyn files. Repeating the same calculation with the Fortran program did produce them. I have also noticed that the execution of a STOP statement prevented these .dyn files from appearing.
I do not expect the C++ code to be covered ;), but if my observation is correct, I will have to look for a different solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you call for_rtl_init_ / for_rtl_finish_ from your C++ code?
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am pretty sure we don't - it is definitely worth a try! Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh, it seems I was wrong about the C++ program not producing the .dyn files. They simply appear in a rather unexpected directory.
Some details: I use the option "-Qprof-dir: ." and then the .dyn files appear in the directory holding the .vfproj file in question. I was used to the relevant .vfproj file to be the one of the main program and I searched for these files in the directories for the various libraries. But I forgot that we also have some rather general libraries and the .dyn files were written there. In both cases: with the original C++ program driving the library and with the pair for_rtl_init_/for_rtl_finish_ in place.
Okay, that makes it easier from the perspective of the C++ program ;).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, a STOP would definitely prevent the .dyn file from appearing - I've seen that before. I don't know if it's possible to get the .dyn file if the main program isn't from an Intel compiler - perhaps someone else does.
![](/skins/images/D3C0B914909A6564BBB97F4AD1ED1973/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page