Browse Source

Update common_thread.h

pull/2992/head
Martin Kroeker GitHub 5 years ago
parent
commit
4639c9ae4e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      common_thread.h

+ 4
- 1
common_thread.h View File

@@ -140,7 +140,10 @@ static __inline int num_cpu_avail(int level) {

#ifdef USE_OPENMP
int openmp_nthreads=omp_get_max_threads();
if (openmp_nthreads > MAX_CPU_NUMBER) openmp_nthreads=MAX_CPU_NUMBER;
if (openmp_nthreads > MAX_CPU_NUMBER) {
openmp_nthreads=MAX_CPU_NUMBER;
fprintf(stderr,"thread count limited to compile-time max %d\n",MAX_CPU_NUMBER);
}
#endif

#ifndef USE_OPENMP


Loading…
Cancel
Save