Parallel - Maple Help

# Online Help

###### All Products    Maple    MapleSim

Parallel Performance in Maple 15

 Introduction Maple 15 includes numerous options to take advantage of parallel computing, from multi-core computers to large-scale compute clusters.

Polynomial Arithmetic

 • Multiplication, division and powering of high-degree dense polynomials are at least 4 times faster because of an improved implementation.  This implementation consumes at least 3/4 less memory than the ones in Maple 14.
 • The following examples shows efficient polynomial multiplication, powering, division and modulus operations:
 > f,g := seq(randpoly(x,degree=10^4,dense),i=1..2):
 > p := CodeTools[Usage](expand(f*g)):
 memory used=314.77KiB, alloc change=0 bytes, cpu time=6.00ms, real time=6.00ms, gc time=0ns
 > p := CodeTools[Usage](expand((5*x-3*y)^10000)):
 memory used=32.34MiB, alloc change=32.00MiB, cpu time=126.00ms, real time=126.00ms, gc time=8.11ms
 > n := prevprime(2^512):
 > f := Expand((1+x+y+z+t)^30) mod n:
 > CodeTools[Usage](Divide(f,1+x+y+z+t,'q') mod n);
 memory used=0.65MiB, alloc change=0 bytes, cpu time=9.00ms, real time=8.00ms, gc time=0ns
 ${\mathrm{true}}$ (1)
 • divide determines if the polynomial is not divisible immediately as shown in the second call to the command:
 > f,g := seq(randpoly([x,y,z],degree=30,terms=3000),i=1..2):
 > p := expand(f*g):
 > CodeTools[Usage](divide(p,f,'q'));    # computes quotient
 memory used=49.09KiB, alloc change=0 bytes, cpu time=419.00ms, real time=62.00ms, gc time=0ns
 ${\mathrm{true}}$ (2)
 > CodeTools[Usage](divide(p+1,f,'q'));  # fails instantly
 memory used=0.61MiB, alloc change=0.61MiB, cpu time=3.00ms, real time=3.00ms, gc time=0ns
 ${\mathrm{false}}$ (3)

Grid Package for Parallel Computation

 • The Grid package introduces multi-process parallelization into Maple. In contrast to the Threads package, which allows parallel computation via multiple concurrent threads within the same process, the Grid package allows you to launch computations on separate kernels.
 • The Grid package is a subset of the functionality provided by the Maple Grid Computing Toolbox, allowing multi-process parallelism on your local computer.  The Grid Computing Toolbox can be introduced when you want to run your problem across different computers in a cluster or on a network.  The same API is used in both cases so code changes are not necessary.
 • See Grid for details.

Threads

 • A new function Sleep has been added to the Threads package.  Sleep causes the calling thread to suspend its execution for a specified length of time.  While sleeping, the thread will not use a significant amount of CPU time.

Threads[Task]

 • There is a small addition to the Threads[Task][Start] function.  It now accepts as arguments a specification of child tasks, similar to Threads[Task][Continue].  This argument sequence creates a continuation task and child tasks, then waits for the continuation task to return.  This syntax can be used to replace cases where the root task is simply a call to Continue.

CUDA Acceleration Now Supported on Macintosh

 • Maple can take advantage of CUDA-enabled graphics cards to speed up key computations.
 • Maple now supports CUDA acceleration on Macintosh OS X 10.6 in addition to Windows and Linux.  For more information, see CUDA/supported_hardware.

 See Also