SHMEM_IGET32(3)

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

πŸ¦‹ NAME πŸ¦‹

okay bestie, gather round, because this is the Open MPI manual page for shmem_iget32 (section 3) and it's literally the whole strided-get friend group β€” they all do the exact same thing, just for different data types πŸ’…

Transfers strided data from a specified processing element (PE) ✨

and the whole squad is:


✨ 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 here's the tea, bestie πŸ«– β€” the strided get routines grab array data that lives at address source on a remote PE (pe). the elements of that source array are spaced out by a stride called sst. once the data arrives, it gets stashed at the local memory address target, spaced out by a stride called tst. and the routines only return once all that data has been copied into the local target array. no shortcuts, no half-delivery, periodt ✨

the arguments are giving:

  • target β€” the array on the local PE that's getting updated. main character of the write-up πŸ’…
  • source β€” the array holding the data to be copied, sitting 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 the data is contiguous. tst has to be of type integer, and if you're calling from Fortran it must be a default integer value.
  • sst β€” the stride between consecutive elements of the source array. it gets scaled by the element size of the source array. a value of 1 means the data is contiguous. sst has to be of type integer, and if you're calling from Fortran it must be a default integer value.
  • len β€” number of elements in the target and source arrays. len has to be of type integer, and in Fortran it must be a constant, variable, or array element of default integer type.
  • pe β€” the PE number of the remote PE. pe has to be of type integer, and in Fortran it must be a constant, variable, or array element of default integer type.

πŸŽ€ Typing constraints (read this, it's not optional)

the target and source data objects have to conform to typing constraints, which are literally 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 there's a little Fortran addendum, no cap: if you're using Fortran, data types must be of default size. like, for example, a real variable must be declared as REAL, REAL*4, or REAL(KIND=4) πŸ’–


🌈 NOTES 🌈

go check intro_shmem(3) for the definition of the term remotely accessible, iykyk πŸ‘‘


πŸ“ EXAMPLES πŸ“

here's a cute little Fortran moment that uses shmem_logical_iget. compile this one 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) β€” go give them a read, they're iconic 🫢


Copyright: 2003-2026, The Open MPI Community πŸ‘‘

and that's the whole page, bestie β€” courtesy of the Open MPI gang, section 3, dated Sep 10, 2026. shmem_iget32(3) ate and left no crumbs πŸ’…βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from