Hi Jure, I have experienced similar issues in the past. I think this depends on the R library you use for parallelization but I don't remember the details.
I suggest that you also define OPENBLAS_NUM_THREADS with the same value as OMP_NUM_THREADS. Defining both env vars with the same value shouldn't hurt and In theory openblas won't respect the value of OMP_NUM_THREADS unless it has been compiled with USE_OPENMP=1 which I think it's not the case in foss/2016b (see https://github.com/hpcugent/easybuild-easyconfigs/blob/master/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-5.4.0-2.26-LAPACK-3.6.1.eb ) Also see here https://github.com/xianyi/OpenBLAS#usages regards, Pablo. 2017-02-02 13:20 GMT+01:00 Jure Pečar <[email protected]>: > > Hi all, > > I have here R-3.3.1 built with foss-2016b. Ganglia showed me lots of red > on the nodes where this R is running. I found out that by default this R > will spawn number of threads equal to number of cpus on the node (does this > come from openblas?), irregardless of what slurm is limiting the job to. > So I prepared some prolog scripts that set OMP_NUM_THREADS based on > --cpus-per-task and did some testing with http://r.research.att.com/ > benchmarks/R-benchmark-25.R > These are the numbers: > cores > 1 37.77user 0.93system 0:39.49elapsed 98%CPU > 2 39.70user 5.83system 0:36.90elapsed 123%CPU > 4 42.12user 12.13system 0:34.71elapsed 156%CPU > 8 46.62user 25.82system 0:33.80elapsed 214%CPU > 16 52.83user 53.06system 0:33.29elapsed 318%CPU > Trend is obvious ... > > I want to know is this is expected R behaviour, since my experience with > it is limited. Also my google-fu for single letter things is limited, so I > would appreciate any pointers to articles I have to read or experience you > can share. Thanks. > > > -- > > Jurij Pečar > HPC Engineer, IT Operations, IT Services > EMBL Heidelberg, Meyerhofstraße 1, 69117, Heidelberg, Germany > Room 13-401 > -- Pablo Escobar López HPC systems engineer sciCORE, University of Basel SIB Swiss Institute of Bioinformatics http://scicore.unibas.ch

