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.

  1. 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.
  2. Load and run the MATLAB software module load matlab/2018b-fasrc01.  The just run matlab.

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:

      1. Open a terminal and log into Odyssey as described here.
      2. Once logged in, get an interactive session as described here.
        srun --pty --mem 4000 -t 30 -p test /bin/bash
      3. Load the appropriate software:
        module load matlab
      4. Run MATLAB using the appropriate command and parameters:
        matlab -nojvm -nosplash -nodesktop
        and MATLAB should run interacively at your terminal:
        < M A T L A B (R) >
        Copyright 1984-2014 The MathWorks, Inc.
        R2014a ( 64-bit (glnxa64)
        February 11, 2014
        To get started, type one of these: helpwin, helpdesk, or demo.
        For product information, visit www.mathworks.com.

CC BY-NC-SA 4.0 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.