[Openmp-commits] [PATCH] D40905: Force HWLOC topology method in case user requested NUMA-specific topology via granularity or KMP_HW_SUBSET
Andrey Churbanov via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Dec 6 09:11:02 PST 2017
AndreyChurbanov created this revision.
Herald added a subscriber: openmp-commits.
If e.g. user requested affinity with granularity=tile we need to either use HWLOC or ignore the request. The change allows user to not specify KMP_TOPOLOGY_MATHOD=hwloc and choose it automatically instead.
Repository:
rOMP OpenMP
https://reviews.llvm.org/D40905
Files:
runtime/src/kmp_settings.cpp
Index: runtime/src/kmp_settings.cpp
===================================================================
--- runtime/src/kmp_settings.cpp
+++ runtime/src/kmp_settings.cpp
@@ -5126,6 +5126,15 @@
#if KMP_AFFINITY_SUPPORTED
if (!TCR_4(__kmp_init_middle)) {
+#if KMP_USE_HWLOC
+ // Force using hwloc when either tiles or numa nodes requested within
+ // KMP_HW_SUBSET and no other topology method is requested
+ if ((__kmp_hws_node.num > 0 || __kmp_hws_tile.num > 0 ||
+ __kmp_affinity_gran == affinity_gran_tile) &&
+ (__kmp_affinity_top_method == affinity_top_method_default)) {
+ __kmp_affinity_top_method = affinity_top_method_hwloc;
+ }
+#endif
// Determine if the machine/OS is actually capable of supporting
// affinity.
const char *var = "KMP_AFFINITY";
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40905.125744.patch
Type: text/x-patch
Size: 810 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20171206/6d718f2f/attachment.bin>
More information about the Openmp-commits
mailing list