Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This tutorial will cover how to use MATLAB on the Aloe supercomputer through two main approaches:

  1. The interactive MATLAB graphical application. This is an ideal approach for new users as they become familiar with the supercomputer. This is also ideal for code that is being developed or tested before it is submitted as a batch job.

  2. A batch job. This is a job that is submitted as a complete script and runs unattended. This is done through a SBATCH script.

Using the Interactive MATLAB Graphical Application

The interactive MATLAB graphical application is available through the web portal. To access this application, follow these steps:

  1. Connect to the web portal and log on with your credentials.

  2. Select “Interactive Apps“ in the navigation bar then select “MATLAB“.

  3. You will be directed to a request form. This form will be used to request resources for your interactive session. An explanation of these resources can be found in this “Requesting Resources on Aloe“ guide.

  4. Specify the resources needed for your job and select “Launch“.

  5. You will be directed to a window with details about your job. Select “Launch MATLAB“ and the interactive MATLAB graphical application will open:

...

Submitting a Batch Job

Follow these steps to submit a MATLAB Batch Job:

Create the SBATCH script. You can create this script on your workstation and then upload it to the Aloe supercomputer. You can also create this script through the shell. To do this:

...

Connect to the web portal and log on with your credentials.

...

Select “System“ in the navigation bar then select “Aloe Shell Access“. You will be prompted for your credentials and a DUO push will be sent to you.

...

In the command prompt, use the following commands to create a SBATCH script called “MATLAB_test_script.sh“.

Code Block
nano MATLAB_test_script.sh

In the file editor, specify the resources, MATLAB version, and the MATLAB file needed for your computation. Here is an example of a MATLAB SBATCH script:

Code Block
#!/bin/bash
#SBATCH -c 16     # number of TASKS
#SBATCH -N 1     # keep all tasks on the same node
#SBATCH --mem=120G     # request 120 GB of memory
#SBATCH -t 0-4     # request 4 hours of walltime

module load matlab/latest # load in the lastest version of MATLAB
matlab –batch hello.m # run the MATLAB file

...

Save the SBATCH script and exit the file editor.

...

In the command prompt, use the following commands to submit the batch job:

Code Block
sbatch MATLAB_test_script.sh

...

Done. Your job has been submitted. Here are some helpful commands to manage your job:

Code Block
myjobs # This will show the status for all of your jobs.
Code Block
scancel JOBID # This will cancel one job by using its JOBID.
Code Block
scancel –u $USER # This will cancel all of your jobs. 
Code Block
seff JOBID # This will give the efficiency report for one job by using its JOBID.

...

How will I know how many and which resources to use?

...

Panel
bgColor#FFF0B3

Here are some helpful tips for working with MATLAB on the supercomputer.

Child pages (Children Display)