#!/bin/bash -l # Companion qsub script for single-core MATLAB batch job # Usage examples: # scc1$ qsub ./run_matlab_job 5 # compute rand(5) # Specify qsub options # Merge output and error files in one #$ -j y # Send email to SCC userID when job finished or aborted #$ -m ae # Give the job(s) a name #$ -N myJobs # Load newest version of matlab on SCC module load matlab # preset environmental variable n; passed to MATLAB matlab -nodisplay -singleCompThread -r "rand($1), exit"