Function PGAGetRank

Function Documentation

int PGAGetRank(PGAContext *ctx, MPI_Comm comm)

Return the rank of the processor in communicator comm.

Description

If comm is NULL or a sequential version of PGAPack is used, 0 is returned.

Example

PGAContext  *ctx;
int          rank;

...
rank = PGAGetRank (ctx, MPI_COMM_WORLD);
if (rank == 0) {
    LetRank0DoSomething ();
}

Parameters
  • ctx – context variable structure pointer

  • comm – an MPI communicator

Returns

The rank of this processor