SHMEM_LONG_FETCH(3)
π 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 numbertargetis 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
- ubuntu stonking: openmpi-doc 5.0.10-6 Β· other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms