Setting up the MDCS

From ScientificComputing
Revision as of 16:48, 4 November 2016 by Urbanb (talk | contribs) (Fixes the available versions)

Jump to: navigation, search

You need to perform a one-time setup on your local workstation in order to use the MATLAB Distributed Computing Server (MDCS) on Euler.


Install MATLAB 8.5 (R2015a) on your workstation

The MDCS service on Euler works only with specific MATLAB versions. The currently supported version is 8.5 (R2015b). It is also possible to use the service with versions 8.1–8.2 and 8.4–8.5 (releases R2013a, R2013b, R2014b, and R2015a). You can obtain these versions from the IT Shop of the ETH Zurich.

Configure your firewall (optional but recommended)

You must poke a hole through your firewall to use matlabpool/parpool (i.e., parfor) functionality or pmode. Using batch() or submit() does not require any special firewall rules.

Open your firewall to incoming TCP connections to ports 27370–27470 from the Euler IP range In practice opening just port 27370 instead of the whole 27370–27470 range may be sufficient.

Setting up your workstation

There are two parts to the local installation:

  1. Installing several supporting MATLAB function files and command scripts that interface with the Euler cluster.
  2. Importing the Euler cluster profile into MATLAB.

Choosing an installation directory

Before proceeding, you need to choose into which directory several supporting MATLAB function files and scripts will be installed.

The easiest way
is the default MATLAB user directory, which is usually Documents\MATLAB (Windows) or ~/Documents/MATLAB (Linux). Issue the disp(userpath) command in MATLAB command to see which directory this is; for example:
The recommended way
is to create a new directory such as C:\Users\my_username\Documents\MATLAB\Euler. You must then add this directory to MATLAB's search path. For example, add the following line:
to the startup.m file in MATLAB's default user directory. Refer to the Mathworks documentation for more details about the startup.m file.

Download and unpack the configuration files

  1. Download the required MATLAB functions and cluster profile as a .zip file.
  2. Unpack the files into the directory that you chose above (it must be in your MATLAB path). You can use the free 7-Zip program to unpack .zip files under Windows.

To quickly check that these files are correctly installed and the directory is in MATLAB's search path, you can issue the following command

which getSubmitString

if the answer is instead

'getSubmitString' not found

then either the directory is not in the search path or the file is not found.

Import the Euler cluster profile

Version Release
8.1 R2013a
8.2 R2013b
8.4 R2014b
8.5 R2015a

Import the Euler_8.5.settings file from the above directory into MATLAB. If you are using another MATLAB version, then use the corresponding settings file instead.

You can do this either

  • via the MATLAB command line, e.g., parallel.importProfile('Euler_8.5.settings') (or the appropriate version) with the proper path:
    parallel.importProfile('C:\Users\my_username\Documents\MATLAB\Euler_8.5.settings') or
  • Mathwork's instructions for the GUI.

It is recommended to name the profile Euler in case the name changes during the import.

This step should only be done once for a given MATLAB version.

Verifying your setup

Once you have performed the setup you can validate the Euler cluster profile. Enter your NETHZ username and password when asked.

Advanced Options

Networking configuration

Setting your workstation's hostname

Your computer must be reachable from the aforementioned subnet. In addition, your computer’s hostname must be resolvable in the ETH network. If you get errors about your host not being found when opening a parpool (matlabpool), then a bad hostname may be to blame. You can force MATLAB to use a specific hostname using the pctconfig MATLAB command; e.g.,


where ‘’ is the hostname of your workstation that is resolvable in the ETH network. Both settings expire with the current session and, in addition, must be set prior to using any parallel computing toolbox features. If this happens often, you can add the following lines to your startup.m file:

hostname =;
dotpos = hostname.indexOf('.');
if dotpos < 0
        hostname = [char(hostname), ''];
clear dotpos;
clear hostname;

This may not work in all cases. Before doing this check whether the MATLAB command

returns a hostname ending in Otherwise, you may have to use a different command. For example, on a Linux laptop, use system('hostname -A') instead:

[status, hostname] = system('hostname -A');
clear hostname;
clear status;

Changing incoming port range

The incoming port range may be changed with the pctconfig MATLAB command; for example

pctconfig('portrange',[27370 27371])

The setting must also be set towards the beginning of a session as described in the previous subsection.