From 4639c9ae4e098a234db985695c7546a8014b47d6 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 17 Nov 2020 18:49:59 +0100 Subject: [PATCH] Update common_thread.h --- common_thread.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common_thread.h b/common_thread.h index ce68da7c8..18ddcf6a7 100644 --- a/common_thread.h +++ b/common_thread.h @@ -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