Difference between revisions of "R Job Script"
Jump to navigation
Jump to search
Moskalenko (talk | contribs) |
Moskalenko (talk | contribs) |
||
Line 4: | Line 4: | ||
<source lang=bash> | <source lang=bash> | ||
#!/bin/bash | #!/bin/bash | ||
− | #SBATCH --job-name= | + | #SBATCH --job-name=R_test #Job name |
− | #SBATCH --mail-type= | + | #SBATCH --mail-type=END,FAIL # Mail events (NONE, BEGIN, END, FAIL, ALL) |
#SBATCH --mail-user=ENTER_YOUR_EMAIL_HERE # Where to send mail | #SBATCH --mail-user=ENTER_YOUR_EMAIL_HERE # Where to send mail | ||
− | #SBATCH -- | + | #SBATCH --ntasks=1 |
− | #SBATCH --mem | + | #SBATCH --mem=1gb # Per processor memory |
− | #SBATCH - | + | #SBATCH --time=00:05:00 # Walltime |
− | #SBATCH - | + | #SBATCH --output=r_job.%j.out # Name output file |
− | |||
#Record the time and compute node the job ran on | #Record the time and compute node the job ran on | ||
date; hostname; pwd | date; hostname; pwd | ||
Line 20: | Line 19: | ||
Rscript myRscript.R | Rscript myRscript.R | ||
</source> | </source> | ||
+ | |||
+ | date |
Revision as of 15:08, 24 July 2017
#!/bin/bash
#SBATCH --job-name=R_test #Job name
#SBATCH --mail-type=END,FAIL # Mail events (NONE, BEGIN, END, FAIL, ALL)
#SBATCH --mail-user=ENTER_YOUR_EMAIL_HERE # Where to send mail
#SBATCH --ntasks=1
#SBATCH --mem=1gb # Per processor memory
#SBATCH --time=00:05:00 # Walltime
#SBATCH --output=r_job.%j.out # Name output file
#Record the time and compute node the job ran on
date; hostname; pwd
#Use modules to load the environment for R
module load gcc R
#Run R script
Rscript myRscript.R
date