Merge pull request #1688 from martin-frbg/issue1673

Temporarily disable special handling of OPENMP thread memory allocation
This commit is contained in:
Martin Kroeker 2018-07-19 19:03:45 +02:00 committed by GitHub
commit 7ba5936ecd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -140,7 +140,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif #endif
#ifndef BUFFERS_PER_THREAD #ifndef BUFFERS_PER_THREAD
#ifdef USE_OPENMP #ifdef USE_OPENMP_UNUSED
#define BUFFERS_PER_THREAD (MAX_CPU_NUMBER * 2 * MAX_PARALLEL_NUMBER) #define BUFFERS_PER_THREAD (MAX_CPU_NUMBER * 2 * MAX_PARALLEL_NUMBER)
#else #else
#define BUFFERS_PER_THREAD NUM_BUFFERS #define BUFFERS_PER_THREAD NUM_BUFFERS
@ -363,7 +363,7 @@ int blas_get_cpu_number(void){
#endif #endif
// blas_goto_num = 0; // blas_goto_num = 0;
#ifndef USE_OPENMP #ifndef USE_OPENMP_UNUSED
blas_goto_num=openblas_num_threads_env(); blas_goto_num=openblas_num_threads_env();
if (blas_goto_num < 0) blas_goto_num = 0; 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 #endif
/* Holds pointers to allocated memory */ /* 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 /* 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 */ server plus the number of threads in the thread pool */
# define MAX_ALLOCATING_THREADS MAX_CPU_NUMBER * 2 * MAX_PARALLEL_NUMBER * 2 # define MAX_ALLOCATING_THREADS MAX_CPU_NUMBER * 2 * MAX_PARALLEL_NUMBER * 2
@ -532,7 +532,7 @@ static BLASULONG alloc_lock = 0UL;
/* Returns a pointer to the start of the per-thread memory allocation data */ /* Returns a pointer to the start of the per-thread memory allocation data */
static __inline struct alloc_t ** get_memory_table() { 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(HAS_COMPILER_TLS)
# if defined(OS_WINDOWS) # if defined(OS_WINDOWS)
int local_memory_table_pos = (int)::TlsGetValue(local_storage_key); int local_memory_table_pos = (int)::TlsGetValue(local_storage_key);
@ -1057,7 +1057,7 @@ static volatile int memory_initialized = 0;
/* 2 : Thread */ /* 2 : Thread */
static void blas_memory_init(){ static void blas_memory_init(){
#if defined(SMP) && !defined(USE_OPENMP) #if defined(SMP) && !defined(USE_OPENMP_UNUSED)
next_memory_table_pos = 0; next_memory_table_pos = 0;
# if !defined(HAS_COMPILER_TLS) # if !defined(HAS_COMPILER_TLS)
# if defined(OS_WINDOWS) # if defined(OS_WINDOWS)