@@ -1579,7 +1579,7 @@ __kmp_stg_parse_cpuinfo_file( char const * name, char const * value, void * data
15791579 #if KMP_OS_LINUX || KMP_OS_WINDOWS
15801580 __kmp_stg_parse_str ( name , value , & __kmp_cpuinfo_file );
15811581 K_DIAG ( 1 , ( "__kmp_cpuinfo_file == %s\n" , __kmp_cpuinfo_file ) );
1582- #elif KMP_OS_DARWIN
1582+ #elif ! KMP_AFFINITY_SUPPORTED
15831583 // affinity not supported
15841584 #else
15851585 #error "Unknown or unsupported OS"
@@ -3068,7 +3068,7 @@ __kmp_stg_print_topology_method( kmp_str_buf_t * buffer, char const * name,
30683068# endif /* KMP_DEBUG */
30693069} // __kmp_stg_print_topology_method
30703070
3071- #elif KMP_OS_DARWIN
3071+ #elif !KMP_AFFINITY_SUPPORTED
30723072 // affinity not supported
30733073#else
30743074 #error "Unknown or unsupported OS"
@@ -4429,7 +4429,7 @@ static kmp_setting_t __kmp_stg_table[] = {
44294429
44304430 { "KMP_TOPOLOGY_METHOD" , __kmp_stg_parse_topology_method , __kmp_stg_print_topology_method , NULL , 0 , 0 },
44314431
4432- #elif KMP_OS_DARWIN
4432+ #elif ! KMP_AFFINITY_SUPPORTED
44334433
44344434 //
44354435 // KMP_AFFINITY is not supported on OS X*, nor is OMP_PLACES.
@@ -4686,7 +4686,7 @@ __kmp_stg_init( void
46864686 rivals [ i ++ ] = NULL ;
46874687 }
46884688
4689- #elif KMP_OS_DARWIN
4689+ #elif ! KMP_AFFINITY_SUPPORTED
46904690 // KMP_AFFINITY not supported, so OMP_PROC_BIND has no rivals.
46914691 // OMP_PLACES not supported yet.
46924692#else
@@ -4768,7 +4768,7 @@ __kmp_stg_check_rivals( // 0 -- Ok, 1 -- errors found.
47684768 for ( ; strcmp ( rivals [ i ]-> name , name ) != 0 ; i ++ ) {
47694769 KMP_DEBUG_ASSERT ( rivals [ i ] != NULL );
47704770
4771- #if KMP_OS_LINUX || KMP_OS_WINDOWS
4771+ #if KMP_AFFINITY_SUPPORTED
47724772 if ( rivals [ i ] == __kmp_affinity_notype ) {
47734773 //
47744774 // If KMP_AFFINITY is specified without a type name,
@@ -4885,7 +4885,7 @@ __kmp_env_initialize( char const * string ) {
48854885 __kmp_stg_parse ( name , value );
48864886 }; // if
48874887
4888- #if KMP_OS_LINUX || KMP_OS_WINDOWS
4888+ #if KMP_AFFINITY_SUPPORTED
48894889 //
48904890 // Special case. KMP_AFFINITY is not a rival to other affinity env vars
48914891 // if no affinity type is specified. We want to allow
@@ -4928,7 +4928,7 @@ __kmp_env_initialize( char const * string ) {
49284928 }
49294929# undef FIND
49304930 }
4931- #endif /* KMP_OS_LINUX || KMP_OS_WINDOWS */
4931+ #endif /* KMP_AFFINITY_SUPPORTED */
49324932
49334933#if OMP_40_ENABLED
49344934 //
@@ -4967,7 +4967,7 @@ __kmp_env_initialize( char const * string ) {
49674967 KMP_DEBUG_ASSERT ( __kmp_user_lock_kind != lk_default );
49684968 }
49694969
4970- #if KMP_OS_LINUX || KMP_OS_WINDOWS
4970+ #if KMP_AFFINITY_SUPPORTED
49714971 if ( ! TCR_4 (__kmp_init_middle ) ) {
49724972 //
49734973 // Determine if the machine/OS is actually capable of supporting
@@ -4999,10 +4999,10 @@ __kmp_env_initialize( char const * string ) {
49994999 }
50005000 else if ( __kmp_nested_proc_bind .bind_types [0 ] == proc_bind_default ) {
50015001 //
5002- // On Windows* OS & Linux* OS, the default is to use the KMP_AFFINITY
5003- // mechanism. On OS X*, it is none.
5002+ // Where supported the default is to use the KMP_AFFINITY
5003+ // mechanism. On OS X* etc. it is none.
50045004 //
5005- # if KMP_OS_WINDOWS || KMP_OS_LINUX
5005+ # if KMP_AFFINITY_SUPPORTED
50065006 __kmp_nested_proc_bind .bind_types [0 ] = proc_bind_intel ;
50075007# else
50085008 __kmp_nested_proc_bind .bind_types [0 ] = proc_bind_false ;
@@ -5136,11 +5136,7 @@ __kmp_env_initialize( char const * string ) {
51365136# endif
51375137 }
51385138
5139- #elif KMP_OS_DARWIN
5140- // affinity not supported
5141- #else
5142- #error "Unknown or unsupported OS"
5143- #endif /* KMP_OS_LINUX || KMP_OS_WINDOWS */
5139+ #endif /* KMP_AFFINITY_SUPPORTED */
51445140
51455141 if ( __kmp_version ) {
51465142 __kmp_print_version_1 ();
0 commit comments