[R-pkg-devel] Setting OpenMP threads (globally) for an R package

Iñaki Ucar |uc@r @end|ng |rom |edor@project@org
Mon Mar 21 10:32:04 CET 2022


On Fri, 18 Mar 2022 at 06:33, Simon Urbanek <simon.urbanek using r-project.org> wrote:
>
> > On Mar 18, 2022, at 6:10 PM, Evan Biederstedt <evan.biederstedt using gmail.com> wrote:
> > There is some connection to setting  `export OMP_NUM_THREADS=1` before starting R, and moderate memory usage; that's all I know.
>
> That's odd. OpenMP itself doesn't allocate memory, so that's why I said it shouldn't be related.

Evan didn't share the sessionInfo() output, so my guess is that the
threaded version of OpenBLAS is being used, and, oddly enough, this
honours OMP flags. See https://github.com/xianyi/OpenBLAS/issues/2985

-- 
Iñaki Úcar



More information about the R-package-devel mailing list