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.
Members of the physics department 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.
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
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>
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)
sometime> 5 h, please submit to a long-queue
x= 64, please submit to nodeshort or nodelong. In this case just select with
-p <partitionname>a different partition.
You can launch an interactive Mathematica session and use the program as you would on your desktop pc. Please note that this should only be done on the compute-nodes and not on the login-nodes.
[joe_user@login]$ srun -n<ntasks> -p<partition> -A<account> -t<time> --mem<amount> --pty --preserve-env $SHELL
[joe_user@node]$ Mathematica &
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]];