SHMEM_FLOAT_FETCH(3)

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

πŸ’– 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 the INT4/INT8 names on the REAL lines. 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 which target is 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:


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