Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Code Coverage Tool

Curran_K_
Beginner
973 Views

I am an intern tasked to do code coverage using visual studio 2010 and I have installed a fortran compiler - w_fcompxe_2011.11.344 (11).exe - and have merged it with visual studio. According to my colleagues I am supposed to see a tab when I right click on a project file saying intel compiler and from there I can select Code Coverage and then select the phase. However this option is not present. Do I need to install another fortran compiler?

Thanks in advance

0 Kudos
9 Replies
TimP
Honored Contributor III
973 Views

Surprisingly, the official advertising document https://software.intel.com/sites/products/collateral/hpc/compilers/code_coverage_tool.pdf

is even older than your compiler, and apparently predates the introduction of Windows X64.

More detail, referring to a newer compiler than yours, but still an obsoleted one:

https://software.intel.com/en-us/node/512810

This document has been included in the compiler installation since it was written.

If you look in the documentation installed with your compiler, you should find

Using Code Coverage in Visual Studio*

The code coverage tool provides the ability to determine how much application code is executed when a specific workload is applied to the application. The tool analyzes static profile information generated by the compiler, as well as dynamic profile information generated by running an instrumented form of the application binaries on the workload. The tool can generate a report in HTML-format and export data in both text- and XML-formatted files. The reports can be further customized to show color-coded, annotated source-code listings that distinguish between used and unused code.

To start code coverage:

  1. Select Tools > Intel Compiler > Code Coverage....

  2. Specify settings for the various phases.

  3. Click Run.

The Output window shows the results of the coverage and a general summary of information from the code coverage.

 

0 Kudos
Curran_K_
Beginner
973 Views

Thank you for the quick response Tim.

I am very new to visual studio and fortran compilers. So for Visual studio 10 which compiler exactly would I need to download as I am very aware how code coverage works and how to go about setting it up it is just that there is no function in VS10 to allow me to click 'run Code Coverage'. When I go to tools there is no intel compiler.

Thanks

0 Kudos
Steven_L_Intel1
Employee
973 Views

The appropriate product would be Intel Parallel Studio XE 2016. Any edition would do other than the ones that have "for C++" in the name. Please note that support for Visual Studio 2010 will be dropped in the next release (Parallel Studio XE 2017.)

0 Kudos
TimP
Honored Contributor III
973 Views

If you have installed ifort after installing VS2010 and completed the integration step, the menu item referred to in the documentation should be present.  I don't have a compiler that old to check it.  Note that this requires VS2010 Pro or higher, or the VS Shell which comes with full versions of ifort.  If your VS2010 is less than Pro, ifort should have installed with its own VS Shell and this menu item ought to be there.

If you installed ifort prior to setting up VS2010, you may need to remove and reinstall ifort, which can be done directly from the setup.exe in the unpacked \intel\downloads\ folder for your ifort.
 

0 Kudos
Curran_K_
Beginner
973 Views

Dear All,

Thank you for your responses. I have uninstalled and reinstalled ifort but that access to code coverage is still not present. I will try and install Intel Parallel Studio XE 2016 and see what happens.

Many Thanks

C

0 Kudos
dboggs
New Contributor I
973 Views

I have never heard of this tool before but it sounds useful and I would like to try it. But I too cannot find it.

As stated by Tim in #5, I installed IVF 2011.11.344 with the accompanying VS 2010 shell. When I select Tools > Intel Visual Fortran Composer XE2011 I see only two choices: one about Guided auto parallelism, and one about the Module wizard.

0 Kudos
Steven_L_Intel1
Employee
973 Views

It might not be shown in Visual Studio in that old version. I can see it under Tools > Intel Compiler > Code Coverage... in the 2016 product. It can also be run from the command line - see the documentation for more details.

0 Kudos
Gorakh_S_
Beginner
973 Views

Hi, 

My product is developed and having C++, and Fortran used. I wanted to know the code coverage for Fortran Code, I am using Parallel Studio XE With Visual Studio 2012.

While running code coverage I am getting below Error:

 

------ Code Coverage started: Project: drt Configuration: Release Win32 ------
Instrumenting project 'drt'...
Executing '...\src\Release\NT_i386_vc110\lib\basic.lib'
Error: The specified executable is not a valid application for this OS platform.
Code Coverage log was saved at  "...\src\server\make\..\..\Release\NT_i386_vc110\obj\drt\CCovLog.html"
========== Code Coverage failed ==========

Can you please help me to resolve this issue?

Regards,

Gorakh

0 Kudos
Steven_L_Intel1
Employee
973 Views

You cannot execute a static library - it has to be an executable application.

0 Kudos
Reply