Mathematica
This section was created with help from Pierre Vanhove, and describes how to run a Mathematica calculation on Batch resources.
We assume you have your Mathematica file my_mathematica_file.m
ready, and would like to run your calculation on Batch resources for a variety of reasons. Below are examples of a submit file and an executable script.
The submit
file example:
### This is file mathematika.sub
executable = my_script.sh
transfer_input_files = my_mathematica_file.m, input.txt
universe = vanilla
+JobFlavour = "nextweek"
log = my_script.log
output = my_script.output
error = my_script.error
should_transfer_files = YES
when_to_transfer_output = ON_EXIT
queue
The executable
file example:
#!/bin/bash
/afs/cern.ch/project/parc/bin/math121 < my_mathematica_file.m
cp output.txt /eos/user/m/myhome/Mathematica/output.txt
Last update: April 14, 2021