Mathematica

Mathematica is a software system for numerical, symbolic, and graphical computations and visualization. Mathematica delivers users an interactive calculation tool and versatile programming language for fast and accurate solutions to technical problems.

Interactive Mode

  1. SSH onto the mercury login node with X11 forwarding ssh -X <BoothID>@mercury.chicagobooth.edu
  2. Request an interactive session on a compute node srun --pty bash -l
  3. Load the module with the desired version of Mathematica module load mathematica/11
  4. Start Mathematica by typing: mathematica

Note

Remember to use X11 forwarding to connect to Mathematica in interactive mode

Batch Mode

  1. SSH onto the mercury login node ssh <BoothID>@mercury.chicagobooth.edu
  2. Navigate to the folder containing your input script (example.nb) cd /path/to/working/dir
  3. Write a submission script
  4. Submit the batch job by typing: sbatch submit.sh
sample submit script
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#!/bin/bash
#SBATCH --job-name=math_example
#SBATCH --account=phd
#SBATCH --partition=standard

# load the appropriate module
module load mathematica/11

# name of input source script
myscript=example.m

# run the mathematica notebook
math -script ${myscript}