Running MATLAB on Firebird
MATLAB can be run on Firebird in three ways: interactively via a GUI, interactively on the command line, or unattended batch.
Running Interactively with a GUI / Virtual Desktop
MATLAB can be run interactively in two ways. The preferred way is through a virtual desktop with Open OnDemand, though X11 on a local system is another option.
Open OnDemand
Typically the best option to run MATLAB interactively with a GUI is to use Open OnDemand. Follow the steps outlined here to launch a virtual desktop through Open OnDemand. Open a terminal and load the MATLAB module:
module load matlab
To launch MATLAB:
matlab
X11
It is also possible to launch a GUI interface from your local system via SSH/X11, though this is typically substantially less performant than using a virtual desktop through Open OnDemand. Instructions for doing so differ depending on your system’s operating system.
macOS and Linux Users
On a Mac, you may need to install XQuartz if it isn't already on your system:Â XQuartz
Windows
If using Windows, first configure X11 depending on your client.
Once X11 support is configured, whether using Mac, Linux, or Windows, connect via SSH, request time on a node, making sure to pass the --x11
flag (adjust options as needed), and launch MATLAB:
ssh -XYC username@firebird.swarthmore.edu
[user@firebird ~]$ salloc -t 60 --cpus-per-task=1 --mem-per-cpu=32gb --partition=unowned --x11
matlab
The GUI interface should open locally:
Command Line
To use MATLAB interactively through a command line, connect to Firebird via SSH. Load the module, connect to a compute node, and then launch MATLAB:
Running with a Graphical User Interface
If you want to run the MATLAB graphical user interface (as opposed to the command line), connect to Strelka with X11.
Windows
Setting up X11 forwarding for Windows
Starting MATLAB
To start MATLAB, make sure to load the MATLAB module (see above) and then type:
The graphical user interface will load on your computer.
Unattended Batch
It is possible to submit a script that will run within MTLAB, using Slurm.
Submission Script Example
You can submit a file with MATLAB commands; in this example, that file is named matlab_test
, and this job submit file might be named matlab_job.sh
.
This is a basic example script and will likely need to be further modified for your specific needs. Once you have a job script, you can submit it to Slurm via:
Â
Ways you can contact ITS or find information:
ITS Support Portal: https://support.swarthmore.edu
Email: support@swarthmore.edu
Phone: x4357 (HELP) or 610-328-8513
Check out our remote resources at https://swatkb.atlassian.net/wiki/spaces/remote/overview
Check our homepage at https://swarthmore.edu/its