_NUM_PES(3)

πŸ’– _NUM_PES(3) β€” Open MPI, bestie edition πŸ’–

okay so real talk, this is <pink>_NUM_PES(3)</pink> from the Open MPI manual set, and it's genuinely one of the shortest, sweetest little pages ever. no cap. let's get into it 🫢


✨ NAME ✨

_num_pes, _num_pes, shmem_n_pes β€” literally just returns the number of processing elements (PEs) used to run the application. that's it. that's the whole job. iconic behaviour honestly πŸ‘‘

(and yes, _num_pes shows up twice in the NAME line up there β€” that's exactly how it's written in the original, don't come for me πŸ™ˆ)


🌸 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 ()

like, look at how tidy that is. no arguments. nothing to mess up. the vibes are immaculate ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so num_pes() or shmem_n_pes() return the total number of PEs running in an application. that's the whole description, bestie β€” it's giving "short and confident" and i am obsessed πŸŽ€

the way that this function just tells you how many of you there are?? main character energy fr fr πŸ’€

πŸ”— SEE ALSO

go read those next, iykyk 🌈


2003-2026, The Open MPI Community


πŸ’€ no warnings, no bugs, no dangers on this page β€” it's a clean run, bestie. go forth and count your PEs ✨

and that's the page!! 🌸 written by the Open MPI Community, copyright 2003-2026, dated May 14, 2026 β€” mwah, slay, periodt πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from