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
Unable to login or login slow
user did not exit correctly or not exit , so rstudio try to restore the old stuff, so we recommand every time exit rstudio after your job finished
if you can not login or login is slow, please try the following solution
try to find the two folder at your home
~/rstudio
~/.local/share/rstudio
and rename or deleted it and try login again ( you can login in to jupyter.camh.ca or using mobaxterm to do the above).