Mathematica Usage

See also MathematicaSetup

Command-line Interactive

To use the command line kernel of Mathematica, simply run "math" in the shell of the interactive node.

Mathematica batch file

To submit a Mathematica job to the UC3 cluster, a Mathematica batch file must first be created.

For example, I have created the Mathematica batch file with the following code:

condorTest.m
(* Mathematica Test *)
$Version
Needs["Benchmarking`"]
Benchmark[]

Condor Submission

The submit host also needs a script that will delay evaluation of the 'math' executable until it runs on the node.

math.sh
#!/bin/bash
math < $1

And I have created an example condor submission file that looks like the following:

condorTest.cmd

executable = math.sh
universe = vanilla 
Log = logfile.log 
Output = output.dat 
Error = errorfile  
getenv = True
Arguments = /home/lincolnb/Mathematica/condorTest.m
requirements = (HAS_MATHEMATICA =?= True)

initialdir = /home/lincolnb/Mathematica/run1
queue 100

The requirements for HAS_MATHEMATICA will ensure that the code will only attempt to run on nodes with Mathematica installed.

References

http://research.cs.wisc.edu/condor/manual/v6.2/6_2Setting_up.html#SECTION00724000000000000000

http://info.phys.washington.edu/physics/index.php/Mathematica_on_Condor

-- LincolnBryant - 23 Mar 2012
Topic revision: r3 - 29 Mar 2012, LincolnBryant
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback