[R] Regarding Issue Running Parallel Computing on Linux RHEL version 8

Ivan Krylov |kry|ov @end|ng |rom d|@root@org
Tue Jan 14 20:48:43 CET 2025


В Tue, 14 Jan 2025 14:23:54 +0000
"Huseni, Sadamhusen" <Sadamhusen.Huseni using genpact.com> пишет:

> ###***Session information from Linux version 8
> R version 4.4.1 (2024-06-14)
> Platform: x86_64-redhat-linux-gnu
> Running under: Red Hat Enterprise Linux 8.10 (Ootpa)
>  
> Matrix products: default
> BLAS/LAPACK: /usr/lib64/libopenblaso-r0.3.15.so;  LAPACK version 3.9.0
 
> ###***Session information from Linux version 7
> 
> R version 3.6.0 (2019-04-26)
> Platform: x86_64-redhat-linux-gnu (64-bit)
> Running under: Red Hat Enterprise Linux
>  
> Matrix products: default
> BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so

On RHEL 7, R was using the reference BLAS (linear algebra library).
On RHEL 8, R is using OpenBLAS compiled with OpenMP support. It is
probably creating its own threads, one per CPU, in every child process,
which gives you N^2 processes contending for N CPUs.

Try running your script with the environment variable
OPENBLAS_NUM_THREADS set to the string "1".

It might be possible to speed up the script by setting
OPENBLAS_NUM_THREADS=2 and dividing the number of child processes by
the same number.

-- 
Best regards,
Ivan



More information about the R-help mailing list