Access rstudio server https://rstudio.camh.ca/
We recommand using chrome browser, using your SCC account to log in
Submit job to slurm
press Alt+Shift+R or click Tools → Terminal → New Terminal
type
sbatch your_scripts
Run job from the command line
sbatch -J myjob --mem=64G -t 24:00:00 -o myjob.slurm.log --wrap="Rscript myscript.R"
Sample job scripts
Sample job scripts
- suppose your R script name is test.R
edit a file named myR.slurm with the following content:
#!/bin/bash -l #SBATCH --job-name=serial_job_test # Job name #SBATCH --mail-type=END,FAIL # Mail events (NONE, BEGIN, END, FAIL, ALL) #SBATCH --mail-user=email@camh.ca # Where to send mail #SBATCH --ntasks=1 # Run on a single CPU #SBATCH --mem=128gb # Job memory request #SBATCH --time=24:00:00 # Time limit hrs:min:sec #SBATCH --output=serial_test_%j.log # Standard output and error log pwd; hostname; date
module load lang/R/4.0.3-Python-3.8.5-Anaconda3-2020.11
Rscripts test.R
Then on the terminal run the following:
sbatch myR.slurm