Mathematica
Installed versions
Resource | Version |
---|---|
Dardel/cpe24.11 | 14.0.0, 14.2.0, 14.3.0 |
Dardel/cpe23.12 | 14.0.0 |
General information
Mathematica is an application for scientific calculation and visualization featuring a number of different tools for mathematics, algorithms and data handling. Mathematica is licensed software. In order to use Mathematica you need a license.
External links
- Wolfram Mathematica website
- Wolfram learning resources
- Mathematica 15-minute video tutorial
- Mathematica online course with live Q&A
How to use
Mathematica can be accessed by loading the appropriate module. To see which versions of Mathematica are available use the command
ml PDC/<version>
ml spider mathemmatica
ml avail mathematica
# To view info on the module
ml show mathematica
# To load the module
ml mathematica
Running interactively
Mathematica can be run interactively on an allocated node or on cores allocated on a shared node. To book a single node for one hour, type
salloc -N 1 -t 1:00:00 -A pdc.staff -p main
# wait for a node to be reserved
salloc: Granted job allocation 591571
salloc: Waiting for resource configuration
salloc: Nodes nid001015 are ready for job
ssh -X nid001015
ml PDC/<version>
ml mathematica/14.0.0
mathematica
wolframnb
.
In case you do not need a full node with 128 cores, you could request cores in the shared partition. These cores are shared with other users, with the amount of memory provided proportional to the number of cores awarded.
salloc -n 24 -t 1:00:00 -A pdc.staff -p shared
Running parallel batch jobs
You can also submit parallel workflows to the SLURM queueing system. The following job script allocates 16 cores on Dardel and runs one Mathematica program.
#!/bin/bash
#SBATCH -A pdc.staff
#SBATCH -J ker
#SBATCH -t 01:00:00
#SBATCH -p shared
#SBATCH -c 16
# load the Mathematica module
ml PDC/23.12
ml mathematica/14.0.0
# Run Mathematica with the text script <routine name>.m
math -script ker.m
jobscriptMathematica.sh
.
You can then submit the job with
sbatch jobscriptMathematica.sh