Running WSMLink in a Server Environment

It is possible to run WSMLink in a server environment or an environment without a graphical desktop environment like X. This can be used to deploy SystemModeler on Linux machines running, for example, in a cloud or server environment.


To install SystemModeler, execute the installer from a command line, the same way as in a desktop environment.

Configuration of WSMLink

The Wolfram Language package for SystemModeler, WSMLink, can be set up to work with the Wolfram Language by changing into the binary directory for SystemModeler, which might look like the following.

cd /usr/local/Wolfram/SystemModeler/5.0/bin

Then run the following command to configure WSMLink.

./SessionManager --configure

The command outputs a log with details on the configuration process in the terminal.

Activation of SystemModeler

To activate SystemModeler through a command line, start a WolframKernel.


Then evaluate the following command.

In[1]:= WSMSimulate

The result will be something similar to the following.

WSMLink::kna: SystemModeler kernel initialization error: License Error: 
Invalid license or no license for SystemModeler Link.
    Use WSMLink`Library`ActivateWSM["activation_key"] to activate. Your MathID is 1234-12345-12345.

WSMLink::mmna: Unable to start or establish a connection to the SystemModeler kernel.

Out[1]= $Aborted

You can then evaluate the activation command to activate with online activation (using an activation key).

In[2]:= WSMLink`Library`ActivateWSM["1234-1234-123456"]

You can also do offline activation (using an activation key and a password).

In[2]:= WSMLink`Library`ActivateWSM["1234-1234-123456","1234-123-123"]

If you have a MathLM server, you can activate against that instead.

In[2]:= WSMLink`Library`ActivateWSM[""]

Upon successful activation, the output should be similar to the following.

WSMLink::restart: Activation successful. Restart WolframKernel and 
    load the package again to start using WSMLink.

Out[2]= True

You can now evaluate Quit[] to close the WolframKernel.

SystemModeler is now successfully activated and the installation is ready for use. Any new WolframKernel should now be able to use WSMLink functionality.