MATLAB

From FarmShare

Revision as of 13:36, 18 January 2012 by Chekh (Talk | contribs)
Jump to: navigation, search

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

Personal tools
Toolbox
LANGUAGES