Issue with CPU affinity in teams in OpenMP 5.0

General OpenMP discussion

Issue with CPU affinity in teams in OpenMP 5.0

Postby kchndrs » Thu May 21, 2020 7:52 am

I am trying to use teams on host, since with OpenMP 5.0 teams can work outside the target directive. I ran into an issue regarding affinity of teams in CPU. Threads from all teams seem to be mapped to the same set of cores, essentially resulting in a sequential execution of the teams. I am using gcc 9.3.
How do I resolve this issue so that threads from different teams are mapped to different cores?

Thanks,
Kavitha
kchndrs
 
Posts: 1
Joined: Wed May 06, 2020 6:16 am

Re: Issue with CPU affinity in teams in OpenMP 5.0

Postby MarkB » Mon May 25, 2020 6:46 am

In OpenMP 5.0, binding of (the initial thread of) teams to places (i.e. sockets, cores. hardware threads) is left up to the implementation - see lines 29-31 on page 83. I'm not aware of any compiler-specific support for this in gcc. Is using nested parallel regions not a possible solution for your use case?
MarkB
 
Posts: 797
Joined: Thu Jan 08, 2009 10:12 am
Location: EPCC, University of Edinburgh


Return to Using OpenMP

Who is online

Users browsing this forum: Google [Bot] and 3 guests