[R-sig-hpc] RhpcBLASctl: turn off restriction of BLAS/OMP threads

Scott Ritchie sritchie73 at gmail.com
Tue May 10 03:20:29 CEST 2016


Hi all,

I have written a function where I restrict the number of BLAS and OpenMP
threads to 1 using the functions available in the `RhpcBLASctl` package:

```
omp_set_num_threads(1)
blas_set_num_threads(1)
```

I would like to revert this at the end of the function so that calls to
BLAS from other functions/packages are unaffected by this, but I could not
find documentation on the correct way to do this.

Is:

```
omp_set_num_threads(NULL)
blas_set_num_threads(NULL)
```

Correct? Or should I be setting the number of threads to the number of
logical processors, i.e. `get_num_procs()`?

Thanks,

-- 
Scott Ritchie,
Ph.D. Student | Integrative Systems Biology | Pathology |
http://www.inouyelab.org
The University of Melbourne
---

	[[alternative HTML version deleted]]



More information about the R-sig-hpc mailing list