Distributed Mathematica 1.0.0
-----------------------------
Copyright (C) 2000 Cleopatra Pau (RISC-Linz), see file COPYRIGHT
See http://www.risc.uni-linz.ac.at/software/distmath
General
-------
This package consists of two parts:
1) A Java class library located in the subdirectory 'dist' which implements a
general purpose communication framework and scheduling mechanism
for distributed applications; the main program is represented
by the class 'dist.Scheduler'.
This is the same class library used by the package 'Distributed
Maple' and made by Wolfgang Schreiner. Informations about this
package can be found on the web page:
http://www.risc.uni-linz.ac.at/software/distmaple
2) A binding which allows to access the Java scheduler from the
computer algebra system 'Mathematica' via the interface contained
in 'dist.m'.
Requirements
------------
Both the frontend and the clients run on a Unix machine with Mathematica 3.0
or Mathematica 4.0.
It is not mandatory that the frontend and all clients run the same version
of Mathematica, but it is safer.
Installation
------------
To use the application framework for implementing distributed Mathematica
computations, follow these steps:
1) Install the directory 'dist' in some place (or places) such that it
can be read from any machine that participates in the computation.
2) Copy 'dist.systems' into the directory from where the computation
is started and edit it appropriately such that the scheduler knows
how to startup the distributed session. In particular,
a) You must be able to invoke a process by a 'rsh' (remote shell)-style
program on each remote machine.
b) A Java virtual machine (e.g. a 'java' interpreter) must be installed
on the local *and* on each remote machine and must have access
to the 'dist' library.
c) Mathematica must be installed on the local *and* on each remote machine.
The corresponding commands must be defined in 'dist.systems' for each
class of remote machine that shall participate in the computation
(each class labeled by some key string).
3) Copy 'dist.m' into
'/home/$user/.Mathematica/3.0/AddOns/Applications/'
for Mathematica 3.0, or into
'/home/$user/.Mathematica/4.0/AddOns/Applications/'
for Mathematica 4.0.
Usually the directory '/home/$user/.Mathematica/?.0/' is created at the
first use of Mathematica.
Java on Linux
-------------
Java's "green threads" on Linux gives sometimes massive problems with message
throughput (messages are delayed for a very long time). If possible, use a
Java version that supports "native threads" ("java -native"), e.g. JDK 2.
Java on SGI Origin
------------------
Java's "native threads" on an SGI Origin with more than 8 processors or so
gives sometimes massive problems with message throughput (messages are delayed
for a very long time). Use "java -green".
Usage
-----
If the Java subdirectory 'dist' ist not located in your current subdirectory
(e.g. by a symbolic link to the actual installation directory), then you
have to set the environment variable CLASSPATH to include the directory
where this subdirectory is located, e.g.
CLASSPATH=/usr/local/lib/jdk:/home/info/www/software/distmath
Start 'mathematica' (or 'math') and load the binding file by typing e.g.
<< dist.m
You may then startup the distributed environment by typing
InitializeD[{{machine, key},...}]
listing each 'machine' (symbolic name or IP-address) and its 'key' (used in
'dist.systems' to denote a class of machines). This should result in one line
of output for each machine:
Connecting machine...
You may also use an empty list of machines; in this case only the
current Mathematica kernel is used for running the computations.
Now you may start tasks and wait for their results, i.e., run a distributed
computation, e.g.
t1 = StartD["Integrate[x^n, x]"];
t2 = StartD["Integrate[x^n, n]"];
WaitD[t1] + WaitD[t2]
Finally you should type
TerminateD[]
to shutdown the environment.
Online Visualization
--------------------
You may call
VisualizeD[600, 300, 2, 120]
to create a window of size 600x300 which displays the usage of each machine
employed in the computation during the last 120 seconds with updates every 2
seconds. Calling this command several times with varying parameters gives you
different windows with different execution snapshots. Windows may be
individually resized and closed.
Post-Execution Visualization
----------------------------
Before calling "InitializeD", you may also say
TraceD[file]
by which some kind of trace information is generated in the denoted file.
After system termination, you may call on the command line e.g.
% java visual.Main file initialize terminate 100 100
This generates some files "file-*.fig" each of which contains a diagram of
size 100x100 mm that visualizes some aspect of the program's runtime
behavior. You may use, e.g., "xfig" to browse these files and generate images
in various formats.
The predefined tags "initialize" and "terminate" used above denote the range
of the visualization. By calling
LabelD[key]
during program execution, you may generate such a label "key" on your own.
Documentation
-------------
For more information, see the documentation located on the Web page
http://www.risc.uni-linz.ac.at/software/distmath
Bugs and Extensions
-------------------
Please report problems and bugs to me, i.e.,
Cleopatra Pau
http://www.risc.uni-linz.ac.at/people/ipau
Please be so kind to cite the use of this software in any resulting
application or publication.