Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
3 Views

Set code coverage .dyn files to go to a different directory

I compile an executable using intel 19 with the options -prof-gen=srcpos -prof-dir=${BLDDIR}.  When I run the program, the .dyn files end up in the ${BLDDIR}.  The problem is that I use the same executable in different folders with different namelists, but the .dyn files all end up in the same location.  The run folders are created at runtime, so I can't specify what they are at compile time.  Is there a way to specify a location for the .dyn files at runtime instead of at compile time?

0 Kudos
3 Replies
Highlighted
Black Belt
3 Views

You can define an environment

You can define an environment variable INTEL_PROF_DYN_PREFIX as a string to be prefixed to the .dyn file name. I don't see a way to do this as a callable API as the .dyn file is created before your code starts execution.

Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
Beginner
3 Views

Thanks Steve.  So are you

Thanks Steve.  So are you saying that in the setup stage for my run, I can do something like 

setenv INTEL_PROF_DYN_PREFIX ${runDir}

 and the .dyn files will end up in ${runDir} if the variable ${runDir} is setup before the execution of the program?

0 Kudos
Highlighted
Black Belt
3 Views

You'll have to try it and see

You'll have to try it and see. That's not the intended usage model, it's for something like DATA1, DATA2, etc. when you run with different datasets. Depending on how the file is created, you might experiment with an absolute or relative path there. Let us know what happens.

Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos