Copyright
- Provided by: openmpi-doc (Version: 5.0.10-1)
- Source: openmpi
- Report a bug
shmem_character_get(3), shmem_complex_get(3), shmem_double_get <#shmem-double-get>(3), shmem_float_get <#shmem-float-get>(3), shmem_get4(3), shmem_get8(3), shmem_get32 <#shmem-get32>(3), shmem_get64 <#shmem-get64>(3), shmem_get128 <#shmem-get128>(3), shmem_getmem <#shmem-getmem>(3), shmem_int_get <#shmem-int-get>(3), shmem_integer_get(3), shmem_logical_get(3), shmem_long_get <#shmem-long-get>(3), shmem_longdouble_get <#shmem-longdouble-get>(3), shmem_longlong_get <#shmem-longlong-get>(3), shmem_real_get(3), shmem_short_get <#shmem-short-get>(3) - Transfers data from a specified processing element (PE).
The shmem_get routines transfer nelems elements of the data object at address source on the remote PE pe, to the data object at address target on the local PE. These routines return after the data has been copied to address target on the local PE.
The arguments are as follows:
The target and source data objects must conform to typing constraints, which are as follows:
shmem_short_get <#shmem-short-get>: Elements of type short.
shmem_int_get <#shmem-int-get>: Elements of type int.
shmem_long_get <#shmem-long-get>: Elements of type long.
shmem_longlong_get <#shmem-longlong-get>: Elements of type long long.
shmem_float_get <#shmem-float-get>: Elements of type float.
shmem_double_get <#shmem-double-get>: Elements of type double.
shmem_longdouble_get <#shmem-longdouble-get>: Elements of type long double.
SHMEM_COMPLEX_GET: Elements of type complex of default size.
SHMEM_DOUBLE_GET: (Fortran) Elements of type double precision.
SHMEM_INTEGER_GET: Elements of type integer.
SHMEM_LOGICAL_GET: Elements of type logical.
SHMEM_REAL_GET: Elements of type real.
If you are 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).
See intro_shmem(3) for a definition of the term remotely accessible.
Consider this simple example for Fortran.
PROGRAM REDUCTION
REAL VALUES, SUM
COMMON /C/ VALUES
REAL WORK
CALL START_PES(0) ! ALLOW ANY NUMBER OF PES
VALUES = MY_PE() ! INITIALIZE IT TO SOMETHING
CALL SHMEM_BARRIER_ALL
SUM = 0.0
DO I = 0,NUM_PES()-1
CALL SHMEM_REAL_GET(WORK, VALUES, 1, I)
SUM = SUM + WORK
ENDDO
PRINT *, 'PE ', MY_PE(), ' COMPUTED SUM=', SUM
CALL SHMEM_BARRIER_ALL
END
See also:
2003-2026, The Open MPI Community