Function PGAReceiveIndividual
Defined in File parallel.c
Function Documentation
-
void PGAReceiveIndividual(PGAContext *ctx, int p, int pop, int source, int tag, MPI_Comm comm, MPI_Status *status)
Receive an individual from another process.
Description
This is usually called by one of the functions called via
PGAEvaluate()
.Example
Receive a string from the rank-0 process with tag PGA_SR_STRINGTOEVAL, and place it into the first temporary location in PGA_NEWPOP.
PGAContext *ctx; MPI_Comm comm; MPI_Status status; ... PGAReceiveIndividual (ctx, PGA_TEMP1, PGA_NEWPOP, 0, PGA_SR_STRINGTOEVAL, comm, &status);
- Parameters:
ctx – contex variable
p – index of an individual
pop – symbolic constant of the population
source – ID of the process from which to receive
tag – MPI tag to look for
comm – MPI communicator
status – pointer to an MPI status structure
- Returns:
Status and string p in population pop are changed by side-effect