MATLAB on RAAD

From TAMUQ Research Computing User Documentation Wiki
Jump to navigation Jump to search


Introduction

Versions available on RAAD

  1. r2012b
  2. r2014a
  3. r2015a
  4. 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

Shared memory

Matlab distributed computing server (Distributed memory)

Setting up MATLAB Distributed Computing Server

  1. From the assigned compute node, launch the matlab GUI (we currently have R2014a)
  2. Start MATLAB, type "matlab" without quotes and hit enter
  3. On the Home Tab, under the Environment section, click Parallel dropdown menu --> Manage Cluster Profiles --> click the Add button --> Custom --> PBS Pro
  4. (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
  5. 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.
  6. Set NumWorkers to as per your computational needs. Maximum can be 32.
  7. Set ClusterMatlabRoot to /panfs/vol/opt/matlab/R2014a
  8. Set SubmitArguments to -q workq –V
  9. Set HasSharedFilesystem to true
  10. Set AdditionalPaths to: /opt/pbs/default/bin /panfs/vol/opt/matlab/R2014a/bin
  11. Set value of Resource template to: -l select=^N^:mem=2gb -l walltime=24:00:00
  12. Finally, in the section entitled “Additional PBSPro Properties”, use the value ssh for the parameter RshCommand.
  13. Save the profile and switch to the "Validation Results" tab. Click Validate button. All tests should pass.
  14. 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.

  1. 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.
  2. 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.