Mathematica, Wolfram Research’s package for performing symbolic, numeric, algebraic computations and graphics. The default version of Mathematica on the SCC is 9.0. If you wish to use a more recent version of Mathematica, you can do so using modules as explained here.


Note that those wishing to install Mathematica on their own computers, rather than using it on our systems, should consult the Mathematica access page.

In order to get the full benefit of the graphic power of Mathematica, it should be invoked under the X Window System on X terminals or workstations. To do this, you must first set your DISPLAY environment variable to allow you to run this X Application and allow it to display graphics on your local machine/terminal. You may also want to set the environment variable TERM to be xterm. Most PC based X servers such as XWin32 will do this for you automatically.

Mathematica uses it’s own set of fonts and you may need to copy them over to your workstation in order to have the graphical application display correctly on your machine.

To invoke Mathematica, type: mathematica at the shell prompt.

However, if you do not have access to a xterm, you can still use it via a command-line environment. In this case, type math at the shell prompt to activate the package.

Using Mathematica

Running Mathematica Under the Batch System:
1) Create an input file that contains mathematica input/instructions such as the following:

scc1% more inputfile
AppendTo[$Echo, "stdout"]
a = 2
b = 4
c = a + b

2) To run in the background at the monitor:

scc1% math < inputfile > outputfile&

where “outputfile” is the name of the output file

scc1% cat outputfile
Mathematica 9.0 for Linux x86 (64-bit)
Copyright 1988-2012 Wolfram Research, Inc.

 Out[1]= {stdout}

 In[2]:= a = 2

 Out[2]= 2

 In[3]:= b = 4

 Out[3]= 4

 In[4]:= c = a + b

 Out[4]= 6

 In[5]:= Quit

3) To run the same job in batch queue, say, p4-long on AIX

scc1% qsub -b y "math < inputfile > outputfile"

Note: DO NOT include “&” in the batch mode.

Alternatively, you could create a batch script such as:

math < inputfile > outputfile

name it “mathematica_batch_script“, and run:

scc1% chmod +x mathematica_batch_script
scc1% qsub mathematica_batch_script
Frequently Asked Questions

If you have problems or questions regarding Mathematica usage, please consult Wolfram Research’s FAQ WEB page.

Additional Help/Documentation

Mathematica has online documentation available here.

What hardcopy documentation we have is available in the Computer Graphics Lab (Room 203, 111 Cummington Mall). This includes the book Mathematica, A System for Doing Mathematics by Computer, Third Edition, by Stephen Wolfram.

For more information on Mathematica, visit Wolfram Research’s Mathematica website.

We also have our own set of Mathematica examples. Some of these are examples from our Mathematica tutorial and we also have a general Mathematica “hello world” example.

We have in the past also offered a live tutorial on Mathematica and the PowerPoint slides remain available.