---
name: "PGASendReceiveIndividual"
section: "3"
platform: "linux"
package: "pgapack"
version: "1.0.0.1-3"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/PGASendReceiveIndividual"
---

# PGASendReceiveIndividual(3)

Send an individual to a process, while receiving a different individual from a different process.

## NAME

PGASendReceiveIndividual - Send an individual to a process, while receiving a different individual from a different process.

## INPUT 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

## OUTPUT PARAMETERS

- none

  ## SYNOPSIS

```
#include "pgapack.h"
void  PGASendReceiveIndividual(ctx, send_p, send_pop, dest, send_tag, recv_p, recv_pop, source, recv_tag, comm, status)
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
```

## LOCATION

parallel.c

## EXAMPLE

```
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);
```
