- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[1] https://www.intel.com/content/www/us/en/docs/fortran-compiler/developer-guide-reference/2023-0/code-coverage-tool.html
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I checked with the compiler team. Code coverage is not available with ifx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there any indication when the compiler team will implement this feture in IFX?
Since IFORT is no longer available, it is a problem to properly implement detailed unit tests.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Fran:
We try to survey our customer community about different feature requests. If possible, would you please let us know your company/institute name, and the name of the app you plan to apply the code coverage functionality to? Is there a public website for your target app? Thanks,
Shiquan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Shiquan,
I am more of a private user. I used to work in a company where Fortran was a key lnguage for space system applicaiton development and I am certain that they suffer the same issue with the code coverage using IFX.
There are some libraries in Github (https://github.com/ffadrique) that include all unit tests that I have always used to analyse the code coverage. I have another couple of libraries in the pipeline that I will only publish when I can complete the unit testing.
Cheers,
Fran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This feature is planned for ifx 2026.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Interesting - LLVM compilers provide source code coverage capability from the command line. Are you saying that ifx is not able to use this yet, or is the aim to provide reporting similar to ifort in OneAPI 2026?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ifx is not able to use it, and the aim is to provide a code coverage feature similar to ifort.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the clarification @Devorah_H_Intel
For the OP, @Paul_Levold , a couple of suggestions:
If you still have OneAPI 2025.0 (or earlier) installed, you could still use IFORT and its code coverage tool.
Alternatively, you could try using GNU Fortran and the gcov tool to provide code coverage.
It's a good idea to get your code building with alternative compilers anyway, because they can pick up bugs in your code that the other compiler doesn't.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
indeed, I use gfortran with gcov for the unit test coverage, but this forces me to maintain two environments, which is a bit of an unnecessary burden. Still useful for portability and debugging.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When code coverage or speed is "Can we do an entire cycle in 8.192 seconds, 16834 divided by 2000 steps per second?" if yes, then it does not matter, if not change the FFT engine first.
Some people have simple lives.
And then the data tells you what happens when a large truck hits a larger bridge. The bridge moves. No idea about the truck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
did ifx coverage support make it into the 2026 release?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Doesn't look like it, according to the release notes: Intel® Fortran Compiler for oneAPI Release Notes 2026. Though I would treat them with a pinch of salt; the MKL release notes originally omitted the removal of some deprecated procedures.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unfortunately, it is not available in 2026 version.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is the roadmap for this functionality to be available?
- 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
On Linux (I'm using Ubuntu 22.04 LTS on WSL), you can get ifx/icx to generate coverage information using --coverage.
The coverage data must be read with `llvm-cov gcov`, not the system `gcov`. lcov needs a *single-file* gcov tool, and `llvm-cov` requires its `gcov` subcommand — so passing `"llvm-cov gcov"` directly to `lcov --gcov-tool` fails with `geninfo: ERROR: need tool …!`. I created a wrapper `llvm-cov-gcov` which forwards to `llvm-cov gcov`. Pass an **absolute** path to `--gcov-tool` — geninfo `chdir`s into each object directory before running the tool, so a relative `./llvm-cov-gcov` resolves during the version probe but fails (`Can't exec`) once file processing begins.
Once you have built your program with coverage and run it (I use cmake and build into build_ifx_debug)
GCOV_TOOL="$(pwd)/llvm-cov-gcov" # absolute path (see note above)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Mark for the reponse.
Knowing that ifx alredy provides code coverage support is very interesting and useful.
Unfortunatelly I have not been able to pass the first step.
I have downloaded and installed the latest oneapi version (2026.1). I run Ubuntu 26.04 LTS on VMware.
Compiling with --coverage does not seem to generate an executable that produces any coverage information. I run on a single fortran file (attached) with the command:
/opt/intel/oneapi/compiler/2026.1/bin/ifx -rpath $LD_LIBRARY_PATH -L $LD_LIBRARY_PATH -lintlc --coverage fast_square_root.f90
With the additional options to resolve for requested libraries.
Once I run the generated executable I was expecting sime .gcno/.gcda or of the like files.
Maybe I miss an environment variable or looking in the wrong place. Is there any additional compiler option missing?
Thanks and best regards
Fran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Fran,
You need to compile your program with debug information, optimisation doesn't get on with code coverage.
ifx -g --coverage fast_square_root.f90
ifx: remark #10440: Note that use of a debug option without any optimization-level option will turnoff most compiler optimizations similar to use of '-O0'
./a.out
3.615507630310937E-002
3.615507630310936E-002
35.000
54.000
(I edited n to make it much smaller than in the original)
ls -al
drwxrwxrwx 1 lewym lewym 512 Jul 27 2026 .
drwxrwxrwx 1 lewym lewym 512 Jul 27 13:50 ..
-rwxrwxrwx 1 lewym lewym 616744 Jul 27 13:59 a.out
-rwxrwxrwx 1 lewym lewym 1563 Jul 27 13:52 fast_square_root.f90
-rwxrwxrwx 1 lewym lewym 108 Jul 27 2026 fast_square_root.gcda
-rwxrwxrwx 1 lewym lewym 988 Jul 27 13:59 fast_square_root.gcno
The gcda and gcno files are the ones you should see when coverage is enabled.
ifx --version
ifx (IFX) 2025.3.3 20260319
Copyright (C) 1985-2026 Intel Corporation. All rights reserved.
I'd be surprised if this was no longer working in 2026.1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nice. I got it working now. I did not think of the need to compile with debugging.
I also got it running in windows with Visual Studio 2026. Here I had to manually add clang_rt.profile-x86_64.lib because the compiler does not include it automatically in the link step, even including --coverage flag at compile and link time.
Both in windows and linux with ifx 2026.1
Cheers,
Fran
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page