This is an example to run a serial job on Greenfield using PBS:
#!/bin/csh
# Request 15 cores
# Note that this means the job will be allocated 750GB of memory
#PBS -l nodes=1:ppn=15
# Request 5 minutes of cpu time
#PBS -l walltime=30:00
# Combine standard output and error into one file
#PBS -j oe
set echo
cd $PBS_O_WORKDIR
module load R/3.2.1-mkl
# run my executable
R --vanilla --slave CMD BATCH ./example.R
And here is an example of “packing” several runs in one job,
so that they all run simultaneously. The output files should be all named different:
#!/bin/csh
# Request 15 cores
# Note that this means the job will be allocated 750GB of memory
#PBS -l nodes=1:ppn=15
# Request 5 minutes of cpu time
#PBS -l walltime=30:00
# Combine standard output and error into one file
#PBS -j oe
set echo
cd $PBS_O_WORKDIR
# Define where /tmp files will be written
setenv TMPDIR $PBS_O_WORKDIR
module load R/3.2.1-mkl
# run my executable
numactl -C +0 R --vanilla --slave CMD BATCH ./example0.R &
numactl -C +1 R --vanilla --slave CMD BATCH ./example1.R &
numactl -C +2 R --vanilla --slave CMD BATCH ./example2.R &
numactl -C +3 R --vanilla --slave CMD BATCH ./example3.R &
numactl -C +4 R --vanilla --slave CMD BATCH ./example4.R &
numactl -C +5 R --vanilla --slave CMD BATCH ./example5.R &
numactl -C +6 R --vanilla --slave CMD BATCH ./example6.R &
numactl -C +7 R --vanilla --slave CMD BATCH ./example7.R &
numactl -C +8 R --vanilla --slave CMD BATCH ./example8.R &
numactl -C +9 R --vanilla --slave CMD BATCH ./example9.R &
numactl -C +10 R --vanilla --slave CMD BATCH ./example10.R &
numactl -C +11 R --vanilla --slave CMD BATCH ./example11.R &
numactl -C +12 R --vanilla --slave CMD BATCH ./example12.R &
numactl -C +13 R --vanilla --slave CMD BATCH ./example13.R &
numactl -C +14 R --vanilla --slave CMD BATCH ./example14.R &
wait
No comments:
Post a Comment