Grid Computing - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Grid Computing (Parallel Distributed Computing) in Maple 16

 

Distributed systems offer fantastic gains when it comes to solving large-scale problems. By sharing the computational load, you can solve problems too large for a single computer to handle, or solve problems in a fraction of the time it would take with a single computer. The Grid Computing Toolbox platform support has been extended for Maple 16, making it easy to create and test parallel distributed programs on some of the world's largest clusters.

 

 

 

 

MPICH2

MPICH2 is a high performance implementation of the Message Passing Interface (MPI) standard, distributed by Argonne National Laboratory (http://www.mcs.anl.gov/research/projects/mpich2/).  The stated goals of MPICH2 are to:

 

1. 

Provide an MPI implementation that efficiently supports different computation and communication platforms including commodity clusters (desktop systems, shared-memory systems, multicore architectures), high-speed networks (10 Gigabit Ethernet, InfiniBand, Myrinet, Quadrics) and proprietary high-end computing systems (Blue Gene, Cray, SiCortex) and

2. 

Enable cutting-edge research in MPI through an easy-to-extend modular framework for other derived implementations.    

 

The Grid Computing Toolbox for Maple 16 includes the ability to easily set up multi-process computations that interface with MPICH2 to to deploy multi-machine or cluster parallel computations.

 

Example: Monte Carlo Integration

See Also

Example: Monte Carlo Integration

 

Random values of x can be used to compute an approximation of a definite integral according to the following formula.

 

 

Area    =    abfx ⅆx    =    limNinfinity1Ni=1Nfrba

 

 

This procedure efficiently calculates a one-variable integral using the above formula where r is a random input to f.

 

A sample run using 1000 data points shows how this works:

 

approxint x2, x=1..3;

8.63278051029565

(1.1)

This can be computed exactly in Maple to show the above approximation is rough, but close enough for some applications.

13x2 ⅆx

263

(1.2)

at 10 digits

8.666666667

(1.3)

 

A parallel implementation adds the following code to split the problem over all available nodes and send the partial results back to node 0.  Note that here the head node, 0, performs the calculation and then accumulates the results from the other nodes.

 

 

Integrate over the range, lim, using N samples.  Use as many nodes as are available in your cluster.  

Note: In the following command, replace "MyGridServer" with the name of the head node of your Grid Cluster.


Grid:-Setuphpc,'host'=MyGridServer;

Grid:-LaunchparallelApproxint,x2, x = 1..3, numSamples = 107,  imports='approxint',numnodes=16;

8.66806767157001

(1.4)

 

Execution times are summarized as follows.  Computations were executed on a 3-blade cluster with 6 quad-core AMD Opteron 2378/2.4GHz processors and 8GB of memory per pair of CPUs, running Windows HPC Server 2008.

 

Number of Compute Nodes

Real Time to Compute Solution

Performance 

1 (using serialized code)

356.25 s

The speedup is a measure of T1Tp  

where T1  is the execution time of the sequential algorithm and Tp is the execution time of the parallel algorithm using  p processes.

 

 

1 (using Grid)

369.18

2

194.63

3

123.12

4

93.57

5

72.67

6

57.22

7

48.80

8

43.15

9

37.96

10

34.60

11

31.58

12

28.83

13

26.66

14

24.90

15

23.38

16

21.93

17

20.92

18

19.41

19

18.41

20

17.85

21

16.71

22

16.02

23

15.30 s

 

The compute time in Maple without using MapleGrid is the first number in the table -- ~6 minutes.  The rest of the times were using MapleGrid with a varying number of cores.  The graph shows that adding cores scales linearly.  When 23 cores are dedicated to the same example, it takes only 15.3 seconds to complete.

See Also

 Grid package documentation