Created
August 27, 2015 18:24
-
-
Save wtbarnes/48472e6e62e9e90f2517 to your computer and use it in GitHub Desktop.
shell script for running MATLAB non-interactively through PBS/TORQUE. From kodiak.baylor.edu
This file contains 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 -S /bin/bash | |
#PBS -l nodes=1:ppn=1 | |
# This script allows the user to execute a Matlab .m file using the Torque batch | |
# system. | |
# How to run this script in batch: $ qsub -v prog=myMatlabProgram.m ./run_matlab.sh | |
cd $PBS_O_WORKDIR | |
echo "Current working directory is now: " `pwd` | |
echo "Starting MATLAB at `date`" | |
# Be sure to include a "quit;" as the last line of the .m file. | |
echo "### prog = $prog ###" | |
# Deleted -nojvm to attempt matlabpool | |
/usr/local/bin/matlab -nodisplay -nodesktop -nojvm -nosplash -singleCompThread < $prog | |
echo "MATLAB run completed at `date`" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment