Browse Source

Check if OMP_PLACES=threads is set in the environment

pull/2707/head
Martin Kroeker GitHub 5 years ago
parent
commit
c00ef002e3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      driver/others/openblas_env.c

+ 7
- 0
driver/others/openblas_env.c View File

@@ -39,6 +39,7 @@ static int openblas_env_block_factor=0;
static int openblas_env_openblas_num_threads=0;
static int openblas_env_goto_num_threads=0;
static int openblas_env_omp_num_threads=0;
static int openblas_env_omp_places_threads=0;

int openblas_verbose() { return openblas_env_verbose;}
unsigned int openblas_thread_timeout() { return openblas_env_thread_timeout;}
@@ -46,6 +47,7 @@ int openblas_block_factor() { return openblas_env_block_factor;}
int openblas_num_threads_env() { return openblas_env_openblas_num_threads;}
int openblas_goto_num_threads_env() { return openblas_env_goto_num_threads;}
int openblas_omp_num_threads_env() { return openblas_env_omp_num_threads;}
int openblas_omp_places_threads_env() { return openblas_env_omp_places_threads;}

void openblas_read_env() {
int ret=0;
@@ -79,6 +81,11 @@ void openblas_read_env() {
if(ret<0) ret=0;
openblas_env_omp_num_threads=ret;

ret=0;
if (readenv(p,"OMP_PLACES")) ret = !strncasecmp(p,"threads",7);
if(ret<0) ret=0;
openblas_env_omp_places_threads=ret;

}



Loading…
Cancel
Save