Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Current »

This part below is out-dated

Running R from SLURM

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 is executable (chmod +x and begins with the line

#!/usr/bin/env Rscript

Installing packages within R

To allow proper compilation with Intel compilers, create the ~/.R/Makevars file with the following content:


Packages requiring libcurl

Libcurl is available via the curl module. Just load it before running R with

module load curl

Installing SparkR

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

devtools::install_github('apache/spark@v2.0.2', subdir='R/pkg')

  • No labels