Matlab#
Matlab is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages.
Matlab at NHPCC#
There are three ways to run Matlab on Panthera cluster:
- Interactive mode
- Using
submat
command - Using OnDemand web portal
Interactive mode#
First, create an interactive job to connect to one of the compute nodes:
u111112@login1:~/wrkdir> srun -n 4 --mem=1G -p short -t 10 --pty /bin/bash
srun: job 57293 queued and waiting for resources
srun: job 57293 has been allocated resources
u111112@cn-12-1:~/wrkdir>
Then, you have to load the Matlab module:
u111112@cn-12-1:~/wrkdir> ml matlab
Tip
In order to see all Matlab versions installed on Panthera you can type matlab and press the Tab key twice. For more information on how to use modules, please visit this page.
Finally, you can use your software:
u111112@cn-12-1:~/wrkdir> matlab
Using submat command#
This is the fast and easiest method most users prefer to load and run Matlab on the cluster. Simply on login node press submat
command without any options to see it's help:
u111112@login1:~/wrkdir> submat
Create and submit job for Matlab
Usage: submat <INPUT> [OPTION]
-n <n1> Number of processors.
-m <mem> Memory required for job (GB).
-p <part> Partition name to submit the job. (use 'sinfo')
-v <ver> Matlab Version. Available: 2019b, 2021b, 2022b, 2023a Default: 2019b
-t <time> run time of the job. Valid format: M, H:M:S, D-H, D-H:M
-A <Account> Account name.
-so <sopt> Additional slurm options if needed.
-no Only write job file.
-h | --help Print this message and exit.
Example: submat main.m -n 8 -m 10 -v 2022b -t 2-0 -p amd128
Using OnDemand web portal#
Tip
for more information about using OnDemand portal please visit OnDemand Web Interface page.
Sometimes you need to take a quick look at your project to make a change or have a graphical view of that and you are running out of time or even do not have an access on your personal pc at the moment. We have prepared an option for you to launch your software in graphical mode and watch your changes quickly.
Warning
We strongly recommend you, not to use this method all the way using Panthera. Having a graphical access to the cluster should be done just in case of emergency or special cases.
Follow these instructions:
- Go to Interactive Apps > Matlab
- Fill out the form according to your needs:
- Adjust the image quality (which determines how much Internet/network bandwidth is used) and the compression level (slower network connections needs more compression):
- After a few seconds, Matlab should be opened:
Tip
for more information about using OnDemand portal please visit this page.