// Matlab on Discover

MATLAB can easily be installed into your environment on the Discover cluster, by running: $ module load <matlab-module-name>

To list all versions of MATLAB available on the Discover cluster, run:$ module avail matlab

Note: Users are highly encouraged to use the latest available versions of MATLAB.

MATLAB License Details

Matlab and IDL are available on all of Discover's login and compute nodes, so users can use licenses interactively or by submitting a job through the applications.

The demand for Matlab outpaces the number of available licenses on the Discover cluster. Furthermore, special toolboxes require toolbox licences, which are even more limited. So, it is vitally important that users share these scarce resources effectively.

Here are a few things you can do:

  • Limit your Matlab sessions to a single login node at a time. Licenses are checked out once per user per node, which means that as long as you stay on the same node, you can run multiple Matlab sessions.
  • Please terminate any unnecessary Matlab sessions to free licenses for other users.

MATLAB licenses can be checked out on a per user per node basis, and any user can run multiple MATLAB sessions on the same node using one license. However, if the user exits that node or the connection is interrupted while the session(s) are running, the licenses will still be actively checked out by that user. If a user logs into the Discover cluster on a different node and attempts to load MATLAB while other session(s) are still active on other node(s), a warning message will be displayed: userid@discover05:~> module load matlab/R2017a

userid discover15 /dev/pts/51 (v37) (ace64.gsfc.nasa.gov/27000 2040), start Wed 5/8 16:15

If you no longer need your session(s) running, please ssh to that node and kill older matlab sessions to free up licenses.

The warning message displays your userid with the Discover cluster node that MATLAB process is actively running on; in this case it is discover15. Consider logging back onto that node and killing your MATLAB process to allow other users to check out licenses. Users can connect to one node from another within the Discover cluster, so to work with example above, a user can connect to discover15 by running:$ userid@discover05:~> ssh discover15

To find the process that is currently occupying the license, run:$ userid@discover15:~> ps ax | grep MATLAB
11981 pts/4 Tl 0:04 /gpfsm/dgen/mathworks/matlab_r2017a/bin/glnxa64/MATLAB -prefersoftwareopengl
12139 pts/4 S+ 0:00 grep MATLAB

To kill the process, run:$ userid@discover15:~> kill -9 11981

Note: Process IDs vary. The kill command above should be executed VERY carefully and should NOT be copy and pasted.

If you are experiencing any issues using MATLAB, please contact us.