License / First Startup

The university has a site license for Mathematica, but the first time you use mathematica on the cluster you will need to put in the details of this to get started.

In the an interactive session do,

You will then see the following window,


Click ‘Other ways to activate’ at the bottom.


Click ‘Connect to a network license server’.


Enter ‘’ as the server name and then click ‘Activate’.

After you have done this, you will then not have to do this again and can just launch mathematica normally.

Limiting Number of Threads

Mathematica has the same problem as software/matlab in regards to operating on a shared machine, and will try to use all available cores of the host machine, potentially impacting other users who are running jobs there too.

You can limit the number of threads Mathematica can use with the following mathematica code:

SetSystemOptions["ParallelOptions" -> "ParallelThreadNumber" -> 20]

So here we are requesting mathematica to use 20 threads. You should then request 20 slots when submitting your jobs:

qsub -pe openmp 20 mathematica.job