PGASetCommunicator(4)

PGASetCommunicator4

Set the default communicator to use when pgarun is called.

Usage

#include "pgapack.h"
void  PGASetCommunicator(ctx, comm)
PGAContext *ctx
MPI_Comm comm

Overview

Does not necessarily need to be the same as the number of processes in MPI_COMM_WORLD (which is the default).

Input parameters

ctx

- context variable

comm

- communicator to use

Output parameters

none

Location

parallel.c

Examples

Example:
MPI_Comm mycomm;
PGAContext *ctx,
double f(PGAContext *ctx, int p, int pop);
:
ctx = PGACreate(&argc, argv, PGA_DATATYPE_BINARY, 100, PGA_MAXIMIZE);
PGASetCommunicator(ctx, mycomm);
PGASetUp(ctx);
PGARun(ctx, f);
PGADestroy(ctx);

Releases

Unchanged in 4 releases since Debian 5.0 (Lenny).

  1. 5.0–8

From pgapack 1.1.1-3 in Debian 8 (Jessie). Parsed by carta from the page's man source.