Last active
November 3, 2015 14:38
-
-
Save explodecomputer/46cea01f64c501ddcb0c to your computer and use it in GitHub Desktop.
Example submission script for bluecrystal3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#PBS -N test | |
#PBS -o test-output | |
#PBS -e test-error | |
#PBS -t 1-500 | |
#PBS -l walltime=5:00:00 | |
#PBS -l nodes=1:ppn=1 | |
#PBS -S /bin/bash | |
set -e | |
echo "Running on ${HOSTNAME}" | |
# If there is an argument passed at commandline then set PBS_ARRAYID as that | |
# Else, PBS_ARRAYID is either empty if run in commandline, | |
# or set by the job scheduler if run by qsub | |
if [ -n "${1}" ]; then | |
echo "${1}" | |
PBS_ARRAYID=${1} | |
fi | |
i=${PBS_ARRAYID} | |
# Analysis | |
R --no-save --args ${i} < test.R |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pass arguments from shell to R | |
arguments <- commandArgs(T) | |
i <- as.numeric(arguments[1]) | |
print(i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To run a test (e.g. for process 1 of 500) in the frontend of bluecrystal, type:
Otherwise just submit and it will make 500 jobs