Using Matlab at the MPI CBS

Permanent Link: topicbacklinks

Overview

Main Matlab use case in the institute is a Linux application. Matlab is available in several versions, installed centrally in network folders, available to all users working on Linux workstations/servers in the institute's core network. A license server watches over everything to ensure that we don't cheat Mathworks. The license server is accessible from the core network only, Matlab instances will stop working instantly upon its unavailability.

To use Matlab from outside the institute, use the RemoteLinux service to connect to a graphical session in the institute's core network.

The only supported way of starting Matlab is via a wrapper script. The installation folders of Matlab are subject to change--without prior warning!

FAQ

Expand all Collapse all

How to quickly use Matlab?


The simplest way is to start it in a terminal window with

user@host > matlab

This will start the Matlab GUI, using the latest available Matlab releases.

There are other use cases for Matlab. You might for example want to compile a Matlab script into a piece of software that is independent of an expensive Matlab license. To get help, use the command

user@host > MATlAB --help



Back to FAQ start


How to ensure a specific Matlab version?


Permanent Link: topicbacklinks

You might have to make sure force a specific version of Matlab to ensure reproducible results. Find some theory about that at https://topic.cbs.mpg.de/enterprisecomputing#consistency .

You might prefer to use a different release. It is encouraged to stick to the same Matlab release while doing computations for a given research project since computational results change with Matlab releases (Example measurement: CpuMatlabPrecision). Find out, which releases are available via

user@host > MATLAB --versions

MATLAB is an environment wrapper script. Since there are many more things you can do with Matlab than just start the GUI, there's an abstraction between selecting the release (=starting the environment) and starting the GUI. Here are some commands that may be of interest to you:

This example shows Matlab 9.15 being selected in step one and the GUI being started in step 2:

user@host > MATLAB --version 9.15

matlab=9.15_user@host > matlab

This example does the same in one command:

user@host > MATLAB --version 9.15 matlab

To run a Matlab script from within a shell script, use this call:

MATLAB --version 9.15 matlab -r 'my_matlab_function'

The call will fail, if the requested version cannot be supplied by the system. This represents a hard guarantee for you that your script will never be run, if your version constraint cannot be met.

Hints:
  • Type MATLAB --help for help on the wrapper script.
  • Use a shell alias to quickly start Matlab in your preferred version.
  • Several different Matlab releases can be used--even simultaneously.
  • If you have trouble with Matlab, try this command:
    user@host > clearmatlab
    to remove your per-user Matlab configuration.
  • Matlab's GUI tends to be unstable due to the way it is made up internally. Matlab can be used without a GUI--e.g. for bulk computations. Try this:
    user@host > MATLAB matlab -nojvm
  • You are not limited to the computational power of your workstation. For bulk computations, a compute server might be more suitable. Connect to one using this command:
    user@host > getserver -sL
    and start Matlab there. Disable the GUI (previous hint) for an increase in performance.
  • For really large sets of independent computations, you might want to consider using a Cluster.


Back to FAQ start


This topic: EDV/FuerUser > WebHome > SoftwareLinux > SoftwareMatlab
Topic revision: 05 Aug 2024, wherbst
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback