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

codecov, .F files and .f90 files

Martin_C_
Beginner
964 Views

I use ifort 8.0 and have many #ifdef...#endif's (thousands) in the .F files used to compile/exclude large sections of code. Is there a way collate runs from various -Dxxx options usedinto one output from codecov?

0 Kudos
3 Replies
Martin_C_
Beginner
964 Views
I upgraded to ifort v9.0 and found the following bug in profmerge.
The source directory is coded to be the directory where the source was compiled from, not the directory the source is in.
In addition, -src_old / -src_new does not change it to something different.
After surfing the forum for profmerge, I see others have similar problems.
I cannot get into Premier Support so I put the bug it here.

Make a directory for projects

Make a sub-directory in it called Source

In the Source directory enter the code:

PROGRAM ProfBug

! **********************************************************************

write(*,*) "Compile this with:"

write(*,*) "ifort -fpp -prof_genx -qp -p -g Source/profbugger.F"

write(*,*) "from a directory above the source file."

if (.true.) then

write(*,*) "Run the code a.out"

else

write(*,*) "This is line 3"

endif

call other

write(*,*) "Look at the dyn file and you will see the source"

write(*,*) "listed wrong"

end

subroutine other

integer I

do I = 1,3

write(*,*) "I: ", I

end do

return

end subroutine

Move up one directory and compile and profmerge:

$ ifort -fpp -prof_genx -qp -p -g Source/profbugger.F

$ a.out

Compile this with:

ifort -fpp -prof_genx -qp -p -g Source/profbugger.F

from a directory above the source file.

Run the code a.out

I: 1

I: 2

I: 3

Look at the dyn file and you will see the source

listed wrong

[mjcrawf@crater projects]$ profmerge

profmerge: merging dynamic file: ./4489b960_17385.dyn

[mjcrawf@crater projects]$ codecov

Intel C++/Fortran Compiler code-coverage tool for 32-bit applications, Version 9.0 Build 20050430Z Package ID: l_fc_p_9.0.021

Copyright (C) 1985-2005 Intel Corporation. All rights reserved.

Warning - File /chome/mjcrawf/projects/profbugger.F not found!

50% .. 100%

Also try:

$ profmerge -src_old /chome/mjcrawf/projects -src_new /chome/mjcrawf/projects/Source

profmerge: DPI Source Relocation:

profmerge: old source dir = /chome/mjcrawf/projects

profmerge: new source dir = /chome/mjcrawf/projects/Source

profmerge: relocated 2 of 2 source routines

[mjcrawf@crater projects]$ codecov

Intel C++/Fortran Compiler code-coverage tool for 32-bit applications, Version 9.0 Build 20050430Z Package ID: l_fc_p_9.0.021

Copyright (C) 1985-2005 Intel Corporation. All rights reserved.

Warning - File /chome/mjcrawf/projects/profbugger.F not found!

50% .. 100%

Any suggestions???

Vital Info:

Intel Fortran compiler for Linux

ifort -v

Version 9.0

Linux version 2.4.21-40.ELsmp (bhcompile@hs20-bc1-1.build.redhat.com) (gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-54)) #1 SMP Thu Feb 2 22:14:12 EST 2006

glibc-2.3.2-95.39

glibc-devel-2.3.2-95.39

glibc-common-2.3.2-95.39

glibc-headers-2.3.2-95.39

glibc-kernheaders-2.4-8.34.2

glibc-utils-2.3.2-95.39

glibc-profile-2.3.2-95.39

gcc -v

Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.1/specs

Configured with: ./configure : (reconfigured) ./configure

< font size="2">Thread model: posix

gcc version 3.4.1

0 Kudos
Steven_L_Intel1
Employee
964 Views
Please report suspected bugs to Intel Premier Support. This forum is not a support channel.
0 Kudos
Martin_C_
Beginner
964 Views

Back to the original question, but I upgraded to ifort 9.0, and ICC 9.1 and using profmerge l_cc_p_9.1.038 and codecov l_fc_p_9.0.021 with the same result:

I use ifort 9.0 and have many #ifdef...#endif's (thousands) in the .F files used to compile/exclude large sections of code. Is there a way collate runs from various -Dxxx options usedinto one output from codecov?
I realize these generate different .spi files but know of no way to collate the results correctly. I have 19 different compilation sets to merge for test coverage.
Martin
0 Kudos
Reply