Interactive MatLab
Opening MatLab Form
-
The first step is to select the
Interactive apps
and then click theMatLab
GUI in the Open OnDemand dashboard. -
Then you will see a form which needs to be filled to launch the MatLab GUI on compute nodes.

Partition
-
Partitions are work queues that has computational nodes in it to run the jobs. The partitions available in Discovery are
interactive
,normal
,gpu
,backfill
,class
,epscor
,iiplab
,cfdlab
, so on. -
However, you will see only the list of authorized partitions available for your Discovery account and hence, you won’t see the partitions which you don’t have authorization in the select dropdown.
-
Select one of the partitions where you want to submit your job. Refer to the page → Partitions in Discovery to select the ideal partition for your job.
-
By Default, partition is set to
interactive
. -
Backfill partition is also enabled to launch MatLab GUI through the interactive session. However, jobs on Backfill are subject to being stopped and requeued. Hence, you need to fill the last form field with the MatLab command if you want to launch MatLab in Backfill.

Walltime(Hours)
-
Sets the Walltime for your job. The job gets killed if the Walltime you set gets elapsed.
Parameter #Hours Min Limit
1 hour
Max Limit
24 hours
Default
1 hour
CPUs(Threads)
-
Sets the Number of CPUs(Threads) for the job. The below table shows the maximum limit for CPU threads for each partition. The default and minimum value is 1 CPU thread.
Partition Max Limit interactive
8
normal
22
gpu
14
backfill
62
epscor
62
iiplab
26
cfdlab
26
class
30
|
Memory (GB/Gigabytes)
-
Sets the memory for the job in terms of GB. The memory you select is available to all assigned threads for the job. The below table shows the maximum memory limit for each partition which can be requested for the job. The default and minimum value is 1 GB.
Partition | Max Memory Limit(GB) |
---|---|
interactive |
64 |
normal |
240 |
gpu |
50 |
backfill |
3000 |
epscor |
3000 |
iiplab |
175 |
cfdlab |
175 |
class |
490 |
GPUs
-
To enable the GPU selection, you need to choose one of the following partitions:
interactive
,class
,gpu
,epscor
,iiplab
,cfdlab
. Only these partitions have GPUs and if you select any of the partitions, you can see theGPUs
dropdown enabled.Parameter #GPU Min Limit
0
Max Limit
2
Partition normal don’t have GPUs. |
Email Address
-
If you want to get notified via email when the job starts/fails/ends, enter the email address associated with the Discovery account.
-
You can leave the text field
blank
if you don’t want job notifications.
MatLab version
-
Select one of the available versions
2021a,2020a, 2018a,2017b
from the dropdown for the MatLab software. -
By Default, MatLab version
2017b
is selected.
Setup Commands(bash syntax)
You can use the text entry box to enter setup commands which will run before MatLab GUI gets launched. Some useful setup commands are,
To load additional modules, use the module load command to load into your working environment.
module load <software-name>
For more information about module load command , refer to the page → Module Load in Discovery.
You can also source a bash script which will read and execute commands from the file specified as its argument.
Syntax
source <path to bash script file>
Example
source "$HOME/project_a/setup-env.sh"
Launching the Interactive Session
-
Once all the form fields are set, you can click the
Launch
button. The interactive session will be launched and you will see the below output.

-
The above output shows that the interactive MatLab session has been launched successfully. You will see the
Launch MatLab
only if the resources you have requested becomes available. Else, you might need to wait for some more minutes for the resources allocation and then theLaunch MatLab
button appears. -
You can also set the
Compression
andImage Quality
for MatLab GUI by using the slider. After setting the values, click theLaunch MatLab
button.
The interactive session won’t be launched if you try to submit your job to the partition that you don’t have access to. You will get the following error message → Batch job submission failed: User’s group not permitted to use this partition. Also, the page gets reloaded and you need to select the value for the form fields again since the form gets reset. |
Opening MatLab Graphical User Interface
-
On clicking the
Launch MatLab
button, the MatLab GUI opens in a new tab through a VNC session.

-
The above output shows that the MatLab GUI has been launched on the compute nodes in the Discovery through a VNC session.
-
Also, you have
four different workspaces
which is highlighted in red color in the top right corner of the window and you can use it. -
Furthermore, you have
Applications
tab and you will see the following applications →Web Browser, File Manager, Terminal Emulator
which you can open and use it.
Killing the Interactive Session
-
To kill the interactive session, you can simply press the
close
icon of the MatLab GUI window. This will close the session and the cluster resources get freed. -
Another way to kill the session is to go to the
My Interactive sessions
tab and select theDelete
button of the current interactive session.

Whenever you are done with the work, it’s always recommended to kill/delete the interactive session running on the compute nodes and free the resources. |