Strumenti Utente

Strumenti Sito


calcoloscientifico:userguide:matlab:parallel

MATLAB

MATLAB parallel job

Getting Started with Parallel Computing using MATLAB on the University of Parma HPC Cluster

There are three distinct approaches to exploit MATLAB Parallel Server for parallel jobs.

The first approach is to create and configure your cluster profile through a shell script in Linux which contains all the needed parameters and to submit to the SLURM queue using sbatch directive.

All data and code should be uploaded on the client machine that lives inside the HPC cluster. This approach requires a high knowledge of the Linux OS and of the SLURM environment, and the interactivity is set to a minimum. Beside, when the batch job ends, you must collect all the output files and transfer them back on your client machine. Not suited for the uninitiated.

See the following section for full details.

plain slurm

1. MATLAB parallel job using SLURM on HPC cluster

The second approach consists in creating a non interactive batch job inside a MATLAB client off the cluster.

This options will allow to create and instantiate a batch job on the MATLAB Parallel Server that resides on the HPC facility, and gives you some MATLAB methods to retrieve the data once the batch job ends. No data and code needs to be uploaded on the server, all actions are performed inside the MATLAB GUI. The interactivity is limited though, and plots must be created after the parallel job ends and the data is retrieved locally. Some code editing is needed to address this lack of interactivity and some prerequisites are mandatory (e.g. MATLAB ADDONS installation and download of the Parallel Computing Toolbox plugin for MATLAB Parallel Server with Slurm, together with a custom parallel pool profile). MathWorks provides a collection of scrips to build the best parallel pool profile that suits the needs of your parallel job.

See the following section for full details.

non interactive

2. MATLAB Parallel Server non interactive job

The last approach consists in creating an interactive batch job inside a MATLAB client off the cluster.

This options will allow to create and instantiate an interactive batch job on the MATLAB Parallel Server that resides on the HPC facility. No data and code need to be uploaded on the server, all actions are performed inside the MATLAB GUI. The interactivity is complete, no editing or modifications are needed on your local cluster-aware code, you can exploit this HPC parallel pool paradigm in the same exact way you will address a local pool.

Again some prerequisites are mandatory (e.g. MATLAB ADDONS installation and download of the Parallel Computing Toolbox plugin for MATLAB Parallel Server with Slurm, together with a custom parallel pool profile). MathWorks and UNIPR provide some powerful tools to build the best parallel pool profile for your parallel job and to virtually insert your client inside the members of the HPC ring.

See the following section for full details.

interactive

TO LEARN MORE

calcoloscientifico/userguide/matlab/parallel.txt · Ultima modifica: 30/06/2022 12:53 da fabio.spataro