[Openmp-commits] [PATCH] D30404: Assertion failure when 'proclist' is used without 'explicit' in KMP_AFFINITY

Olga Malysheva via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Feb 27 06:50:36 PST 2017


omalyshe created this revision.

This fixes assertion failure in case KMP_AFFINITY is set with 'proclist' specified but without 'explicit' (that is like KMP_AFFINITY=verbose,proclist=[0-31]).


Repository:
  rL LLVM

https://reviews.llvm.org/D30404

Files:
  runtime/src/kmp_settings.cpp


Index: runtime/src/kmp_settings.cpp
===================================================================
--- runtime/src/kmp_settings.cpp
+++ runtime/src/kmp_settings.cpp
@@ -2240,9 +2240,12 @@
     if ( proclist ) {
         if ( ! type ) {
             KMP_WARNING( AffProcListNoType, name );
-            __kmp_affinity_type = affinity_explicit;
+            *out_type = affinity_explicit;
+# if OMP_40_ENABLED
+            __kmp_nested_proc_bind.bind_types[0] = proc_bind_intel;
+# endif
         }
-        else if ( __kmp_affinity_type != affinity_explicit ) {
+        else if ( *out_type != affinity_explicit ) {
             KMP_WARNING( AffProcListNotExplicit, name );
             KMP_ASSERT( *out_proclist != NULL );
             KMP_INTERNAL_FREE( *out_proclist );


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30404.89873.patch
Type: text/x-patch
Size: 777 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20170227/96ac131a/attachment.bin>


More information about the Openmp-commits mailing list