MATLAB DCS

From Cheaha
Revision as of 22:12, 10 March 2010 by Mhanby@uab.edu (talk | contribs) (updated simple matlab test instructions)
Jump to navigation Jump to search


Attention: Research Computing Documentation has Moved
https://docs.rc.uab.edu/


Please use the new documentation url https://docs.rc.uab.edu/ for all Research Computing documentation needs.


As a result of this move, we have deprecated use of this wiki for documentation. We are providing read-only access to the content to facilitate migration of bookmarks and to serve as an historical record. All content updates should be made at the new documentation site. The original wiki will not receive further updates.

Thank you,

The Research Computing Team

Stub

Steps to run Matlab

Simple Matlab Test

These instructions NOT use the distributed licenses available on cheaha and will be restricted to a single cpu. See the next section for an example using the distributed computing license.

Set up your environment with the command:

module load mathworks/matlab

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

matlab -c port@license-server -nodesktop -nojvm -r "rand, exit"

For example:

module load mathworks/matlab
matlab -c 27000@licserver.uab.edu -nodesktop -nojvm -r "rand, exit"

                        < M A T L A B (R) >
                Copyright 1984-2009 The MathWorks, Inc.
              Version 7.9.0.529 (R2009b) 64-bit (glnxa64)
                          August 12, 2009
 
  To get started, type one of these: helpwin, helpdesk, or demo.
  For product information, visit www.mathworks.com.

ans =

    0.8147

This will start matlab without a graphical display and without Java support. 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 single cpu SGE script with (script name "matlabtest.qsub"):

#!/bin/bash
#$ -S /bin/bash
#$ -cwd
#
#$ -N testMatLab
#$ -l h_rt=00:10:00,s_rt=00:08:00
#$ -j y
#
#$ -M YOUR_EMAIL_ADDRESS
#$ -m eas
#
module load mathworks/matlab
#$ -V
 
matlab -c port@license-server -nodisplay -nojvm < matlab-script

Then submit the script to the scheduler with

qsub matlabtest.qsub

Check on it with qstat.

qstat -u $USER