SHMEM_FLOAT_FETCH(3)
π SHMEM_FLOAT_FETCH(3) β Open MPI, bestie edition π
okay so. you want to atomically fetch the value of a remote data object?? periodt. that's literally what this whole squad of functions does, and yes they're all in the same manpage because they're all the same vibe, just different types. we're talking shmem_int4_fetch(3), shmem_int8_fetch(3), shmem_int_fetch, shmem_long_fetch, shmem_longlong_fetch, shmem_double_fetch, and shmem_float_fetch(3). the whole fam is here π«Ά
β¨ SYNOPSIS β¨
C or C++:
#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)
Fortran:
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)
psa bestie: that's the original exactly as written, yes the Fortran declarations are giving chaos with theINT4/INT8names on theREALlines. we do not edit the source material. we simply report it. π copy it as-is.
πΈ DESCRIPTION πΈ
The shmem_fetch functions perform an atomic fetch operation. they return the contents of the target as an atomic operation. no races, no drama, just a clean grab-and-go. π
The arguments are as follows:
targetβ the remotely accessible data object to be fetched from the remote PE. that's the thing you're reaching across the network to snatch β¨peβ an integer that indicates the PE number from whichtargetis to be fetched. if you are using Fortran, it must be a default integer value. don't be cute with the kind, okay? default integer. periodt.
π RETURN VALUES π
The contents at the target address on the remote PE. the data type of the return value is the same as the the type of the remote data object β (yes, the original says "the the", we're keeping it, it's canon, it's iconic π).
See also:
π Copyright
2003-2026, The Open MPI Community
okay that's the whole page, you ate it up, go be the main character of your interconnect π¦ and remember: this was the Open MPI version, dated Sep 10, 2026 β copyright 2003-2026, The Open MPI Community π bye bestie, slay responsibly β¨
π¦ 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