2.13.2 Utility Functions

To further simplify programming with global variables on shared memory machines, CONVERSE provides the following functions and/or macros. (Note: These functions are defined on machines other than shared-memory machines also, and have the effect of only one processor per node and only one thread per processor.)

int CmiMyNode()
Returns the node number to which the calling processor belongs.

int CmiNumNodes()
Returns number of nodes in the system. Note that this is not the same as CmiNumPes().

int CmiMyRank()
Returns the rank of the calling processor within a shared memory node.

int CmiNodeFirst(int node)
Returns the processor number of the lowest ranked processor on node node

int CmiNodeSize(int node)
Returns the number of processors that belong to the node node.

int CmiNodeOf(int pe)
Returns the node number to which processor pe belongs. Indeed, CmiMyNode() is a utility macro that is aliased to CmiNodeOf(CmiMyPe()).

int CmiRankOf(int pe)
Returns the rank of processor pe in the node to which it belongs.

June 29, 2008
Converse Homepage
Charm Homepage