Maple allows you to launch multiple compute processes right from the user level without the need for any prior setup or administration. Multiple back-end engines share the same user-interface, but each engine is completely independent and secure. This mode of parallelism offers protection from all in-memory data sharing considerations.
The chart shows the speedup for running this example on an Intel Core 2 Quad Q8200, with varying numbers of execution nodes. In addition to giving a nice speedup, this example also shows how easy it can be to convert a sequential program into a parallel one and get results in a fraction of the time.
This is a simple example that builds up a list with each node's number in it.
The numnodes option can be omitted. It is used here to generate a meaningful result even on computers with one or two cores. Note also that the results come back as soon as a node is finished, not in any particular order. Execution of the procedure in each of the external processes is truly concurrent. Due to multi-core technology, each process can execute at the same time. If you have 8 cores, the operation will take 1/8th of the time compared to the process running in serial.
After the computation has been started, Send and Receive can be used for passing chunks of data to each individual node.
Random values of x can be used to compute an approximation of a definite integral according to the following formula.
This example uses the multi-process execution functionality in order to evaluate the sum in parallel. See here for full details and source code
The chart shows that execution time drops from 46s to just 6s when we execute across 8 parallel nodes.