SHMEM_INT_SET(3)
β¨ SHMEM_INT_SET β¨ β it's giving atomic remote vibes π
okay bestie, so this is a whole lil family of routines from the Open MPI manual, and they all do the same iconic thing: yeet a value into a remote data object, atomically. no cap. π«Ά
Meet the squad (all of these live on this one page, fr fr):
shmem_double_setshmem_float_setshmem_int_setshmem_long_setshmem_longlong_setshmem_int4_setshmem_int8_setshmem_real4_setshmem_real8_set
and collectively they're "Atomically sets the value of a remote data object." periodt. π
πΈ 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)
like, look at that include line bestie, mpp/shmem.h for the C/C++ girlies and mpp/shmem.fh for the Fortran icons π
π¦ DESCRIPTION π¦
so the set routines write the value into the address target on pe, and they do it as an atomic operation. as in, nobody's gonna catch it mid-write, it's a clean single move. main character energy, honestly.
the arguments, bestie, let me break them down for you:
targetβ the remotely accessible data object that's getting set on the remote PE. that's the lil spot on the other PE that's about to be blessed with a new value πvalueβ the value that gets atomically written to the remote PE. the actual goods. the content. β¨peβ an integer that says which PE numbertargetis getting updated on. and heads up, if you're rolling with Fortran, it must be a default integer value. no fancy integer kinds, okay? π
π RETURN VALUES π
NONE
that's right. nothing. zero. it does its lil atomic thing and gives you absolutely nothing back. and that's on being unbothered. π
β¨ also see: intro_shmem(3) β go read it, iykyk
π Copyright
2003-2026, The Open MPI Community
okay that's the whole page, bestie! every option, every signature, every lil detail β all intact, all slaying π go forth and atomically set things. mwah π
Open MPI manual page, dated Sep 10, 2026 β source: the Open MPI project, and this page is SHMEM_INT_SET(3). take care of her ππ¦π
π¦ 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