Running Jobs on Gordon with Parallel MATLAB
Gordon 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 Gordon is limited to users from degree-granting educational institutions which are licensees of The MathWorks' Parallel Computing Toolbox (PCT).
How to Use MATLAB with Gordon
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
Using the MDCS allows users to run multiprocessor jobs on Gordon via the batch queue system. The MDCS may be accessed from a user desktop with the PCT installed.
The PCT will automatically submit jobs to the MDCS (see below for details of this procedure).
The version of MATLAB currently installed on Gordon is 2013b and is located in:
NOTE: The MATLAB version on the desktop must match the MDCS version.
To use the desktop PCT with Gordon you must have:
- Matlab version 2013b installed
- An ssh private/public key pair generated on the desktop with the public key installed on Gordon 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 Gordon.
See some examples of MATLAB usage to better understand the process.