Go to the first, previous, next, last section, table of contents.


Basic SHMEM concepts

SHMEM remote memory access routines directly access the remote node's virtual memory. Therefore, the calling node must know the virtual address of the remote buffer on the remote node. There are two ways to do this: Either use global/static variables in C (common variables in Fortran), or have each process tell all the others which virtual addresses are valid to it (using a global/static [or common] variable to bootstrap this scheme).

SHMEM has the concept of an active set, which is a subset of all of the nodes in the program. An active set is described by the tuple (PE_start, logPE_stride, PE_size). PE_start signifies the lowest number node that is in the active set. logPE_stride indicates the log, base 2, of the distance between active nodes. PE_size specifies the number of nodes in the active set. A SHMEM function is usually directed towards a particular active set. An example use of an active set is described in the shmem_broadcast() section (see section Data movement functions).

There are two types of calling semantics for SHMEM routines: collective and individual. Collective routines require that all nodes in the active set participate in the call, and with identical arguments. Individual routines are invoked by only one node, regardless of the number of nodes affected by the operation.

Many SHMEM functions require user-provided workspaces that contain temporary storage needed by the function. There are two types of workspaces needed by SHMEM functions: data and synchronization. Data workspaces do not need to be initialized before use, while synchronization workspaces must be initialized (usually to _SHMEM_SYNC_VALUE) before their first use.


Go to the first, previous, next, last section, table of contents.