SHMEM_INT_FETCH(3)
π SHMEM_INT_FETCH π the atomic fetch page π¦
okay so bestie, welcome to the Open MPI manual β the page is SHMEM_INT_FETCH(3) and it's the group chat for the whole fetch squad:
shmem_int4_fetch(3)shmem_int8_fetch(3)shmem_int_fetch(3)shmem_long_fetch(3)shmem_longlong_fetch(3)shmem_double_fetch(3)shmem_float_fetch(3)
one job, seven names, and the job is: atomically fetches the value of a remote data object β¨ no cap.
β¨ 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)
copy these character for character, bestie. yes, even the long long one. I said what I said. π«Ά
π 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)
π¦ DESCRIPTION π¦
so the shmem_fetch functions do one atomic fetch and that's it, that's the whole personality. they return the contents of the target as an atomic operation. it's giving main character energy, honestly. π
and the arguments? okay so, the arguments are as follows:
targetβ the remotely accessible data object to be fetched from the remote PE. that's the thing you're grabbing, and it lives on somebody else's PE. πΈpeβ an integer that indicates the PE number from whichtargetis to be fetched. and if you're using Fortran, it must be a default integer value. no fancy kinds, bestie, default integer only. π
π RETURN VALUES π
it hands you 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 β they match, periodt. β¨
π SEE ALSO π
go read that one too, iykyk. π¦
π Copyright π
this gorgeous piece of documentation is Β© 2003-2026, The Open MPI Community π
sign-off time: this page dropped Sep 10, 2026, it's from the Open MPI manual (SHMEM_INT_FETCH(3), in case you scrolled past it π), and that's the whole thing. stay atomic, stay slay. π₯πβ¨πππ
π¦ 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