mkdocs-rc-docs
mkdocs-rc-docs copied to clipboard
Advanced jobscripts
Possibly should put these in an advanced jobscripts section?
Useful environment variables that can be used in more complicated scripts
Eg $SGE_O_WORKDIR
, $JOB_ID
, $SGE_TASK_ID
, $NSLOTS
, $NHOSTS
The reusable jobscript where the input files are passed in on the command line:
qsub -v infile=`pwd`/myMatlabJob.m,addinfiles=`pwd`/initialise.m:`pwd`/analyse.m run-matlab.sh
where the script does
cp $infile .
Matlab_infile=`basename $infile`
for file in `echo $addinfiles | tr ':' ' '`
do
cp $file .
done
matlab -nosplash -nodesktop -nodisplay < $Matlab_infile
Submitting a chain of jobs with dependencies
Getting the job ID at submit time so it can be passed on to the next. qsub -terse