Mathematica Notes
Notes on Using Mathematica in Physics Networked Computing Environment
Mathematica is a symbolic mathematical analysis program from
Wolfram Research.
The University of Maryland has a
site
license with Wolfram for Mathematica.
Mathematica generally consists of two programs, a front-end which provides
the user interface, and a back-end or kernel which does the
actual calculations and
symbolic manipulations. Furthermore, the latest version of Mathematica (3.0)
started using their own X fonts, which complicates the matter for users
sitting at an X-terminal and running Mathematica on a remote machine.
As a result, there may be several options as to how you can run Mathematica
from a given machine, and the exact instructions vary depending on these
options as well as the machine you are running and the machine you are sitting
at. We have tried to enumerate the more common situations here; if you
are having difficulty with these instructions or your situation is not
described, please submit a physhelp request.
Some common situations are:
Running Mathematica 2.2
Mathematica 2.2 is available on many of the machines in the department, the
most notable exception being the PCs in the OWL lab which only run 3.0 and
higher. Note that PCS is encouraging users to upgrade to Mathematica 3.0
as we are trying to phase out version 2.2. Because of the relatively low
use of version 2.2 and the incompatiblility of licenses for 2.2 and 3.0, PCS
is not automatically renewing 2.2 licenses and passwords--- if you receive
an error regarding a 2.2 license please submit a physhelp and we will look
into acquiring a password for you.
Mathematica 2.2 has a command line interface, which should run over any
kind of remote connection as well as at the console, and a somewhat friendlier
notebook interface, which can be run from PCs, at Unix consoles, or over
an X connection by simply setting the DISPLAY environment variable
appropriately.
Under Mathematical Applications in PNCE Physics Menu, there exists a
Mathematica 2.2 submenu. Selecting the icon "Front End" will bring up the
notebook interface, or you can select "Kernel" to bring up the command line
interface.
The following table lists the commands necessary to start the command line
or notebook interface to Mathematica 2.2 on the departmentally maintained
Unix clusters. The notebook version will only run if you are sitting at a
machine's X console or at an X terminal of some sort--- for
information on setting X display for remote
execution of X applications.
|
NSCP-I cluster |
PNCE-Unix/NSCP-II/Glue |
| Command line mode |
math.2.2 |
tap mathematica math |
| Notebook mode |
mathematica.2.2 |
tap mathematica mathematica |
The information in this section is to instruct users on how to start up
Mathematica 3.0 on the machine they are sitting in front of. Because of
changes in the way in which Mathematica handles fonts with version 3.0,
if you are using the notebook interface there may be complications in
situations in which you want
some or all of Mathematica 3.0 running on a machine other than the one
you are sitting at. These are discussed in subsequent sections.
In particular, note that this section does not directly
apply to running Mathematica 3.0 on former quark machines that have been
converted to X terminals.
As with version 2.2, Mathematica 3.0 has both a command line interface
and a (much improved over 2.2) notebook interface. The command line interface
should be able to be run remotely via telnet, rsh , etc without problems,
but there are problems with running the notebook version remotely over X.
Under Mathematical Applications in PNCE Physics Menu, select submenu
Mathematica 3.0, and click on either Front End or Kernel to get notebook
and command line interfaces, respectively. The Mathematica Front (latest
version) in Mathematical Applications Menu should also start the 3.0 notebook
interface.
Note that if you haven't run Mathematica 3.0 on that mahcine before, or if
you are getting strange error messages when trying to start it, please
try running the icon "Set up Mathematica 3.0 to run off server" and reboot
before contacting PCS.
Click on the Mathematica icon in the Novell Application Launcher Menu.
The following table lists the commands necessary to start the command line
or notebook interface to Mathematica 3.0 on the departmentally maintained
Unix clusters. The notebook version will only run if you are sitting at a
machine's X console--- because of problems with Mathematica's fonts and
X complications arise if you try to set the DISPLAY
environment variable to display application on a machine other than one
running Mathematica. This is addressed in subsequent sections.
|
NSCP-I cluster |
PNCE-Unix/NSCP-II/Glue |
| Command line mode |
math |
tap mathematica3.0 math |
| Notebook mode |
mathematica |
tap mathematica3.0 mathematica |
Although the easiest situation is to run all of Mathematica on the machine
you are seated at, there are common situations when this is not the optimal
way to proceed, e.g. when you wish to make use of the faster CPU of an Unix
machine which you are not able to sit at. This includes the case of former
Quark workstations converted into X terminals.
There are basically three means of running Mathematica across machines.
The first is to use the command line interface to Mathematica over a telnet
or rsh connection. This is rather simple to do; just establish a telnet or
rsh connection to the Unix machine you wish to run on, and start the command
line version of Mathematica as if you were running it
locally. Although simple, this is limited to the command line interface
and is generally not acceptable.
A second approach uses the fact that Mathematica runs as an X application on
Unix machines, and X has built in networking and remote display features.
This works rather simply in previous versions of Mathematica (prior to 3.0),
but because the recent versions require a special font from Wolfram be
installed on the machine displaying the application, the procedure is somewhat
more involved, and depends on the machine you are sitting at (which is
displaying the application) rather than the machine which is actually running
Mathematica. Because there are many varieties of machines sitting on peoples'
desks in the Physics department, and PCS does not have the responsibility or
manpower to support many of these, we cannot cover all the intracacies of
all the combinations possible. Instead, we list some general instructions
on what needs to be done, with specific instructions for some of the platforms
PCS does support.
General instructions on running Mathematica 3.0 on a remote X terminal
The general procedure for running Mathematica on a remote X terminal is as
follows:
- Start the X server daemon on your local machine, if necessary.
- Find the Mathematica fonts on the Unix machine you wish to run
Mathematica on, and copy them to the local machine if not already available
to it. Note that it is your responsibility to ensure compliance with any
copyright laws with regard to copying Mathematica fonts. The current (1998)
site license agreement between the University of Mayland and Wolfram is such
that this is not a problem for university-owned machines on the College Park
campus. See following steps for locations of fonts on various systems.
- Telnet to the Unix machine you wish to run Mathematica on,
and set the DISPLAY environmental variable to the machine you are sitting at.
- Use the xset command on the remote Unix system to add to the
X server's font path the path to the copied Mathematica fonts on the local
system; e.g.:
xset +fp local_path_to_math_fonts
- Run Mathematica on the remote machine as per the
instructions for running it locally. There may be a
couple of
xset errors generated as Mathematica fails in its
attempt to add the remote system's path to the Mathematica fonts, but these
can be safely ignored. Mathematica should start up and find the fonts it
needs on the local system.
Note that if the machine you are sitting at is also an Unix machine and
has Mathematica 3.0 installed, step 2 is already done (by virtue of Mathematica
3.0 being installed), and step 4 can be done by starting the local version
of Mathematica 3.0 before running the remote version.
Platform specific instructions for running Mathematica on a remote
X terminal
PCS has tried to perform some of these tasks and even to provide some
scripts to make this procedure more convenient. Please find in the table
below the instructions corresponding to the type of machine you are sitting
at (row) and are running on (column) for the name of the script to run if
present. Some combinations are not currently possible, some are possible
but do not have scripts available---for the latter use the listed path to
mathematica fonts
and follow steps 4 and 5 in general instructions.
| Local Machine |
|
Remote Machine |
|
| Type |
Font Directory * |
PNCE-Unix/NSCP-II/Glue |
NSCP-I |
PNCE-Unix/ NSCP-II/ Glue |
/:/software/mathematica/current |
NO script |
No script |
| NSCP-I |
/software/mathematica |
No script |
No script |
PNCE-PC Faculty env |
w:\math3.0\xfonts |
Need ASAP |
Need ASAP |
Ultrix X-term (ex-quark) |
Need ASAP |
Need ASAP |
Need ASAP |
* NOTEThe required X fonts are found in
SystemFiles/Fonts/Type1 and SystemFiles/Fonts/X
beneath the listed directory.
If you are running Mathematica on (the machine whose CPU is doing the work):
- PNCE-Unix/NSCP-2 machine...
- NSCP-1 machine...
- Quark/Electron cluster machine...
- Physics OWL PC...
- PNCE Faculty PC Environment...
-
Only version 2.2 is available on the quark cluster. You can get a
command line interface to mathematica by running
/usr/local/bin/math, which should run over any type of telnet
or rsh access as well as at the console. At the X console, you can also
run /usr/local/bin/mathematica to open a Mathematica notebook.
The graphical frontend to mathematica can be started by clicking on the
Mathematica icon in the Novell delivered applications window.
Only the latest version (3.02) is available.
Both versions 3.02 and 2.2 are available; adding .2.2 to the
end of one the version 3.0 command brings up the earlier version.
Typing /usr/local/bin/math will bring up the command line
interface front end, which can be run through just about any telnet type
session.
If you are sitting:
- at the console:
You can bring up the graphical notebook front-end
by issuing the command /usr/local/bin/mathematica.
- at an X-terminal:
For version 2.2, you can use the display option (or set the
DISPLAY environmental variable) to you X terminal, eg
/usr/local/bin/mathematica -displaymymachine.physics.umd.edu:0.0
This will run both front-end and kernel on NSCP-1 machine, but
display everything on your X terminal.
Because version 3.0 uses X fonts distributed with Mathematica,
this procedure is less than satisfactory for this version of
the program unless the fonts can be made available to the X server
of the machine you are sitting at. See
Using Mathematica 3.0 over X-windows
- at a PC able to run Mathematica:
If you wish to be able to sit at your PC and run Mathematica yet
still take advantage of the processing power of an Unix workstation,
you can run the front-end on your PC with
the kernel on the Unix machine
I got it Running, Now What Do I Do?
Mathematica is a very complex application and PCS does not have the
staff to provide tutorials. However, we have collected a number of resources
that can be used in learning how to use the package.
Anyone wishing to further the list of useful Mathematica references can
contact the webmaster.
- What do I do when Mathematica asks me for a password?
- The University's
site
license with Wolfram gives us passwords for Mathematica which expire
around the first of every year. POWL and Lab PC's, as well as the various
departmentally maintained
Unix platforms, will have their passwords automatically updated at that time
by PCS staff. PCS staff will also put an icon on the Physics Menu to enable
PNCE Faculty/Research PC Environment users to get their passwords updated.
Unfortunately, the timing of the expiration is such that it generally occurs
in the middle of the winter break, so please be patient if it takes a few
days for this updating to be completed on all platforms.
Version 2.2 and 3.0 have incompatible licenses, and PCS will not pro-actively
renew 2.2 licenses. If you need a 2.2 license renewed, please contact PCS
via physhelp.