# Wolfram Mathematica

Mathematica is a computational software program used in many scientific, engineering, mathematical and computing fields. It was conceived by Stephen Wolfram and is developed by Wolfram Research of Champaign, Illinois. Mathematica is renowned as the world's ultimate application for computations. But it's much more—it's the only development platform fully integrating computation into complete workflows, moving you seamlessly from initial ideas all the way to deployed individual or enterprise solutions.

#### Attention

Members of the physics department of the Johannes Gutenberg University enjoy an unlimited number of licenses. Hence, a multitude of jobs can be submitted with regard to licensing.All other users, however, share the 10 licenses the university has obtained. Hence, the number of concurrent jobs is severely limited. Jobs may crash with an appropriate error message. To avoid this limit the number of concurrently running jobs. If in doubt contact the HPC-team.

#### Attention

Members of the physics department of the Johannes Gutenberg University enjoy an unlimited number of licenses. Hence, a multitude of jobs can be submitted with regard to licensing.

All other users, however, share the 10 licenses the university has obtained. Hence, the number of concurrent jobs is severely limited. Jobs may crash with an appropriate error message. To avoid this limit the number of concurrently running jobs. If in doubt contact the HPC-team.

#### Please Note

The license availability check is performed upon starting Mathematica. A check prior to the start is not possible.# Usage

In order to access the executables load one of the modules, e.g.:

$ module add math/Mathematica

For interactive computing on the login nodes (*testing only*) start `Mathematica`

. Scripts can be executed with `math`

.

See the vendor documentation for more detail. For a primer on parallelization with Mathematica we recommend this part of the documentation.

## Submitting Jobs: Things to consider

You may for example submit a mathmatica script with the following command line:

srun -n x --mem=xxx -p short --time <sometime> math -script <path to script>

where

`x`

reflects the number of wanted cores ( 1 ⇐ x ⇐ 64 ; see below on how to retrieve this number within a script)`xxx`

the amount of memory required for the job (see the memory reservation page for hints)`sometime`

the required wall clock time- <path to script> should indeed be a valid path (relative paths should work, too)

A reminder:

- If
`sometime`

> 5 h, please submit to a**long**-queue - If
`x`

= 64, please submit to**nodeshort**or**nodelong**. In this case just select with`-p <partitionname>`

a different partition.

## Interactive Usage

Using Mathematica interactively can be done like for any other graphical user interface with interactive jobs using salloc.

## SLURM specific Snippets

In order to retrieve the JobID, you can do

JOBID = Environment["SLURM_JOB_ID"];

The job directory therefore becomes

LocalScratchDir = "/localscratch/"<>JOBID<>"/";

A ramdisk can be reserved as described in this link. The number of reserved cores can be retrieved with

CPUn = ToExpression[Environment["SLURM_JOB_CPUS_PER_NODE"]]; Print["Number of Processes: "<>ToString[CPUn]];

- start/development/scripting_languages/mathematica.txt
- Last modified: 2020/04/16 19:27
- by jrutte02