module avail. The default version is 12.0.0. To use that version, load the default mathematica module
module load mathematicaIf you want to use the older version 11.2.0, then do
module load mathematica/11.2.0
Mathematica can be used in command mode for a batch job and can also be used in GUI mode for an interactive job.
Here is an example batch job script. For more information on submitting batch job scripts, see the documentation on running jobs.
Suppose below is your input file test.m for Mathematica command math:
1+2 8-1 3*6 x=7 3x Sin[Pi/2] Cos[Pi/2] N[Exp] N[Exp]
To run the job in batch mode you create a batch job script named submit.csh containing:
#!/bin/tcsh #BSUB -W 20 #BSUB -n 1 #BSUB -o out.%J #BSUB -e err.%J module load mathematica math -noprompt < test.m
The job can be submitted as
bsub < submit.csh
Check the documentation on running jobs to see how to customize the a batch job script.
The job output in the LSF output file "out.<LSF job number>" should be like:
3 7 18 7 21 1 0 2.718281828459045 7.38905609893065
module load mathematica mathematica
Last modified: March 23 2022 13:17:59.