MATLAB at TACC

Mathwork's MATLAB is installed and supported at TACC and is available on the following TACC resources: Stampede, Maverick, and Lonestar5.

MATLAB Licenses

MathWork's agreement with the University of Texas now allows TACC and XSEDE users to access MATLAB for non-commercial, academic use. If you would like access to MATLAB please submit a help desk ticket through either the TACC or XSEDE portal. Include in your ticket your institutional affiliation and a brief statement confirming that you will use MATLAB only for non-commercial, academic purposes. If you are affiliated with the University of Texas, please include your academic department in your help desk ticket.

If you have your own network licenses for toolboxes that are not available through the University of Texas, we can help you configure these licenses on TACC systems. Again, submit a help desk ticket for assistance.

MATLAB Toolboxes

MATLAB, Simulink, and a lot of MATLAB toolboxes are available on the TACC resources. Listed below is the complete set of available toolboxes on the TACC resources:

Bioinformatics Toolbox
Control System Toolbox
Curve Fitting Toolbox
Data Acquisition Toolbox
DSP System Toolbox
Image Processing Toolbox
Instrument Control Toolbox
MATLAB Coder
MATLAB Compiler
Neural Network Toolbox
Optimization Toolbox
Parallel Computing Toolbox
Signal Processing Toolbox
SimMechanics
SimPowerSystems
Simscape
Simulink
Simulink Coder 0
Simulink Control Design
Stateflow
Statistics Toolbox
Symbolic Math Toolbox
System Identification Toolbox
Wavelet Toolbox

To see a complete list of MATLAB, Simulink, and MATLAB Toolboxes and their version information, please type the "ver" command at the MATLAB prompt

>> ver

Running MATLAB in interactive mode

MATLAB is normally launched with the MATLAB Desktop UI and used in interactive mode. To do so, please create a VNC session following the Stampede User Guide's directions in the Remote Desktop Access section. Note that the same instructions apply to VNC sessions on Maverick.

MATLAB is managed under modules on the TACC resources. Before you launch MATLAB load the MATLAB module with the following command:
login1$ module load matlab
You can always get the MATLAB help information by typing the following module help command.
login1$ module help matlab

The following figure shows how MATLAB is launched inside the VNC session.

Figure 1. MATLAB launched in a VNC session

IMPORTANT: Do NOT launch MATLAB on the login nodes. This may fail and, more importantly, it will prevent other users from doing their work, as your execution will take up too many cycles on the shared login node. Using MATLAB on the login nodes is considered system abuse, and will be treated as such. See TACC usage policies.

Running MATLAB in a batch mode

You can also submit your MATLAB job to the batch nodes (compute nodes) on the TACC resources, e.g. Stampede, Lonestar5, or Maverick. To do so, please first make sure that the MATLAB module has been loaded, and then launch "matlab" with the "-nodesktop -nodisplay -nosplash" option as shown in the sample Stampede job script below.

Example 1. Sample MATLAB job script to run on Stampede

#!/bin/bash
#SBATCH -J matlabjob              # job name
#SBATCH -e matlabjob.%j.err       # error file name 
#SBATCH -o matlabjob.%j.out       # output file name 
#SBATCH -N 1                      # request 1 node
#SBATCH -n 16                     # request all 16 cores 
#SBATCH -p serial                 # designate queue 
#SBATCH -t 01:00:00               # designate max run time 
#SBATCH -A myproject              # charge job to myproject 

module load matlab
matlab -nodesktop -nodisplay -nosplash < mymatlabprog.m

Then submit the job to the scheduler in the standard way. See the Running Jobs section in the respective user guides

Stampede login1$ sbatch myjobscript Running jobs on Stampede
Lonestar5 login1$ sbatch myjobscript Running jobs on Lonestar5
Maverick login1$ sbatch myjobscript Running jobs on Maverick

Parallel MATLAB

The parallel computing toolbox is available on the TACC resources as well. You can use up to 12 workers for shared parallel operations on a single node in the current MATLAB version. Our MathWorks Total Academic Headcount (TAH) license for the UT-Austin campus does not include MATLAB Distributed Computing Server. Therefore, multi-node parallel operations are not supported.

The following two examples demonstrate parallel operations using the "parfor" and "matlabpool" functions. Here are the basic examples.

Example 2. MATLAB parfor
Mat=zeros(100,1);
parfor i = 1:100
    Mat(i) = i*i;
end

Example 3. MATLAB matlabpool

if (matlabpool('size') ) == 0 
    matlabpool(12);
else
    matlabpool close;
    matlabpool(12);
end

Please look at the MATLAB Parallel Toolbox documentation for detailed descriptions and advanced features.

Mathworks References

Mathworks has an excellent collection of documentation, videos and webinars.

Help

MATLAB is a commercial product of MathWorks. Please solicit help from Mathworks regarding MATLAB code. If you need any further assistance related to access issues or running issues, please contact TACC via the XSEDE User Portal if you are an XSEDE user. All other users please request help via the TACC User Portal.

Last update: April 7, 2017