SHMEM_LONG_FETCH(3)

πŸ“¦
version 5.0.10 Β· 4 versions
, in ubuntu stonking

πŸ’– SHMEM_LONG_FETCH β€” bestie, it's an Open MPI moment πŸ’–

okay so listen πŸ‘‘ this is the manual page for SHMEM_LONG_FETCH (that's the 3 section of the Open MPI docs, iykyk) and it's covering a whole little squad of friends: shmem_int4_fetch(3), shmem_int8_fetch(3), shmem_int_fetch, shmem_long_fetch(3), shmem_longlong_fetch, shmem_double_fetch, and shmem_float_fetch. what do they do?? they atomically fetch the value of a remote data object. that's it, that's the whole vibe. ✨


🌸 SYNOPSIS 🌸

so if you're in C or C++, you're gonna want this include:

#include <mpp/shmem.h>

int shmem_int_fetch(int *target, int pe)

long shmem_long_fetch(long *target, int pe)

long long shmem_longlong_fetch(long long *target, int pe)

double shmem_double_fetch(long long *target, int pe)

float  shmem_float_fetch(float *target, int pe)

and for the Fortran girlies πŸŽ€:

INCLUDE "mpp/shmem.fh"

INTEGER pe

INTEGER(KIND=4) SHMEM_INT4_FETCH, ires, target
ires = SHMEM_INT4_FETCH(target, pe)

INTEGER(KIND=8) SHMEM_INT8_FETCH, ires, target
ires = SHMEM_INT8_FETCH(target, pe)

REAL(KIND=4) SHMEM_INT4_FETCH, ires, target
ires = SHMEM_REAL4_FETCH(target, pe)

REAL(KIND=8) SHMEM_INT8_FETCH, ires, target
ires = SHMEM_REAL8_FETCH(target, pe)

πŸ’… DESCRIPTION πŸ’…

the shmem_fetch functions do an atomic fetch operation, no cap. they literally return the contents of the target as an atomic operation. one shot, one vibe, zero drama. πŸ¦‹

now let's meet the arguments, because we respect them:

  • target β€” the remotely accessible data object that's getting fetched from the remote PE. it's the main character here πŸ’–
  • pe β€” an integer that says which PE number target is getting fetched from. and heads up: if you're doing Fortran, it has to be a default integer value. periodt.

⭐ RETURN VALUES ⭐

you get back the contents at the target address on the remote PE. and the data type of the return value is the same as the type of the remote data object β€” matching energy only πŸ’…

also peep this:

See also:

go read it, fr fr, it's giving foundational πŸ“š


🫢 friendly reminder bestie: this whole thing is copyright 2003-2026, The Open MPI Community. all rights, all respect. πŸ‘‘

and that's the page!! 🌈 this version of SHMEM_LONG_FETCH(3) from Open MPI landed on Sep 10, 2026, mwah πŸ˜­πŸ’– go forth and fetch atomically, you absolute icon. πŸŽ€βœ¨

πŸ“¦ where this page comes from