Cypress CSC-1200T Guía de usuario Pagina 74

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 124
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 73
74 Cray T3E User’s Guide
Other point-to-point routines
The routines shmem_put and shmem_get operate correctly when the data
being transferred consists of items with a size of 8 bytes. If the size
of a single data item is only 4 bytes (32 bits), one must call instead
the routines shmem_put4 or shmem_get4 in Fortran or shmem_put32,
shmem_get32 in C and C++.
Another crucial restriction for the basic versions of shmem_put and
shmem_get is that they accept only consecutive data items. To move
data with a non-unit stride from a PE to another (or to itself, for that
matter), there are extended versions shmem_iget and shmem_iput.
The C language syntax for shmem_iget is
void shmem_iget(void *target, void *source, int target_inc,
int source_inc, int len, int pe)
For Fortran 90 this is
CALL SHMEM_IGET(target, source, target_inc, source_inc, &
len, pe)
The syntax is similar for the routine shmem_iput and the correspond-
ing 4-byte versions. The integer valued arguments target_inc and
source_inc contain the strides between consecutive data items in the
target and the source data, respectively.
Atomic operations
SHMEM library contains several fast routines for updating or checking
the value of a single variable on a remote PE. These routines are called
atomic operations. These include, e.g., shmem_inc for incrementing the
value of a remote data object and shmem_swap for exchanging the values
of a single remote and local variable.
7.4.4 Reduction routines
A reduction routine computes a single value from a data object dis-
tributed over several PEs’ memories, e.g., the sum of the elements of a
vector. SHMEM contains the following reduction routines: shmem_and,
shmem_max, shmem_min, shmem_or, shmem_prod, shmem_sum and
shmem_xor. A general call to these routines in C is of the form
void shmem_type_op_to_all(type *target, type *source,
int nreduce, int PE_start, int logPE_stride, int PE_size,
type *pWrk, long *pSync);
where type is one of {short, int, float, double, complex, complexd}
and op is one of {sum, prod, min, max, and, or, xor}. In Fortran, the cor-
Vista de pagina 73
1 2 ... 69 70 71 72 73 74 75 76 77 78 79 ... 123 124

Comentarios a estos manuales

Sin comentarios