MATLAB DCS

From UABgrid Documentation
(Difference between revisions)
Jump to: navigation, search
(Steps to run Matlab: add check on job steps)
(Steps to run Matlab)
Line 4: Line 4:
  
 
Once you log into Cheaha, set up your environment with the command:
 
Once you log into Cheaha, set up your environment with the command:
 
+
<pre>
 
module load mathworks/matlab-r2009a
 
module load mathworks/matlab-r2009a
 
+
</pre>
You can run MatLab and access your license server with
+
As a test, you can run MatLab and access your license server with
 
+
<pre>
 
matlab -c port@license-server -nodesktop
 
matlab -c port@license-server -nodesktop
 
+
</pre>
 
This will start matlab in an interactive shell.  This is good just to  
 
This will start matlab in an interactive shell.  This is good just to  
verify things work, but running significant computations on Cheaha is
+
verify things work, but do not run any significant computations on the Cheaha  
best done in batch mode via the SGE scheduler
+
head node. MatLab computational work needs to be run on the compute nodes
 +
by submitting a job submission script to the SGE scheduler
  
You can create a simple SGE script with:
+
You can create a simple SGE script with (this example requests 1 cpu core / slot):
 
+
<pre>
#$ -S /bin/bash
+
#$ -S /bin/bash
#$ -cwd
+
#$ -cwd
#
+
#
#$ -N testMatLab
+
#$ -pe matlab 1
#$ -l h_rt=2:00:00,s_rt=1:55:00
+
#$ -N testMatLab
#$ -j y
+
#$ -l h_rt=2:00:00,s_rt=1:55:00
#
+
#$ -j y
#$ -M tjannett@uab.edu
+
#
#$ -m eas
+
#$ -M tjannett@uab.edu
#
+
#$ -m eas
module load mathworks/matlab-r2009a
+
#
#$ -V
+
module load mathworks/matlab-r2009a
 +
#$ -V
 
   
 
   
matlab -c port@license-server -nodesktop -r matlab-script
+
matlab -c port@license-server -nodesktop -r matlab-script
 
+
</pre>
 
   
 
   
 
Then submit that script with
 
Then submit that script with
 
+
<pre>
 
qsub name-of-script-above
 
qsub name-of-script-above
 +
</pre>
  
 
Check on it with qstat.
 
Check on it with qstat.
 +
<pre>
 +
qstat -u $USER
 +
</pre>

Revision as of 11:38, 11 September 2009

Stub

Steps to run Matlab

Once you log into Cheaha, set up your environment with the command:

module load mathworks/matlab-r2009a

As a test, you can run MatLab and access your license server with

matlab -c port@license-server -nodesktop

This will start matlab in an interactive shell. This is good just to verify things work, but do not run any significant computations on the Cheaha head node. MatLab computational work needs to be run on the compute nodes by submitting a job submission script to the SGE scheduler

You can create a simple SGE script with (this example requests 1 cpu core / slot):

#$ -S /bin/bash
#$ -cwd
#
#$ -pe matlab 1
#$ -N testMatLab
#$ -l h_rt=2:00:00,s_rt=1:55:00
#$ -j y
#
#$ -M tjannett@uab.edu
#$ -m eas
#
module load mathworks/matlab-r2009a
#$ -V
 
matlab -c port@license-server -nodesktop -r matlab-script

Then submit that script with

qsub name-of-script-above

Check on it with qstat.

qstat -u $USER
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox