Difference between revisions of "R Job Script"

From UFRC
Jump to navigation Jump to search
m (Moskalenko moved page R PBS to R Job Script)
Line 1: Line 1:
 +
[[R|back to the main R page]]
 +
 
<source lang=bash>
 
<source lang=bash>
 
#!/bin/bash
 
#!/bin/bash
#PBS -N R-demo
+
#SBATCH --job-name=prime_threaded  #Job name
#PBS -M YOUREMAIL@ufl.edu
+
#SBATCH --mail-type=ALL  # Mail events (NONE, BEGIN, END, FAIL, ALL)
#PBS -m abe
+
#SBATCH --mail-user=ENTER_YOUR_EMAIL_HERE  # Where to send mail
#PBS -o R_demo.$PBS_JOBID.out
+
#SBATCH --cpus-per-task=4  # Number of cores for multi-threaded ojbs
#PBS -j oe
+
#SBATCH --mem-per-cpu=1gb   # Per processor memory
#PBS -l nodes=1:ppn=1
+
#SBATCH -t 00:05:00   # Walltime
#PBS -l pmem=1gb
+
#SBATCH -o prime_threaded.%j.out  # Name output file
#PBS -l walltime=00:05:00
 
#Change to the current working directory if inside a job
 
if [[ -d $PBS_O_WORKDIR ]]; then cd $PBS_O_WORKDIR; fi
 
  
 
#Record the time and compute node the job ran on
 
#Record the time and compute node the job ran on
date; hostname
+
date; hostname; pwd
 
#Use modules to load the environment for R
 
#Use modules to load the environment for R
 
module load R
 
module load R

Revision as of 22:20, 20 July 2016

back to the main R page

#!/bin/bash
#SBATCH --job-name=prime_threaded   #Job name	
#SBATCH --mail-type=ALL   # Mail events (NONE, BEGIN, END, FAIL, ALL)
#SBATCH --mail-user=ENTER_YOUR_EMAIL_HERE   # Where to send mail	
#SBATCH --cpus-per-task=4   # Number of cores for multi-threaded ojbs
#SBATCH --mem-per-cpu=1gb   # Per processor memory
#SBATCH -t 00:05:00   # Walltime
#SBATCH -o prime_threaded.%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