openblas_set_num_threads: openblas_set_num_threads

Description Usage Arguments Details Value

View source: R/openblas_set_num_threads.r

Description

Set the number of threads for OpenBLAS to use. Operates via side-effects.

Usage

1

Arguments

num_threads

An integer number of threads to use.

Details

OpenBLAS stores the number of threads to use as a global variable. It will read the value of the environment variable OMP_NUM_THREADS (if one is provided) when the calling process (in this case R) starts, and thereafter ignore it. This means you can't simply call R's Sys.setenv() to modify OMP_NUM_THREADS. Nor can you call the C OpenMP function omp_set_num_threads() (at least at the time of writing) to update this global value. So for example, the CRAN package OpenMPController will not work with OpenBLAS.

Value

An invisible NULL.


wrathematics/openblasctl documentation built on March 30, 2020, 6:47 p.m.