forked from OSchip/llvm-project
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
This commit is contained in:
parent
69fa16c810
commit
de8d65914b
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue