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

KMP_AFFINITY

Hi,

Does anyone know I can internally change KMP_AFFINITY in the sub-process invoked from my program?  My experiment shows it does not work with intel compiler but however it is under gcc compiler.

here is the example:

let's say I have KMP_AFFINITY=scatter, which is for my main process. Then inside main process before invoking another executable as the sub-process, putenv is used to modify KMP_AFFINITY=none for the sub-process.

is this supposed to work? my run shows the KMP_AFFINITY=none does not apply to the sub-process if intel compiler is used to compile and link my main program. but it is with gcc compiler.

when I double check the environment, in the sub-process, there is one extra environment variable for my exe with intel compiler

__KMP_REGISTERED_LIB_23907=0xacfa1d0-cafe8af0-libiomp5.a

 

what does this guy do and how to explain such difference? Thank you

Hongwei

0 Kudos
1 Reply
Highlighted
Black Belt
30 Views

Please explain whether you are discussing nested OpenMP; if so, why you didn't try appropriate OMP_PROC_BIND settings for the multiple levels.  Coming here with the same lack of specification which failed to satisfy you on stackoverflow is just wasting our time.

0 Kudos