---
name: "shmem_n_pes"
section: "3"
platform: "linux"
package: "openmpi"
version: "5.0.11-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/shmem_n_pes"
---

# shmem\_n\_pes(3)

*\_num\_pes*, \_num\_pes  *shmem\_n\_pes* - Returns the number of processing elements (PEs) used to run the application.

## SYNOPSIS

C or C++:

```
#include <mpp/shmem.h>
int _num_pes (void)
int shmem_n_pes (void)
```

Fortran:

```
include 'mpp/shmem.fh'
I = NUM_PES ()
I = SHMEM_N_PES ()
```

## DESCRIPTION

num\_pes() or shmem\_n\_pes() return the total number of PEs running in an application.

**SEE ALSO:**

[*intro\_shmem*(3)](/intro_shmem/3.md) [*shmem\_my\_pe*(3)](/shmem_my_pe/3.md) [*shmem\_init*(3)](/shmem_init/3.md)

## COPYRIGHT

2003-2026, The Open MPI Community
