Grid
Wait
wait for parallel computation to finish
Calling Sequence
Parameters
Description
Examples
Compatibility
Wait()
Wait(node1, node2, ...)
node
-
integer
The Wait command stops execution until one or more remote compute nodes are finished processing.
When node is given as a parameter, the current process will wait until that specified node is finished. If the given node was finished prior to calling Wait (or never started a job), Wait will return immediately.
When no parameters are given, the call to Wait will block until all compute nodes are finished processing.
The Wait command is intended to be called by the main Maple session, not the compute nodes. See the Barrier command for information about syncing up remote compute nodes.
The Wait command is only available in local Grid mode.
In this example we start 1 job and wait for it to finish
Grid:-Setup⁡numnodes=4:
Grid:-Run⁡1,for i from 1 to 10^6 do od:
Grid:-Wait⁡1
In this example we start multiple jobs and wait for them to finish
Grid:-Run⁡0,for i from 1 to 10^5 do od: i;
Grid:-Run⁡1,for i from 1 to 10^6 do od: i;
Grid:-Run⁡2,for i from 1 to 10^7 do od: i;
Grid:-Wait⁡
Grid:-GetLastResult⁡0
100001
Grid:-GetLastResult⁡1
1000001
Grid:-GetLastResult⁡2
10000001
The Grid[Wait] command was introduced in Maple 2015.
For more information on Maple 2015 changes, see Updates in Maple 2015.
See Also
Grid:-Barrier
Grid:-Run
Grid:-WaitForFirst
Download Help Document