diff options
author | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2017-03-10 17:22:47 +0000 |
---|---|---|
committer | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2017-03-10 17:22:47 +0000 |
commit | de8d65914bd5c0254d2024fe8643460f68406cfa (patch) | |
tree | 3308b1c617d621967e183f9787249a3d7b8d7aa9 /openmp/runtime/src | |
parent | 69fa16c810909c9d8d548ecc99592fe6d7c72974 (diff) | |
download | bcm5719-llvm-de8d65914bd5c0254d2024fe8643460f68406cfa.tar.gz bcm5719-llvm-de8d65914bd5c0254d2024fe8643460f68406cfa.zip |
Fix assertion failure when 'proclist' is used without 'explicit' in KMP_AFFINITY
This change fixes an assertion failure the in case KMP_AFFINITY is set with
'proclist' specified but without 'explicit'
e.g., KMP_AFFINITY=verbose,proclist=[0-31]
Patch by Olga Malysheva
Differential Revision: https://reviews.llvm.org/D30404
llvm-svn: 297480
Diffstat (limited to 'openmp/runtime/src')
-rw-r--r-- | openmp/runtime/src/kmp_settings.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/openmp/runtime/src/kmp_settings.cpp b/openmp/runtime/src/kmp_settings.cpp index 3f8ec39a5dc..3d6bd4e7066 100644 --- a/openmp/runtime/src/kmp_settings.cpp +++ b/openmp/runtime/src/kmp_settings.cpp @@ -2240,9 +2240,12 @@ __kmp_parse_affinity_env( char const * name, char const * value, 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 ); |