This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
guides:slurm:using-r [23.09.2019 11:12] Teemu Kuulasmaa |
guides:slurm:using-r [18.10.2024 14:10] (current) Administrator |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | # Using R with SLURM | + | # Using R with Slurm |
Example script (**hello.R**): | Example script (**hello.R**): | ||
Line 24: | Line 24: | ||
#SBATCH --time 5 # Runtime in minutes. | #SBATCH --time 5 # Runtime in minutes. | ||
#SBATCH --mem=2000 # | #SBATCH --mem=2000 # | ||
- | #SBATCH --partition | + | #SBATCH --partition |
#SBATCH --output hello.out # Standard out goes to this file | #SBATCH --output hello.out # Standard out goes to this file | ||
#SBATCH --error hello.err # Standard err goes to this file | #SBATCH --error hello.err # Standard err goes to this file | ||
Line 30: | Line 30: | ||
#SBATCH --mail-type ALL # ALL will alert you of job beginning, completion, failure etc | #SBATCH --mail-type ALL # ALL will alert you of job beginning, completion, failure etc | ||
- | module load r # load modules | + | module load r/ |
Rscript hello.R # Execute the script | Rscript hello.R # Execute the script | ||
``` | ``` | ||
- | The last step is to submit the job to the compute queue with the **[sbatch](https:// | + | The last step is to submit the job to the compute queue with the **[sbatch](https:// |
``` | ``` | ||
sbatch scriptR.sbatch | sbatch scriptR.sbatch | ||
``` | ``` |