/
Parallelism with R

Parallelism with R

This page is a work in progress, but please note that the detectCores method from the parallel 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)))

 

Related content

File Mage (SFTP)
File Mage (SFTP)
Read with this
Parallelism with R
Parallelism with R
More like this
SSH connections
SSH connections
Read with this
Submitting an R SBATCH Job Script
Submitting an R SBATCH Job Script
More like this
Why Isn't My Code Running Faster?
Why Isn't My Code Running Faster?
Read with this
Creating an Interactive RStudio Session
Creating an Interactive RStudio Session
More like this