Research Computing has licensed MATLAB from Mathworks for use on desktops, laptops, and on Odyssey. If you wish to run MATLAB on your desktop/laptop, please follow the instructions on the FAS downloads page (downloads for all platforms are available from Mathworks). Running MATLAB on Odyssey can be done through a GUI using VDI, at the command line interactive, or through batch jobs.
NOTE! These instructions discuss the single-core (process) implementation. If you wish to run MATLAB as a multi-core/process job, please see our companion document.
MATLAB GUI on Odyssey
The MATLAB GUI can be run using the power of the compute nodes of Odyssey by initiating your session via our graphical login, and starting an interactive MATLAB session. This is almost like running MATLAB on your desktop/laptop, except all the computation is done on Odyssey.
- Log on to the cluster via vdi.rc.fas.harvard.edu. Be sure to ask for the resources you need to do your work. For more details on VDI go here.
- Load and run the MATLAB software
module load matlab/2018b-fasrc01. The just run
MATLAB at the terminal command line
MATLAB can also be run at the command line in an interactive terminal session. Since there is no GUI, you must include additional parameters, and you can optionally specify an M file (e.g. script.m or function.m) to run, including any script or function parameters as required:
- Open a terminal and log into Odyssey as described here.
- Once logged in, get an interactive session as described here.
srun --pty --mem 4000 -t 30 -p test /bin/bash
- Load the appropriate software:
module load matlab
- Run MATLAB using the appropriate command and parameters:
and MATLAB should run interacively at your terminal:
matlab -nojvm -nosplash -nodesktop
< M A T L A B (R) >
Copyright 1984-2014 The MathWorks, Inc.
R2014a (126.96.36.1992) 64-bit (glnxa64)
February 11, 2014
To get started, type one of these: helpwin, helpdesk, or demo.
For product information, visit www.mathworks.com.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Permissions beyond the scope of this license may be available at Attribution.