Hi,

I am trying to do something like below with OpenMPI and OpenMP (threads).

[image: Inline image 1]

I was trying to use the explicit thread affinity with GOMP_CPU_AFFINITY
environment variable as described here (
https://gcc.gnu.org/onlinedocs/libgomp/GOMP_005fCPU_005fAFFINITY.html).

However, both P0 and P1 processes will read the same GOMP_CPU_AFFINITY and
will place threads on the same set of cores.

Is there a way to overcome this and pass process specific affinity scheme
to OpenMP when running with OpenMPI? For example, can I say T0 of P0 should
be in Core 0, but T0 of P1 should be Core 4?

P.S. I can manually achieve this within the program using
*sched_setaffinity()*, but that's not portable.

Thank you,
Saliya

-- 
Saliya Ekanayake
Ph.D. Candidate | Research Assistant
School of Informatics and Computing | Digital Science Center
Indiana University, Bloomington

Reply via email to