SHMEM_IGET32(3)

πŸ’… SHMEM_IGET32(3) β€” the Open MPI manual page, but make it make sense

okay so first things first, bestie: this is the Open MPI manual page for SHMEM_IGET32(3), and it's actually a whole family of pages bundled together. The full squad is shmem_complex_iget(3), shmem_double_iget(3), shmem_float_iget(3), shmem_iget4(3), shmem_iget8(3), shmem_iget32(3), shmem_iget64(3), shmem_iget128(3), shmem_int_iget(3), shmem_integer_iget(3), shmem_logical_iget(3), shmem_long_iget(3), shmem_longdouble_iget(3), shmem_longlong_iget(3), shmem_real_iget(3), and shmem_short_iget(3) β€” and they all do the same iconic thing: transfers strided data from a specified processing element (PE) πŸ’«


✨ SYNOPSIS ✨

🩡 C or C++

#include <mpp/shmem.h>

void shmem_iget32(void *target, const void *source,
  ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe)

void shmem_iget64(void *target, const void *source,
  ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe)

void shmem_iget128(void *target, const void *source,
  ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe)

void shmem_int_iget(int *target, const int *source,
  ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe)

void shmem_double_iget(double *target, const double *source,
  ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe)

void shmem_float_iget(float *target, const float *source,
  ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe)

void shmem_long_iget(long *target, const long *source,
  ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe)

void shmem_longdouble_iget(long double *target,
  const long double *source, ptrdiff_t tst, ptrdiff_t sst,size_t len, int pe)

void shmem_longlong_iget(long long *target,
  const long long *source, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe)

void shmem_short_iget(short *target,
  const short *source, ptrdiff_t tst, ptrdiff_t sst, size_t len, int pe)

🧚 Fortran

INCLUDE "mpp/shmem.fh"

INTEGER tst, sst, len, pe

CALL SHMEM_COMPLEX_IGET(target, source, tst, sst, len,
& pe)

CALL SHMEM_DOUBLE_IGET(target, source, tst, sst, len,
& pe)

CALL SHMEM_IGET4(target, source, tst, sst, len, pe)

CALL SHMEM_IGET8(target, source, tst, sst, len, pe)

CALL SHMEM_IGET32(target, source, tst, sst, len, pe)

CALL SHMEM_IGET64(target, source, tst, sst, len, pe)

CALL SHMEM_IGET128(target, source, tst, sst, len, pe)

CALL SHMEM_INTEGER_IGET(target, source, tst, sst, len,
& pe)

CALL SHMEM_LOGICAL_IGET(target, source, tst, sst, len,
& pe)

CALL SHMEM_REAL_IGET(target, source, tst, sst, len, pe)

🌸 DESCRIPTION 🌸

so the strided get routines do the absolute most in the best way: they retrieve array data that's available at address source on the remote PE (pe). The elements of the source array are separated by a stride sst. Once that data is received, it gets stored at the local memory address target, separated by stride tst. And the routines return when the data has been copied into the local target array. no cap, that's the whole vibe πŸ”₯

πŸŽ€ The arguments, explained with love

  • target β€” the array to be updated on the local PE. this is your home base, where the goodies land πŸ’–
  • source β€” the array containing the data to be copied, sitting on the remote PE. the origin story ✨
  • tst β€” the stride between consecutive elements of the target array. the stride gets scaled by the element size of the target array, and a value of 1 indicates contiguous data. tst must be of type integer. If you're calling from Fortran, it must be a default integer value. periodt.
  • sst β€” the stride between consecutive elements of the source array. this one's scaled by the element size of the source array, and a value of 1 indicates contiguous data. sst must be of type integer. If you're calling from Fortran, it must be a default integer value.
  • len β€” number of elements in the target and source arrays. len must be of type integer. If you're using Fortran, it must be a constant, variable, or array element of default integer type.
  • pe β€” the PE number of the remote PE. pe must be of type integer. If you're using Fortran, it must be a constant, variable, or array element of default integer type.

πŸ¦‹ Typing constraints (the vibe check)

The target and source data objects must conform to typing constraints, which are as follows:

  • shmem_iget32, shmem_iget4 β€” any noncharacter type that has a storage size equal to 32 bits.
  • shmem_iget64, shmem_iget8 β€” any noncharacter type that has a storage size equal to 64 bits.
  • shmem_iget128 β€” any noncharacter type that has a storage size equal to 128 bits.
  • shmem_short_iget β€” elements of type short.
  • shmem_int_iget β€” elements of type int.
  • shmem_long_iget β€” elements of type long.
  • shmem_longlong_iget β€” elements of type long long.
  • shmem_float_iget β€” elements of type float.
  • shmem_double_iget β€” elements of type double.
  • shmem_longdouble_iget β€” elements of type long double.
  • SHMEM_COMPLEX_IGET β€” elements of type complex of default size.
  • SHMEM_DOUBLE_IGET β€” (Fortran) elements of type double precision.
  • SHMEM_INTEGER_IGET β€” elements of type integer.
  • SHMEM_LOGICAL_IGET β€” elements of type logical.
  • SHMEM_REAL_IGET β€” elements of type real.

and because the original page said it twice, we're saying it twice, bestie, i don't make the rules 😭 (the original literally repeats this block β€” iconic behavior, honestly):

  • shmem_longdouble_iget β€” elements of type long double.
  • SHMEM_COMPLEX_IGET β€” elements of type complex of default size.
  • SHMEM_DOUBLE_IGET β€” (Fortran) elements of type double precision.
  • SHMEM_INTEGER_IGET β€” elements of type integer.
  • SHMEM_LOGICAL_IGET β€” elements of type logical.
  • SHMEM_REAL_IGET β€” elements of type real.
⚠️ real talk: if you're using Fortran, data types must be of default size. for example, a real variable must be declared as REAL, REAL*4, or REAL(KIND=4). don't try to be cute with it πŸ’€

πŸ‘‘ NOTES πŸ‘‘

See intro_shmem(3) for a definition of the term remotely accessible. iykyk 🫢


🌈 EXAMPLES 🌈

okay here's a simple example that uses shmem_logical_iget in a Fortran program. compile this example with the -lsma compiler option, bestie, don't forget πŸ’…

PROGRAM STRIDELOGICAL
  LOGICAL SOURCE(10), TARGET(5)
  SAVE SOURCE ! SAVE MAKES IT REMOTELY ACCESSIBLE
  DATA SOURCE /.T.,.F.,.T.,.F.,.T.,.F.,.T.,.F.,.T.,.F./
  DATA TARGET / 5*.F. /

  CALL START_PES(2)
  IF (MY_PE() .EQ. 0) THEN
    CALL SHMEM_LOGICAL_IGET(TARGET, SOURCE, 1, 2, 5, 1)
    PRINT*,'TARGET AFTER SHMEM_LOGICAL_IGET:',TARGET
  ENDIF
  CALL SHMEM_BARRIER_ALL
END

⭐ SEE ALSO:

intro_shmem(3) shmem_get(3) shmem_quiet(3)


2003-2026, The Open MPI Community


and that's the whole page, bestie πŸ’– mwah. this lil gem is from the Open MPI manual, page SHMEM_IGET32(3), dated May 14, 2026 β€” go forth and stride slay πŸ§šβœ¨πŸŽ€

πŸ“¦ where this page comes from