[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
Repository:
rOMP OpenMP
https://reviews.llvm.org/D45527
Files:
runtime/src/kmp.h
runtime/src/kmp_affinity.cpp
runtime/src/kmp_ftn_entry.h
runtime/src/kmp_settings.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45527.142034.patch
Type: text/x-patch
Size: 3839 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20180411/219943da/attachment.bin>
More information about the Openmp-commits
mailing list