.onAttach {spectral} | R Documentation |
Setting up multithread BLAS library
Description
The number of used cores is set to RhpcBLASctl::get_num_cores()
on the
attach event of the package.
Usage
.onAttach(libname, pkgname)
Arguments
libname |
a character string giving the library directory where the package defining the namespace was found. |
pkgname |
a character string giving the name of the package. |
Details
The algebra system of R relies on a BLAS library
which can be set to use many threads / cores. This
feature is considered as experimental since there are many differences across
the operating systems R is running on. If there is an issue and there is a need
to run R in multi-thread mode, consider to install
a different optimized version of BLAS.
If necessary, the number of cores required can also be changed manually
by calling blas_set_num_threads(nCores)
and
omp_set_num_threads(nCores)
.
This function is invoked automatically