MATLAB
From FarmShare
example single matlab file run via qsub
Here's our helloworld.m:
disp('Hello World');
Here's a command to run that.
/afs/ir.stanford.edu/software/matlab-2011b/bin/matlab -nodesktop < helloworld.m
We want to run this same command via the job scheduling system. Let's write a job script.
$ cat matlab_example.script #!/bin/bash #$ -N matlab_example #$ -m bes #$ -M chekh@stanford.edu /afs/ir.stanford.edu/software/matlab-2011b/bin/matlab -nodesktop < /afs/ir/users/c/h/chekh/helloworld.m
Submit the script:
qsub matlab_example.script
Look at the job status:
qstat
You should get output files like matlab_example.script.eXXXXX and matlab_example.script.oXXXXX