Function PGASendReceiveIndividual
Defined in File parallel.c
Function Documentation
-
void PGASendReceiveIndividual(PGAContext *ctx, int send_p, int send_pop, int dest, int send_tag, int recv_p, int recv_pop, int source, int recv_tag, MPI_Comm comm, MPI_Status *status)
Send an individual to a process, while receiving a different individual from a different process.
Example
A dedicated process is being used to perform an optimization algorithm on the strings. Send a new string,
s
, to the process, while receiving an optimized string,r
, from it.PGAContext *ctx; MPI_Comm comm; MPI_Status status; int s, r; ... PGASendReceiveIndividual ( ctx , s, PGA_NEWPOP, 1, PGA_SR_STRINGTOMODIFY , r, PGA_NEWPOP, 1, PGA_SR_MODIFIEDSTRING , comm, &status );
- Parameters:
ctx – context variable
send_p – index of string to send
send_pop – symbolic constant of population to send from
dest – destination process
send_tag – tag to send with
recv_p – index of string to receive
recv_pop – symbolic constant of population to receive from
source – process to receive from
recv_tag – tag to receive with
comm – an MPI communicator
status – pointer to the MPI status structure
- Returns:
status and string recv_p in population recv_pop are modified by side-effect