R is compiled with Intel Compilers and MKL.
The SLURM script calling an R script should look like this:
#!/bin/bash -l #SBATCH --nodes 1 #SBATCH --ntasks 1 #SBATCH --cpus-per-task 1 #SBATCH --mem 60000 #SBATCH --time 00:05:00 echo STARTING AT `date` module purge module load intel intel-mkl module load R srun R CMD BATCH ./rscript.R echo FINISHED at `date` |
...where rscript.sh
is executable (chmod +x rscript.sh
) and begins with the line
#!/usr/bin/env Rscript |
To allow proper compilation with Intel compilers, create the ~/.R/Makevars file with the following content:
CC=icc CXX=icpc FC=ifort F77=ifort |
Libcurl is available via the curl module. Just load it before running R with
module load curl |
You will first need to load the following modules
module load intel intel-mkl module load R curl spark |
Then, you can launch R and do the following
install.packages("devtools") devtools::install_github('apache/spark@v2.0.2', subdir='R/pkg') |