[Openmp-commits] [PATCH] D45527: [OpenMP] Fix affinity API for KMP_AFFINITY=none|compact|scatter
Jonathan Peyton via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Apr 11 10:14:03 PDT 2018
jlpeyton created this revision.
jlpeyton added reviewers: AndreyChurbanov, tlwilmar.
jlpeyton added a project: OpenMP.
Herald added a subscriber: guansong.
Currently, the affinity API reports garbage for the initial place list and any
thread's place lists when using KMP_AFFINITY=none|compact|scatter.
This patch does two things:
1. for KMP_AFFINITY=none, Creates a one entry table for the places, this way, the initial place list is just a single place with all the proc ids in it. We also set the initial place of any thread to 0 instead of KMP_PLACE_ALL so that the thread reports that single place (place 0) instead of garbage (-1) when using the affinity API.
2. When non-OMP_PROC_BIND affinity is used (including KMP_AFFINITY=compact|scatter), a thread's place list is populated correctly. We assume that each thread is assigned to a single place. This is implemented in two of the affinity API functions
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3839 bytes
Desc: not available
More information about the Openmp-commits