sched_getaffinity will not return all accessible cores with OMP_PROC_BIND

This commit is contained in:
Martin Kroeker 2021-11-02 23:51:51 +01:00 committed by GitHub
parent abf45f7235
commit 46cc347633
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -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;