SHMEM_DOUBLE_FETCH(3)

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

✨ SHMEM_DOUBLE_FETCH ✨ (aka the Open MPI girlies' atomic fetch page)

Hiiii bestie πŸ’– okay so this is the manual page for SHMEM_DOUBLE_FETCH(3) from Open MPI, and it's literally the page for the whole fetch girl gang β€” shmem_int4_fetch(3), shmem_int8_fetch(3), shmem_int_fetch, shmem_long_fetch, shmem_longlong_fetch, shmem_double_fetch, and shmem_float_fetch 🌸

They all do one iconic thing: atomically fetch the value of a remote data object. No cap. 🫢


🌈 NAME

  • shmem_int4_fetch(3), shmem_int8_fetch(3), shmem_int_fetch, shmem_long_fetch, shmem_longlong_fetch, shmem_double_fetch, shmem_float_fetch β€” atomically fetches the value of a remote data object πŸ‘‘

πŸ’… 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)

🌸 DESCRIPTION

Okay so listen β€” the shmem_fetch functions do an atomic fetch operation ✨. They hand you back the contents of the target, and they do it atomically. That's the whole moment. That's the vibe. Obsessed. πŸ’–

The arguments are giving:

  • target β€” the remotely accessible data object we're fetching from the remote PE. It's the main character here 🫢
  • pe β€” an integer that says which PE number target is gonna be fetched from. And heads up bestie, if you're doing Fortran, this one must be a default integer value ⚠️

πŸ”₯ 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, fr fr. ✨

πŸ‘€ See also:


2003-2026, The Open MPI Community


And that's the whole page babes πŸŽ€ it's from Open MPI, dated Sep 10, 2026, and it's literally iconic. Go fetch (atomically) πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from