Grid - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Toolboxes : Grid Computing : Grid/Wait

Grid

  

Wait

  

wait for parallel computation to finish

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Wait()

Wait(node1, node2, ...)

Parameters

node

-

integer

Description

• 

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.

Examples

In this example we start 1 job and wait for it to finish

Grid:-Setupnumnodes=4:

Grid:-Run1,for i from 1 to 10^6 do od:

Grid:-Wait1

In this example we start multiple jobs and wait for them to finish

Grid:-Run0,for i from 1 to 10^5 do od: i;

Grid:-Run1,for i from 1 to 10^6 do od: i;

Grid:-Run2,for i from 1 to 10^7 do od: i;

Grid:-Wait

Grid:-GetLastResult0

100001

(1)

Grid:-GetLastResult1

1000001

(2)

Grid:-GetLastResult2

10000001

(3)

Compatibility

• 

The Grid[Wait] command was introduced in Maple 2015.

• 

For more information on Maple 2015 changes, see Updates in Maple 2015.

See Also

Grid

Grid:-Barrier

Grid:-Run

Grid:-WaitForFirst