Grid - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

Grid

  

MyNode

  

query my node number

 

Calling Sequence

Description

Examples

Compatibility

Calling Sequence

MyNode()

Description

• 

The MyNode command is for use as part of a parallel computation.

• 

When a parallel job is started on a specified number of servers, say N, each server will be given an integer identifier between 0 and N-1 for the duration of this computation. MyNode() returns the integer identifier for the node that it is called on.

Examples

who := proc()
   uses Grid;
   local me,i;

   me := MyNode();
   if me = 0 then
       return [0, seq(Receive(),i=1..NumNodes()-1)];
   else
       Send(0,me);
   end if;
end proc;

who:=proclocalme,i;me:=Grid:-MyNode;ifme=0thenreturn0,seqGrid:-Receive,i=1..Grid:-NumNodes1elseGrid:-Send0,meend ifend proc

(1)

rGrid:-Launchwho,numnodes=8

r:=0,1,2,3,4,5,6,7

(2)

sortr

0,1,2,3,4,5,6,7

(3)

Compatibility

• 

The Grid[MyNode] command was introduced in Maple 15.

• 

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

See Also

Grid

Grid[NumNodes]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam