SHMEM_INC(3)

πŸ’– SHMEM_INC(3) β€” Open MPI atomic-increment besties πŸ’–

okay so welcome to the Open MPI SHMEM_INC(3) page, bestie β€” this one is all about the atomic increment routines, and they are literally icon behavior. The whole squad is shmem_int4_inc(3), shmem_int8_inc(3), shmem_int_inc(3), shmem_long_inc(3), and shmem_longlong_inc(3). Their whole thing? Performing an atomic increment operation on a remote data object. no cap. ✨


πŸŽ€ 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 🌸

The atomic increment routines replace the value of target with its value incremented by one. The operation must be completed without the possibility of another process updating target between the time of the fetch and the update. That’s the whole slay: fetch-and-update, but make it atomic, 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.
  • 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). iykyk.


πŸ“ RETURN VALUES πŸ“

None. That’s it. No return value moment, bestie. 😭


🌈 SEE ALSO 🌈

intro_shmem(3)


byeeee πŸ’œ β€” cute little footer sign-off: source gitclone, version Unreleased developer copy, page tag SHMEM_INC(3), and no separate date is printed in the original footer. 🫢✨

πŸ“¦ where this page comes from
  • arch rolling: nvhpc-comm-libs 26.9-1 Β· LicenseRef-NVIDIA-HPC-SDK
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms