Function PGARunGM
Defined in File parallel.c
Function Documentation
-
void PGARunGM(PGAContext *ctx, double (*evaluate)(PGAContext*, int, int, double*), MPI_Comm comm)
High-level routine to execute the genetic algorithm using the global model.
Description
It is called after
PGACreate()
andPGASetUp()
have been called. If aNULL
communicator is given, a sequential execution method is used, otherwise, work is divided among the processors in the communicator.Example
PGAContext *ctx; double f (PGAContext *ctx, int p, int pop, double *aux); ... PGARunGM (ctx, f, MPI_COMM_WORLD);
- Parameters:
ctx – context variable
evaluate – a pointer to the user’s evaluation function, which must have the calling sequence shown in the example
comm – an MPI communicator
- Returns:
None