User Tools

Site Tools


Running additional Mathematica Kernels from a single Frontend

When working with Mathematica notebooks using the graphical interface (Frontend), you can add additional kernels running on remote hosts to make use of additional computation power or memory. For instance, if your local workplace computer has not enough RAM for a large computation you can send this job to a larger machine that can handle it. In order to do so you first have to add these remote kernels to your frontend. To do so follow these steps:

  1. choose Evaluation → Kernel Configuration Options… from the menu
  2. click Add
  3. give some name for the kernel, e.g. the hostname of the machine the kernel will be running on
  4. click the checkbox for Append name to In/Out prompts

While these Basic Options might work already, there will most likely be a problem with the ssh connection, namely that it asks you every time for your password or passphrase. The reason for this is that Mathematica is using its own Java based ssh client which apparently does not know how to talk to an existing ssh-agent. In order to fix this, do the following:

  1. select Advanced Options
  2. change Shell command to launch kernel to:
    LD_PRELOAD=/usr/lib/x86_64-linux-gnu/ ssh wolfram -wstp -LinkMode Connect -LinkProtocol TCPIP -LinkName "`linkname`" -LinkHost `ipaddress`

Make sure to replace by the actual hostname you want to use. This setup has successfully been tested between two Debian/Jessie hosts running Mathematica 10.3.1.

In order to use this remote kernel you just need to select it from Evaluation → Notebook's Kernel menu. Cells that are calculated on the remote host should have a label in front:

software/mathematica/kernels.txt · Last modified: 2016/03/02 17:56 by dreger

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki