Fixed #10. Supported GOTO_NUM_THREADS & GOTO_THREADS_TIMEOUT environment variables.
This commit is contained in:
@@ -581,6 +581,7 @@ void gotoblas_affinity_init(void) {
|
||||
numprocs = 0;
|
||||
#else
|
||||
numprocs = readenv("OPENBLAS_NUM_THREADS");
|
||||
if (numprocs == 0) numprocs = readenv("GOTO_NUM_THREADS");
|
||||
#endif
|
||||
|
||||
if (numprocs == 0) numprocs = readenv("OMP_NUM_THREADS");
|
||||
@@ -666,7 +667,7 @@ void gotoblas_affinity_init(void) {
|
||||
|
||||
setup_mempolicy();
|
||||
|
||||
if (readenv("OPENBLAS_MAIN_FREE")) {
|
||||
if (readenv("OPENBLAS_MAIN_FREE") || readenv("GOTOBLAS_MAIN_FREE")) {
|
||||
sched_setaffinity(0, sizeof(cpu_orig_mask), &cpu_orig_mask[0]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user