diff --git a/driver/others/memory.c b/driver/others/memory.c index 0185fa683..477efd664 100644 --- a/driver/others/memory.c +++ b/driver/others/memory.c @@ -249,6 +249,10 @@ int get_num_procs(void) { #if !defined(OS_LINUX) return nums; #endif +#if defined(USE_OPENMP) + if (omp_get_proc_bind() != omp_proc_bind_false) + return nums; +#endif #if !defined(__GLIBC_PREREQ) return nums; @@ -1809,6 +1813,10 @@ int get_num_procs(void) { #if !defined(OS_LINUX) return nums; #endif +#if defined(USE_OPENMP) + if (omp_get_proc_bind() != omp_proc_bind_false) + return nums; +#endif #if !defined(__GLIBC_PREREQ) return nums;