USING MATLAB ON THE HPC SYSTEM
To use the Matlab software on the HPC, you will need the following:
- Access to the HPC system (Contact HPC support if you need an account created).
- A connection to the HPC System, see Connecting to the Marie Curie Cluster for information on how to do this.
- If you plan on using running the Matlab Graphical version of the software on the HPC system, you will require a graphical interface to the HPC system. See Graphical Connection to the HPC System for information on how to do this.
Using Matlab(Interactively)
For those who already have a HPC account and are using a “graphical” connection, you should be able to start Matlab by issuing the following command (inside a terminal session ):
matlab
As can be seen in the image below
When using Matlab, please close the application down when finished, so that the software licenses can be used by others.
Which “Graphical” connection site should I use?
On the CQUniversity HPC facilities, we provide a number of options when connecting to the HPC system using a graphical user interface.
Using the “Strudel software – see Graphical Connection to the HPC System for instructions”, you have a number of selection options.
- HPC Login Node – Marie;
- HPC Login Node – Curie;
- GPU Interactive Session; or
- Standard Interactive Session.
Users are advised to use one of the “Login Node options”, if they are developing or testing a small program. If users plan on running any processing jobs, they should select the “Standard Interactive Session” option. If your matlab program is levelage the processing power of a GPU (Graphical Processing Unit), then you may wish to select the “GPU Interactive Session” option.
The benefit for using the either the “Standard (or GPU) Interactive Session” option, is that the processing occurs on the HPC Compute nodes, thus not overloading the login nodes. If you are using either Interactive Session option, ensure you select the “Stop the Desktop” option,when your program/processing has been completed. This will ensure the resources are freed up for other users to use.
Running Matlab across multiple CPU cores
For those you wish to get more from their Matlab program, it is recommended to have a look at the Matlab lab Parallel toolbox (which we have licenses for). See https://www.mathworks.com/products/parallel-computing.html for more information.
This toolbox allows to harness the computing power of HPC by spreading the computational workload across multiple CPU’s. Thus even thought you may request 12 CPU’s in your interactive session, unless you use this toolbox, Matlab may only be running on one CPU core.
Solving Matlab jobs non-interactively
One of the benefits of using the HPC system is that you can submit 1 to many jobs to the HPC scheduler. Using the HPC scheduler, you can request more resources (such as CPU’s) which can dramatically improve the processing execution time.
To solve a Matlab job non-interactively, you will need to create a Matlab HPC scheduler script. Instructions of how to do this and some examples can be found at Matlab Sample Scripts.