SHMEM_LONGLONG_INC(3)

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

✨ SHMEM_LONGLONG_INC β€” atomic glow-up for your remote integers ✨

okay bestie, gather round, because this is the Open MPI manual page for shmem_int4_inc(3), shmem_int8_inc(3), shmem_int_inc <#shmem-int-inc>(3), shmem_long_inc <#shmem-long-inc>(3), and shmem_longlong_inc(3). what do they do? they perform an atomic increment operation on a remote data object. that's the whole vibe. adding one. remotely. atomically. iconic behavior honestly. πŸ‘‘


🌸 SYNOPSIS 🌸

so here's how you call it in 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)

and in 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)

copy it exactly, do not freestyle the types, i am begging 🫢


πŸ’– DESCRIPTION πŸ’–

The atomic increment routines replace the value of target with its value incremented by one. literally just +1, but make it atomic.

and the tea is: the operation must be completed without the possibility of another process updating target between the time of the fetch and the update. no sneaky interlopers. no race conditions. periodt. πŸ’…

The arguments are as follows:

  • target β€” The remotely accessible integer data object to be updated on the remote PE. The type of target should match that implied in the SYNOPSIS section. (so like… match your types bestie, the compiler IS watching 🧚)
  • pe β€” An integer that indicates the PE number upon which target is to be updated. If you are using Fortran, it must be a default integer value. ✨

πŸ“ NOTES πŸ“

The term remotely accessible is defined in intro_shmem(3). go read it, it's giving required reading. πŸ“š


πŸŽ€ RETURN VALUES πŸŽ€

None. </3

that's it. nothing. no return value. she does the thing and she comes back with zero receipts. πŸ’€

See also:


2003-2026, The Open MPI Community


okay lovelies, that's the whole page πŸ’– this was the Open MPI version of SHMEM_LONGLONG_INC(3), dated Sep 10, 2026. now go increment something remotely and responsibly. mwah. πŸ¦‹πŸ’…βœ¨

πŸ“¦ where this page comes from