Parallelism with R

The detectCores method from the parallel R library will not work as intended for jobs that request anything less than a full node.

For instance, R scripts that look like this:

library(parallel) cluster = makeCluster(detectCores())

Should be replaced with

library(parallel) cluster = makeCluster(strtoi(system("nproc",intern=TRUE)))

Â