Mathematica

Overview

Mathematica is a computational software program used in scientific, engineering, and mathematical fields and other areas of technical computing. It was conceived by Stephen Wolfram and is developed by Wolfram Research of Champaign, Illinois.

Restrictions on use/License information

Mathematica is commercial software, and usage is restricted to staff and students of the University of Manchester for the purposes of research and teaching. It may not be used for any purpose that leads to direct or indirect commercial exploitation of the software.

There is no restriction on the number of simultaneously running programs on HTCondor.

Versions installed

Mathematica version HTCondor ClassAd
13.3.0 HAS_MATHEMATICA_13_3_0

Set up procedure on submit node

Mathematica can be enabled using the command:

module load mathematica/<Mathematica version>

and then run using the command math or mathematica.

Running the application

Unfortunately it is not possible to run Mathematica notebook .nb files directly on Condor. You need to create a Mathematica (Wolfram Language) script file, typically these files have the extension .wls. The following lines are the contents of a simple generic HTCondor submit text file for submitting an Mathematica script file to HTCondor:

Universe = vanilla

Requirements = (Target.Opsys == "LINUX" && Target.Arch == "X86_64" && <HTCondor ClassAd>=?=True)
Request_Memory = 1000

Log = math.log
Output = math.out
Error = math.error
Notification = Error

Should_Transfer_Files = Yes
When_To_Transfer_Output = ON_EXIT

Executable = /opt/mathematica-<Mathematica version>/Executables/math
Transfer_Executable = False
Input = <script>.wls
Arguments = <input arguments>
Transfer_Input_Files = <script>.wls

Queue

If your submit file is called submit.txt then your job can be submitted to HTCondor using the command condor_submit submit.txt.

Sample Mathematica HTCondor jobs

  1. Mathematica example demonstrating how to pass arguments to a script.
  2. Mathematica code for calculating Pi using n terms of the Gregory series.

Last modified on March 25, 2024 at 10:52 am by Chris Paul