diff options
author | Andrey Churbanov <Andrey.Churbanov@intel.com> | 2015-01-13 14:54:00 +0000 |
---|---|---|
committer | Andrey Churbanov <Andrey.Churbanov@intel.com> | 2015-01-13 14:54:00 +0000 |
commit | 9dd2dbbb70022a0aa1b028725740edd764e28b65 (patch) | |
tree | 3022335abc5f6a9fedf86c19ff598f3bf0310af3 /runtime/src/kmp_affinity.cpp | |
parent | cc78b2420990e8ee0a6695a6f87d27bf646bd9ef (diff) |
This patch enables the use of KMP_AFFINITY=balanced on non-MIC Architectures. The restriction for using balanced affinity on non-MIC architectures is it only works for one-package machines.
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@225794 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtime/src/kmp_affinity.cpp')
-rw-r--r-- | runtime/src/kmp_affinity.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/runtime/src/kmp_affinity.cpp b/runtime/src/kmp_affinity.cpp index d6821e0..a9338c2 100644 --- a/runtime/src/kmp_affinity.cpp +++ b/runtime/src/kmp_affinity.cpp @@ -3819,9 +3819,8 @@ __kmp_aux_affinity_initialize(void) } goto sortAddresses; -# if KMP_MIC case affinity_balanced: - // Balanced works only for the case of a single package and uniform topology + // Balanced works only for the case of a single package if( nPackages > 1 ) { if( __kmp_affinity_verbose || __kmp_affinity_warnings ) { KMP_WARNING( AffBalancedNotAvail, "KMP_AFFINITY" ); @@ -3872,7 +3871,6 @@ __kmp_aux_affinity_initialize(void) break; } -# endif sortAddresses: // @@ -4019,10 +4017,7 @@ __kmp_affinity_set_init_mask(int gtid, int isa_root) if (__kmp_nested_proc_bind.bind_types[0] == proc_bind_intel) # endif { - if ((__kmp_affinity_type == affinity_none) -# if KMP_MIC - || (__kmp_affinity_type == affinity_balanced) -# endif + if ((__kmp_affinity_type == affinity_none) || (__kmp_affinity_type == affinity_balanced) ) { # if KMP_OS_WINDOWS && KMP_ARCH_X86_64 if (__kmp_num_proc_groups > 1) { @@ -4397,7 +4392,6 @@ __kmp_aux_get_affinity_mask_proc(int proc, void **mask) return KMP_CPU_ISSET(proc, (kmp_affin_mask_t *)(*mask)); } -# if KMP_MIC // Dynamic affinity settings - Affinity balanced void __kmp_balanced_affinity( int tid, int nthreads ) @@ -4626,8 +4620,6 @@ void __kmp_balanced_affinity( int tid, int nthreads ) } } -# endif /* KMP_MIC */ - #else // affinity not supported |