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>

  2. Request an interactive session on a compute node srun --pty bash --login

  3. Load the module with the desired version of Mathematica module load mathematica/12.1.0

  4. Start Mathematica by typing: mathematica


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

Batch Mode

  1. SSH onto the mercury login node ssh <BoothID>

  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

sample submit script
 2#SBATCH --job-name=math_example
 3#SBATCH --account=phd
 4#SBATCH --partition=standard
 6# load the appropriate module
 7module load mathematica/12.1.0
 9# name of input source script
12# run the mathematica notebook
13math -script ${myscript}