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

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

Tom_R_
Beginner
704 Views

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
Steve_Lionel
Honored Contributor III
704 Views

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.

0 Kudos
Tom_R_
Beginner
704 Views

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
Steve_Lionel
Honored Contributor III
704 Views

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.

0 Kudos
Reply