SHMEM_SET(3)
β¨ NAME β¨
okay so bestie, this is the whole little squad of atomic setter functions from Open MPI β shmem_double_set(3), shmem_float_set(3), shmem_int_set(3), shmem_long_set(3), shmem_longlong_set(3), shmem_int4_set(3), shmem_int8_set(3), shmem_real4_set(3), and shmem_real8_set(3). the way that they all do one thing: atomically set the value of a remote data object. iconic behavior honestly π
β¨ SYNOPSIS β¨
C or C++:
#include <mpp/shmem.h>
void shmem_double_set(double *target, double value, int pe);
void shmem_float_set(float *target, float value, int pe);
void shmem_int_set(int *target, int value, int pe);
void shmem_long_set(long *target, long value, int pe);
void shmem_longlong_set(long long *target, long long value, int pe);
Fortran:
INCLUDE "mpp/shmem.fh"
INTEGER pe
CALL SHMEM_INT4_SET(target, value, pe)
CALL SHMEM_INT8_SET(target, value, pe)
CALL SHMEM_REAL4_SET(target, value, pe)
CALL SHMEM_REAL8_SET(target, value, pe)
π DESCRIPTION π
the set routines write value into the address target on pe as an atomic operation. no cap, it's giving "main character energy" β it just does the thing in one clean uninterrupted move and you don't gotta worry about anybody seeing a half-written value. π¦
the arguments are as follows, bestie:
targetβ the remotely accessible data object to be set on the remote PE. like, that's the thing on the other end you're updating.valueβ the value to be atomically written to the remote PE. this is the actual payload you're sending over.peβ an integer that indicates the PE number upon whichtargetis to be updated. if you're using Fortran, it must be a default integer value β so don't get cute with it, okay? π
ngl, "remotely accessible data object" is doing a lot of work in that sentence, but that's the whole vibe: you point at a thing on another PE, hand over a value, and the operation lands atomically. periodt.
π RETURN VALUES π
NONE β literally nothing, bestie. these routines don't return a value. no exit status, no secret code, no little treat. just the atomic write and then they're gone.
π«Ά SEE ALSO π«Ά
πΈ okay that's the whole page!! this one is from Open MPI, and the footer energy is very much gitclone / Unreleased developer copy / SHMEM_SET(3) β so yeah, she's a developer-copy girly, not a polished release. still slay tho. πβ¨π
π¦ where this page comes from
- arch rolling: nvhpc-comm-libs 26.9-1 Β· LicenseRef-NVIDIA-HPC-SDK
- opensuse-leap 16.0: openmpi4-docs 4.1.8-160000.3.1 Β· BSD-3-Clause
- opensuse-leap 16.0: openmpi4-docs 4.1.8-160000.3.1 Β· BSD-3-Clause
- opensuse-leap 16.0: openmpi4-docs 4.1.8-160000.3.1 Β· BSD-3-Clause
- opensuse-leap 16.0: openmpi4-docs 4.1.8-160000.3.1 Β· BSD-3-Clause
- Copyright (c) 2016 Mellanox Technologies, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms