MATLAB on RAAD
Introduction
Versions available on RAAD
- r2012b
- r2014a
- r2015a
- r2016a
Loading MATLAB module in RAAD
module load matlab/<version>
For example:
module load matlab/r2015a
Using Matlab on RAAD
Matlab on RAAD can be used in two ways, Interactive session and Batch mode.
Interactive Session
To run MATLAB with Graphical user interface on HPC Cluster, you need to start the interactive session. Though this is the least recommended method to be used in high performance computing cluster. But if you need to perform a testing before actually submitting your program as a batch job, you can use Interactive session. If you are running MATLAB in interactive mode, issue below commands;
qsub -IV -l ncpus=2,mem=4gb -l walltime=00:30:00
module load matlab/<version>
matlab &
Non-Interactive Session (Batch mode)
In HPC clusters most of the applications run in batch modes where you package your application and submit to resource scheduler and once execution is completed you can fetch the results. MATLAB can be run in a batch mode in which you provide your source code file and additional parameters and package them in a PBS job file. This job is submitted to resource scheduler and as per availability of resources on cluster, your job is executed.
Parallel Support in Matlab
Matlab distributed computing server (Distributed memory)
Setting up MATLAB Distributed Computing Server
- From the assigned compute node, launch the matlab GUI (we currently have R2014a)
- Start MATLAB, type "matlab" without quotes and hit enter
- On the Home Tab, under the Environment section, click Parallel dropdown menu --> Manage Cluster Profiles --> click the Add button --> Custom --> PBS Pro
- (Optional Step) Follow instructions at this URL to configure this profile for PBS Pro (we use ver 12.2.1): http://www.mathworks.com/help/releases/R2014a/mdce/configure-parallel-computing-products-for-supported-third-party-schedulers-pbs-pro-platform-lsf-torque.html
- Use something like /panfs/vol/f/fachaud74/mdcs-test as the JobStorageLocation value. This is specific to user fachaud74, and accessible on all cluster nodes. Use a location appropriate for your raad account.
- Set NumWorkers to as per your computational needs. Maximum can be 32.
- Set ClusterMatlabRoot to /panfs/vol/opt/matlab/R2014a
- Set SubmitArguments to -q workq –V
- Set HasSharedFilesystem to true
- Set AdditionalPaths to: /opt/pbs/default/bin /panfs/vol/opt/matlab/R2014a/bin
- Set value of Resource template to: -l select=^N^:mem=2gb -l walltime=24:00:00
- Finally, in the section entitled “Additional PBSPro Properties”, use the value ssh for the parameter RshCommand.
- Save the profile and switch to the "Validation Results" tab. Click Validate button. All tests should pass.
- Make this profile default for Distributed Jobs submission.
Using this cluster profile (and modifying it according to job needs) you should be able to launch distributed MATLAB jobs on raad.
Why profile Validation fails??
There can be many reasons why job validation fails, few are described below.
- If you see validation process is stuck on First step, possible reason is that resources you have requested are not available on HPC Cluster and your job may goes into queued state.
- You are requesting more resources as compared to what queues limits are.
GPU Computing with MATLAB
We are supporting GPU programming support on RAAD. Please visit GPU Programming on RAAD to get started. You can contact our support team if you need any assistance getting started with this environment or need consultation regarding to it.