From b14f44d2adbe1ec8ede0cdf06fb8b09f3c4b6e43 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Thu, 19 Jul 2018 08:57:56 +0200 Subject: [PATCH] Temporarily disable special handling of OPENMP thread memory allocation for issue #1673 --- driver/others/memory.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/driver/others/memory.c b/driver/others/memory.c index 98bcfb216..772c1f232 100644 --- a/driver/others/memory.c +++ b/driver/others/memory.c @@ -140,7 +140,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #endif #ifndef BUFFERS_PER_THREAD -#ifdef USE_OPENMP +#ifdef USE_OPENMP_UNUSED #define BUFFERS_PER_THREAD (MAX_CPU_NUMBER * 2 * MAX_PARALLEL_NUMBER) #else #define BUFFERS_PER_THREAD NUM_BUFFERS @@ -363,7 +363,7 @@ int blas_get_cpu_number(void){ #endif // blas_goto_num = 0; -#ifndef USE_OPENMP +#ifndef USE_OPENMP_UNUSED blas_goto_num=openblas_num_threads_env(); if (blas_goto_num < 0) blas_goto_num = 0; @@ -494,7 +494,7 @@ static const int allocation_block_size = BUFFER_SIZE + sizeof(struct alloc_t); #endif /* Holds pointers to allocated memory */ -#if defined(SMP) && !defined(USE_OPENMP) +#if defined(SMP) && !defined(USE_OPENMP_UNUSED) /* This is the number of threads than can be spawned by the server, which is the server plus the number of threads in the thread pool */ # define MAX_ALLOCATING_THREADS MAX_CPU_NUMBER * 2 * MAX_PARALLEL_NUMBER +1 @@ -532,7 +532,7 @@ static BLASULONG alloc_lock = 0UL; /* Returns a pointer to the start of the per-thread memory allocation data */ static __inline struct alloc_t ** get_memory_table() { -#if defined(SMP) && !defined(USE_OPENMP) +#if defined(SMP) && !defined(USE_OPENMP_UNUSED) # if !defined(HAS_COMPILER_TLS) # if defined(OS_WINDOWS) int local_memory_table_pos = (int)::TlsGetValue(local_storage_key); @@ -1057,7 +1057,7 @@ static volatile int memory_initialized = 0; /* 2 : Thread */ static void blas_memory_init(){ -#if defined(SMP) && !defined(USE_OPENMP) +#if defined(SMP) && !defined(USE_OPENMP_UNUSED) next_memory_table_pos = 0; # if !defined(HAS_COMPILER_TLS) # if defined(OS_WINDOWS)