
70 Cray T3E User’s Guide
PE#2: tid=393218 nproc=3
PE#0: tid=393216 nproc=3
PE#1: tid=393217 nproc=3
PE#0: message=0
PE#2: message=2
PE#1: message=1
7.3.3 Further information about PVM
CSC has published a textbook on PVM in Finnish [Saa95].
The Cray implementation of PVM is described in the publication Message
Passing Toolkit: PVM Programmer’s Manual [Crah].
Some examples of PVM programs are available in the WWW system, see
the address
http://www.csc.fi/programming/examples/pvm/
7.4 Shared Memory Library (SHMEM)
In addition to the standard message-passing libraries MPI and PVM, there
is a package of very fast routines for transferring data between the
local memories of the PEs. The collection of these routines is known as
the Shared Memory Library, usually referred to as the SHMEM library.
SHMEM routines can be used either as an alternative for MPI or PVM or
together with them in the same program.
Examples of the SHMEM routines available on the T3E are listed in Ta-
ble 7.2. For a complete list and manual summary pages give the com-
mand
man intro_shmem
Because of their low-level nature SHMEM routines have minimal over-
head and latency. Thus they offer almost always the fastest way to carry
out operations involving one or several remote memories. The routines
are one-sided, which means that there is no pairing of send and receive
calls as in MPI or PVM, but instead just one call from the PE that reads
from or writes into the memory of another PE.
As a drawback, the programmer must pay special attention to data co-
herence, i.e., that the data actually transferred is also the data that was
meant to be transferred in the first place, or that no relevant data is
overwritten in the remote memory. Furthermore, the programs using
SHMEM routines are not portable to other systems.
To have all the necessary constants and structures at your disposal you
must give an include command at the beginning of the program. For the
Komentarze do niniejszej Instrukcji