[Openmp-commits] [PATCH] D40340: Warning is emitted when tiles are requested but cannot be used

Jonathan Peyton via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Nov 29 14:27:47 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rOMP319374: Warning is emitted when tiles are requested but cannot be used (authored by jlpeyton).

Repository:
  rOMP OpenMP

https://reviews.llvm.org/D40340

Files:
  runtime/src/i18n/en_US.txt
  runtime/src/kmp_affinity.cpp


Index: runtime/src/kmp_affinity.cpp
===================================================================
--- runtime/src/kmp_affinity.cpp
+++ runtime/src/kmp_affinity.cpp
@@ -3849,6 +3849,13 @@
     }
   }
 
+  if (__kmp_affinity_gran == affinity_gran_tile &&
+      // check if user's request is valid
+      __kmp_affinity_dispatch->get_api_type() == KMPAffinity::NATIVE_OS) {
+    KMP_WARNING(AffTilesNoHWLOC, "KMP_AFFINITY");
+    __kmp_affinity_gran = affinity_gran_package;
+  }
+
   int depth = -1;
   kmp_i18n_id_t msg_id = kmp_i18n_null;
 
@@ -4115,6 +4122,11 @@
     return;
   }
 
+  if (__kmp_affinity_gran == affinity_gran_tile && __kmp_tile_depth == 0) {
+    // tiles requested but not detected, warn user on this
+    KMP_WARNING(AffTilesNoTiles, "KMP_AFFINITY");
+  }
+
   __kmp_apply_thread_places(&address2os, depth);
 
   // Create the table of masks, indexed by thread Id.
Index: runtime/src/i18n/en_US.txt
===================================================================
--- runtime/src/i18n/en_US.txt
+++ runtime/src/i18n/en_US.txt
@@ -38,7 +38,7 @@
 Country  "USA"
 LangId   "1033"
 Version  "2"
-Revision "20170327"
+Revision "20170523"
 
 
 
@@ -325,6 +325,8 @@
                                  # %1, -- name of ignored variable, %2 -- name of variable with higher priority.
 OBSOLETE                     "%1$s: overrides %3$s specified before"
                                  # %1, %2 -- name and value of the overriding variable, %3 -- name of overriden variable.
+AffTilesNoHWLOC              "%1$s: Tiles are only supported if KMP_TOPOLOGY_METHOD=hwloc, using granularity=package instead"
+AffTilesNoTiles              "%1$s: Tiles requested but were not detected on this HW, using granularity=package instead"
 OmptOutdatedWorkshare        "OMPT: Cannot determine workshare type; using the default (loop) instead. "
                              "This issue is fixed in an up-to-date compiler."
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40340.124820.patch
Type: text/x-patch
Size: 1933 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20171129/41176803/attachment.bin>


More information about the Openmp-commits mailing list