Function PGASetCommunicator
Defined in File parallel.c
Function Documentation
-
void PGASetCommunicator(PGAContext *ctx, MPI_Comm comm)
Set the default communicator to use when PGARun is called.
Description
Does not necessarily need to be
MPI_COMM_WORLD
(which is the default).Example
MPI_Comm mycomm; PGAContext *ctx, double f (PGAContext *ctx, int p, int pop, double *aux); ctx = PGACreate (&argc, argv, PGA_DATATYPE_BINARY, 100, PGA_MAXIMIZE); PGASetCommunicator (ctx, mycomm); PGASetUp (ctx); PGARun (ctx, f); PGADestroy (ctx);
- Parameters:
ctx – context variable
comm – communicator to use
- Returns:
None