Function PGAGetNumProcs

Function Documentation

int PGAGetNumProcs(PGAContext *ctx, MPI_Comm comm)

Return the size of communicator comm in processes.

Description

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

Example

PGAContext  *ctx;

...
if (PGAGetNumProcs (ctx, MPI_COMM_WORLD) < 4) {
    printf ("Too few processors for decent performance!\n");
    exit (-1);
}

Parameters
  • ctx – context variable structure pointer

  • comm – an MPI communicator

Returns

The numbers of processors in communicator comm