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

# PGAGetNumProcs(3)

Returns the size of communicator comm in processes. If comm is NULL or a sequential version of PGAPack is used, PGAGetNumProcs() returns 1.

## NAME

PGAGetNumProcs - Returns the size of communicator comm in processes.  If comm is NULL or a sequential version of PGAPack is used, PGAGetNumProcs() returns 1.

## INPUT PARAMETERS

- ctx

  \- context variable structure pointer

- comm

  \- an MPI communicator

## OUTPUT PARAMETERS

- none

  ## SYNOPSIS

```
#include "pgapack.h"
int  PGAGetNumProcs(ctx, comm)
PGAContext *ctx
MPI_Comm comm
```

## LOCATION

parallel.c

## EXAMPLE

```
Example:
PGAContext  *ctx;
:
if (PGAGetNumProcs(ctx, MPI_COMM_WORLD) < 4) {
printf("Too few processors for decent performance!0);
exit(-1);
}
```
