Difference between revisions of "R Job Script"

From UFRC
Jump to navigation Jump to search
 
(3 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
<source lang=bash>
 
<source lang=bash>
 
#!/bin/bash
 
#!/bin/bash
#SBATCH --job-name=prime_threaded   #Job name
+
#SBATCH --job-name=R_test   #Job name
#SBATCH --mail-type=ALL   # Mail events (NONE, BEGIN, END, FAIL, ALL)
+
#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 --cpus-per-task=4  # Number of cores for multi-threaded ojbs
+
#SBATCH --ntasks=1
#SBATCH --mem-per-cpu=1gb  # Per processor memory
+
#SBATCH --mem=1gb  # Per processor memory
#SBATCH -t 00:05:00  # Walltime
+
#SBATCH --time=00:05:00  # Walltime
#SBATCH -o prime_threaded.%j.out  # Name output file  
+
#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 19: Line 18:
 
#Run R script  
 
#Run R script  
 
Rscript myRscript.R
 
Rscript myRscript.R
 +
 +
date
 
</source>
 
</source>

Latest revision as of 15:47, 19 November 2018

back to the main R page

#!/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 R

#Run R script 
Rscript myRscript.R

date