Running Jobs on TSCC with Parallel MATLAB
TSCC supports Parallel MATLAB, a development environment from The MathWorks. Below you will find instructions and examples for running jobs with the MATLAB Parallel Computing Toolbox on a desktop and submitting them to the MATLAB Distributed Computing Server (MDCS).
Important: Use of MATLAB on TSCC is limited to users from degree-granting educational institutions which are licensees of The MathWorks' Parallel Computing Toolbox (PCT). Users must belong to the matlab UNIX group on TSCC. To request membership in this group, send an email to TSCC User Support.
How to Use MATLAB with TSCC
MATLAB Architecture
Parallel MATLAB consists of two parts: the PCT and the MDCS.
Features of the Parallel Computing Toolbox
The PCT is a module that runs on the MATLAB client. It contains a number of useful capabilities, including:
- Parallel for-Loops (parfor)
- Distributed Arrays (arrays spread among several worker processes)
- spmd blocks (single program, multiple data) which execute code in a manner similar to mpi runs; MATLAB code placed within an spmd block executes simultaneously on the pool of MATLAB processes that the user has allocated; each process may be identified by a labindex variable
- The ability to define several independent tasks to run simultaneously within a single, embarrassingly parallel MATLAB job
- Parallel integration of many toolboxes, e.g. bioinformatics, genetic algorithms and optimization
- Many general parallel functions
Client-Server Environment
Using the MDCS allows users to run multiprocessor jobs on TSCC via the batch queue system. The MDCS may be accessed in either of two ways: from a user desktop with the PCT installed or from the MATLAB client installed on TSCC.
The PCT will automatically submit jobs to the MDCS (see below for details of this procedure).
The version of MATLAB currently installed on TSCC is 2014a and is located in:
/opt/matlab/2014a
This can be referenced generically as:
/opt/matlab/current
NOTE: The MATLAB version on the desktop must match the MDCS version. Two older versions of MATLAB are also available, 2013b and 2013a.
System Requirements
To use the desktop PCT with TSCC you must have:
- MATLAB version 2014a installed
- An ssh private/public key pair generated on the desktop with the public key installed on TSCC to enable passwordless connections
Linux and Mac OS X have built in key generating programs as part of their default system environments, but Windows does not. One option for Windows users is to download PuTTY and use it to generate the key pairs. See the page Configuring Secure Shell on a Desktop for Use with MATLAB Parallel Computing Toolbox, which describes how to generate key pairs on your desktop and install them on TSCC.
Usage Examples
See some examples of MATLAB usage to better understand the process.