Search Docs by Keyword
R Parallel
Description
Here, we briefly explain different ways to use R in parallel on the FASRC Cannon cluster. The best place for information on R Parallel is our training session:
Parallel computing may be necessary to speed up a code or to deal with large datasets. It can divide the workload into chunks and each worker (i.e. core) will take one chunk. The goal of using parallel computing is to reduce the total computational time by having each worker process its workload in parallel with other workers.
Usage
Request an interactive node
salloc -p test --time=0:30:00 --mem=4000
Load required software modules.
# Compiler, MPI, and R libraries
module load gcc/9.3.0-fasrc01 openmpi/4.0.5-fasrc01 R/4.0.5-fasrc02
Examples
User Codes has a summary of R parallel packages that can be used on Cannon. You can find a complete list of available packages at CRAN.
- Working with large data that does not fit into memory
- Processing Single instruction multiple data problem on shared and distributed memory systems
-
Package
parallel
- FAS RC embarrassingly parallel documentation
- FAS RC embarrassingly parallel Cannon example (using
parLapply
) - FAS RC Embarrassingly parallel VDI example (using
parLapply
) - parallel documentation
-
Package
future
- Install future on Cannon
- Example of
multisession
(not shared memory) andmulticore
(shared memory) and its submit script - future documentation
-
Package
Rmpi
-
Package
pbdMPI
(programming big data MPI)- Install pbdMPI on Cannon
- Examples based on the
pbdMPI
demos – after installingpbdMPI
package, all demos can be found in your R library folder$HOME/apps/R/4.0.5/pbdMPI/demo
- pbdMPI documentation and GitHub
- pbdR website
Using nested futures and package future.batchtools
, we can perform a multi-node and multi-core job.
- Package
future
andfuture.batchtools
- For R basics, refer to R-Basics
- For R package installations, refer to:
- General package installs: R-Packages
- Packages sp, rgdal, rgeos, sf, and INLA
- Packages ENMTools, ecospat, raster, rJava
- Package rstan
- Parallel R:
- HPC @ Louisiana State University training materials
- HPC @ Norwegian University of Science and Technology training materials
- R Programming for Data Science by Roger D. Peng.
- HPC @ University of Maryland, Baltimore County training materials