CoLab's Local Distributed Maple How-to v0.01 (very beta)

This how-to is intended as a preliminary primer on using Distributed Maple at CoLab. Currently our installation of Distributed Maple is not complete. Information here will change. For the time being, if you want to try things out please do, but be aware that things are still in "beta-testing" mode.

If you have questions/comments about the installation, or would like some help getting started, feel free to contact Josh Knauer or Herre Wiersma. Please let us know what you think; we need feedback.

1. Where can I find information about the Distributed Maple package?

The Distributed Maple home page, www.risc.uni-linz.ac.at/software/distmaple/, is the best source.  An online version of the manual can be found at  www.risc.uni-linz.ac.at/software/distmaple/report/.

2. How do I set myself up to run Distributed Maple at CoLab?

Currently Distributed Maple is only installed on the Bugaboo cluster. If you don't have an account there you can get one by contacting, Martin Siegert.

From your Bugaboo account do the following:

Step 1.

Create a directory to run your computation from.

mkdir comp

This directory is where you will keep Maple source code files for procedures that are to be distributed to client processes during your computation. You may wish to create a new directory for each computation, or instead use the same one each time you use Distributed Maple (it's a matter of house keeping).

Step 2.

Link the Distributed Maple package to your computation directory.

ln -s /home/knauer/distmaple/dist dist
ln -s /home/knauer/distmaple/dist.maple dist.maple
ln -s /home/knauer/distmaple/dist.systems dist.systems

You must be able to see the files "dist/*.class" ,"dist.maple" and "dist.systems". Ensure that the following execute properly:

ls dist/*.class
more dist.maple
more dist.systems

Distributed Maple uses a Java backend to communicate over the network to other machines. This setup is necessary for that portion of the system to function.

Step 3.

Run Maple.

maple

Or, if your DISPLAY variable is set correctly, then xmaple works as well.

You should now be able to execute the following session.
 

    |\^/|     Maple 7 (IBM INTEL LINUX)
._|\|   |/|_. Copyright (c) 2001 by Waterloo Maple Inc.
 \  MAPLE  /  All rights reserved. Maple is a registered trademark of
 <____ ____>  Waterloo Maple Inc.
      |       Type ? for help.
> read `dist.maple`;
Distributed Maple V1.1.12 (c) 1998-2000 Wolfgang Schreiner (RISC-Linz)
See http://www.risc.uni-linz.ac.at/software/distmaple
> dist[initialize]([[b082,bugaboo],[b083,bugaboo]]);
connecting b082...
connecting b083...
                                      okay

> dist[terminate]();
                                      okay

> quit;
 

Step 4.

If everything has worked so far then you are finished. Go ahead and look at our sample computation and the Distributed Maple website for programming information.  Happy Distributed Computing :)

3. How should the dist[initialize] command look for Bugaboo?

Our intention is to streamline the initialization process so that it will not be necessary to use the dist[initialize] command. That is not done yet. For now, dist[initialize] will have to do. On Bugaboo you indentify each node with its address (b001 through b096) and the type "bugaboo". For example:

dist[initialize]([[b081,bugaboo],[b083,bugaboo],
[b084,bugaboo]]);

initializes 3 client processes, one on each of b081, b083 and b084 respectively.

Remember to call dist[terminate]() when you finish your session, or any client processes started by dist[initialize] will remain active.

4. What would a Distributed Maple computation look like?

As an example we've created a procedure to compute finite sums in parallel. There are, of course, several similar examples in the Distributed Maple manual (www.risc.uni-linz.ac.at/software/distmaple/report/).

#
# sum2 computes sum(f(i), i=1..r) distributed n ways
#
sum2 := proc( f, r, n )
local ind,range,a ,b,tasklist,a1,b1,i,res,s;

ind:=op(1,r);
range:=op(2,r);
a:=op(1,range);
b:=op(2,range);
tasklist:=[];

# break the sum into n pieces

for i from 0 to n-2 do
    a1:=i*floor((b-a+1)/n)+a;
    b1:=(i+1)*floor((b-a+1)/n)+a-1;

    # distribute the summation to client processes
    tasklist:=[op(tasklist), dist[start](sum, f,ind=a1..b1)];
od;
tasklist:=[op(tasklist),dist[start](sum,f,ind=b1+1..b)];

# accumulate the intermediate sums as they become available
res:=0;
for i from 1 to n do
    s := dist[select](tasklist):
    tasklist:= [op({op(tasklist)} minus {tasklist[s[1]]})];
    res:= res+s[2];
od:

return res;

end:

We save this procedure in a file called "sum2.maple" in our computation directory.  To execute it, we lauch maple and do the following:

    |\^/|     Maple 7 (IBM INTEL LINUX)
._|\|   |/|_. Copyright (c) 2001 by Waterloo Maple Inc.
 \  MAPLE  /  All rights reserved. Maple is a registered trademark of
 <____ ____>  Waterloo Maple Inc.
      |      Type ? for help.
> read `dist.maple`;
Distributed Maple V1.1.12 (c) 1998-2000 Wolfgang Schreiner (RISC-Linz)
See http://www.risc.uni-linz.ac.at/software/distmaple
> dist[initialize]([[b081,bugaboo],[b083,bugaboo],
[b084,bugaboo]]);

connecting b081...
connecting b083...
connecting b084...
                                     okay

> read `sum2.maple`;
> sum2( i, i=1..100, 10 );
                                     5050

> dist[terminate]();
                                     okay

> quit;