#!/bin/csh # this script is a qsub companion script that's written to handle # both single and Array Jobs (-t) option for MATLAB PCT batch jobs. # Usage: # scc1$ qsub -V ./run_matlab_pct_job # SGE_TASK_ID = 1 # scc1$ qsub -V -t 3 ./run_matlab_pct_job # SGE_TASK_ID = 3 # scc1$ qsub -V -t 4-6 ./run_matlab_pct_job # SGE_TASK_ID = [4,5,6] # Requires RCS MATLAB utilities. Add this line to your startup.m # addpath(genpath('/project/scv/examples/matlab/RCS_utils'),'-begin') # # Specify SGE batch scheduler options # Merge output and error files in one #$ -j y # Send email to SCC userID when job finished or aborted #$ -m ae # Request 4 cores from omp queue (example needs multicores) # For serial apps, prepend the line below with another # #$ -pe omp 4 echo "\n\n********************************************" echo "* This job runs on compute node $HOSTNAME" echo "********************************************\n\n" set NODENAME = `echo $HOSTNAME | sed 's/.scc.bu.edu//'` matlab -nodisplay -r "runBatchJob; exit"