SHMEM_LONGLONG_ADD(3)

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

πŸ’– NAME πŸ’–

okay so bestie, welcome to SHMEM_LONGLONG_ADD(3) from Open MPI β€” the atomic-add page, and yes she has many aliases because one name was simply not enough for her.

The whole girl squad of "add value to a thing, atomically":

  • shmem_int_add
  • shmem_int4_add
  • shmem_int8_add
  • shmem_long_add
  • shmem_longlong_add

…and they all do ONE thing: perform an atomic add operation. that's it. that's the whole personality. πŸ’…


✨ SYNOPSIS ✨

C or C++:

#include <mpp/shmem.h>

void shmem_int_add(int *target, int value, int pe)
void shmem_long_add(long *target, long value, int pe)
void shmem_longlong_add(long long *target, long long value,
  int pe)

Fortran:

include 'mpp/shmem.h'

INTEGER pe

CALL SHMEM_INT4_ADD(target, value, pe)
CALL SHMEM_INT8_ADD(target, value, pe)

πŸŽ€ DESCRIPTION πŸŽ€

so the atomic add routines literally just add value to the data sitting at address target on PE pe. and here's the iconic part, the main character energy: the operation completes without the possibility of another process updating target between the time of the fetch and the update. no interlopers. no sneaky concurrent writes. it's giving locked in. πŸ”₯

the arguments, let's go:

  • target β€” the remotely accessible integer data object that's getting updated on the remote PE. iykyk: if you're in C/C++, the type of target should match what's implied in the SYNOPSIS section up there. if you're in Fortran, it must be of type integer with an element size of 4 bytes for SHMEM_INT4_ADD and 8 bytes for SHMEM_INT8_ADD. get those sizes right or don't come to the function call. 🫢
  • value β€” the value being atomically added to target. C/C++ bestie? type should match the SYNOPSIS section. Fortran bestie? it must be of type integer with an element size of target. πŸ’–
  • pe β€” an integer that says which PE number target is going to be updated on. Fortran girlies: it must be a default integer value. ✨

πŸ“ NOTES πŸ“

quick vocab check: the term remotely accessible is defined over in intro_shmem(3). go read her, she's the lore.

See also:


2003-2026, The Open MPI Community


and that's the page, bestie!! πŸ¦‹πŸŒΈβœ¨ this was SHMEM_LONGLONG_ADD(3) from Open MPI, dropped on Sep 10, 2026 β€” slay, now go atomically add something. periodt. πŸ’…πŸ’–

πŸ“¦ where this page comes from