diff options
Diffstat (limited to 'openmp/runtime/src/z_Linux_util.cpp')
-rw-r--r-- | openmp/runtime/src/z_Linux_util.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/openmp/runtime/src/z_Linux_util.cpp b/openmp/runtime/src/z_Linux_util.cpp index ee5e6e1..be47be0 100644 --- a/openmp/runtime/src/z_Linux_util.cpp +++ b/openmp/runtime/src/z_Linux_util.cpp @@ -1889,21 +1889,8 @@ static int __kmp_get_xproc(void) { #elif KMP_OS_DARWIN - // Bug C77011 High "OpenMP Threads and number of active cores". - - // Find the number of available CPUs. - kern_return_t rc; - host_basic_info_data_t info; - mach_msg_type_number_t num = HOST_BASIC_INFO_COUNT; - rc = host_info(mach_host_self(), HOST_BASIC_INFO, (host_info_t)&info, &num); - if (rc == 0 && num == HOST_BASIC_INFO_COUNT) { - // Cannot use KA_TRACE() here because this code works before trace support - // is initialized. - r = info.avail_cpus; - } else { - KMP_WARNING(CantGetNumAvailCPU); - KMP_INFORM(AssumedNumCPU); - } + size_t len = sizeof(r); + sysctlbyname("hw.logicalcpu", &r, &len, NULL, 0); #else |