Skip to content
Prev 2028 / 2152 Next

RhpcBLASctl: turn off restriction of BLAS/OMP threads

Hi,

# save orignal threads
old_max_threads <- omp_get_max_threads()
old_blas_threads <- blas_get_num_procs()

# Control number of threads
omp_set_num_threads(1)
blas_set_num_threads(1)

# Work of purpose
boofoo()

# Restore the settings
omp_set_num_threads(old_max_threads)
blas_set_num_threads(old_blas_threads)

get_num_procs is not good if operated at under the PBS(etc...)

2016-05-10 10:20 GMT+09:00 Scott Ritchie <sritchie73 at gmail.com>: