SHMEM_INT_IGET(3)

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

SHMEM_INT_IGET πŸ’– aka the strided-get girlies (Open MPI, bestie)

ok so real talk β€” this is the Open MPI family of strided get routines. There's a whole squad of them and they all do the same iconic thing: yoink data from a remote PE, except everything's strided on both sides. No cap. πŸ’…

The full crew, all under the SHMEM_INT_IGET(3) umbrella (the page header literally lists every one of them):


πŸŽ€ NAME πŸŽ€

Transfers strided data from a specified processing element (PE). That's it, that's the whole vibe check. It's giving "fetch me that array but, like, skip every other element." ✨


πŸ¦‹ 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 🌸

ok bestie, storytime. The strided get routines pull array data that lives at address source on a remote PE (pe). The elements of that source array aren't all cozy and next-to-each-other β€” they're separated by a stride, sst. Once the data arrives, 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 β€” so when they come back, the data's already there in your target. periodt. πŸ”₯

Here's the argument breakdown, no gatekeeping:

  • target β€” the array that gets updated on the local PE. Your home turf. 🏠
  • source β€” the array holding the data to be copied, chillin' on the remote PE.
  • tst β€” the stride between consecutive elements of the target array. It gets scaled by the element size of the target array. A value of 1 means contiguous data (aka no skips, just vibes). tst must be of type integer. If you're calling from Fortran, it must be a default integer value.
  • sst β€” the stride between consecutive elements of the source array. Scaled by the element size of the source array. A value of 1 means contiguous data. sst must be of type integer. From Fortran? Default integer value, bestie.
  • 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 drama)

The target and source data objects must conform to typing constraints. They are, and I quote the vibe:

  • 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.
  • 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 yes, the original page does say a couple of those twice. I'm keeping it exactly as-is because the rules are the rules and I do not make the rules. πŸ’€)

If you're using Fortran, data types must be of default size. Like, a real variable has to be declared as REAL, REAL*4, or REAL(KIND=4). Don't be out here with some fancy off-brand kind, it will not slay. πŸ™ˆ


🫢 NOTES 🫢

Go read intro_shmem(3) if you want the definition of the term remotely accessible. That's the lore drop you need. iykyk. πŸ’œ


⭐ EXAMPLES ⭐

Here's a cute little Fortran moment using shmem_logical_iget. Compile this with the -lsma compiler option, bestie. 🧚

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!! 🌈✨ this one's from the Open MPI crew, page dated Sep 10, 2026, and it's the SHMEM_INT_IGET(3) page β€” the strided get girlies ate and left no crumbs. go forth and stride, mwah πŸ’…πŸ’–πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from