SHMEM_MY_PE(3)

✨ SHMEM_MY_PE(3) ✨

okay so bestie, we're in the Open MPI manpage corner of the internet and today's main character is shmem_my_pe πŸ’… this is the SHMEM_MY_PE(3) page, and it's literally about finding out who you are β€” well, which PE you are πŸ¦‹

πŸ’– NAME πŸ’–

shmem_my_pe, my_pe, _my_pe β€” returns the virtual PE number of the calling PE. no cap, that's the whole vibe.


🌸 SYNOPSIS 🌸

C or C++:

#include <mpp/shmem.h>

int shmem_my_pe (void)
int my_pe (void)

Fortran:

include 'mpp/shmem.fh'
I = SHMEM_MY_PE ()
I = MY_PE ()

πŸŽ€ DESCRIPTION πŸŽ€

okay so my_pe() or shmem_my_pe() return the processing element (PE) number of the calling PE. it takes no arguments β€” zero, nada, it just knows 🧚 it's giving "I already know who I am" energy, periodt.

the result is an integer between 0 and npes - 1, where npes is the total number of PEs executing the current program. so yes, the index starts at 0, bestie, not 1 β€” classic ✨

See also:

intro_shmem(3) shmem_n_pes(3) shmem_init(3)


2003-2026, The Open MPI Community


and that's the whole page, bestie β€” short, sweet, iconic, ate πŸ’… see u in the group chat, mwah 🫢

SHMEM_MY_PE(3) · Open MPI · Sep 10, 2026 ⭐

πŸ“¦ where this page comes from