SHMEM_INT_INC(3)
π SHMEM_INT_INC(3) π
okay bestie, this one lives in the Open MPI family, and it's the manual page for a whole squad of little functions:
shmem_int4_inc(3)shmem_int8_inc(3)shmem_int_inc(3)shmem_long_inc(3)shmem_longlong_inc(3)
and they all do one iconic thing: an atomic increment on a remote data object. that's it, that's the whole personality. β¨
πΈ SYNOPSIS πΈ
C or C++ π«Ά
#include <mpp/shmem.h>
int shmem_int_inc(int *target, int pe)
long shmem_long_inc(long *target, int pe)
long long shmem_longlong_inc(long long *target, int pe)
Fortran π
INCLUDE "mpp/shmem.fh"
INTEGER pe
INTEGER(KIND=4) SHMEM_INT4_INC, target4
INTEGER(KIND=8) SHMEM_INT8_INC, target8
ires4 = SHMEM_INT4_INC(target4, pe)
ires8 = SHMEM_INT8_INC(target8, pe)
π DESCRIPTION π
so basically, the atomic increment routines replace the value of target with its value incremented by one. and the glow-up part is that the operation must be completed without the possibility of another process updating target between the time of the fetch and the update. no sneaky little race condition is getting in here, periodt. π₯
The arguments are as follows:
targetβ the remotely accessible integer data object to be updated on the remote PE. the type oftargetshould match that implied in the SYNOPSIS section (iykyk, keep your types matching bestie π ).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.
π NOTES π
the term remotely accessible is defined over in intro_shmem(3). go read that if you need the full lore. π
π¦ RETURN VALUES π¦
None. that's right, nothing. no return value, no drama. π
See also:
β Copyright β
2003-2026, The Open MPI Community
and that's the whole page bestie, you ate it π β¨ this was the SHMEM_INT_INC(3) page from the Open MPI manual, dated Sep 10, 2026 β go forth and increment atomically, mwah π«Άπ
π¦ 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