Cypress CSC-1200T Guia do Utilizador Página 68

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 124
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 67
68 Cray T3E User’s Guide
Some examples of MPI programs are available in the WWW system, see
the address
http://www.csc.fi/programming/examples/mpi/
7.3 Parallel Virtual Machine (PVM)
PVM (Parallel Virtual Machine) is a message-passing library that is well-
suited for heterogeneous computing. It is somewhat older and clumsier
to use than MPI.
7.3.1 Using PVM on the T3E
You do not need to use any special linker options to use PVM calls in
your program. Please note that the spawn routines should not be used on
the T3E, because you would be running one process in each processing
element and the number of processing elements is fixed during the run.
You can use the routine pvm_get_PE to find out the id number of each
task. An example is given below. This routine is a T3E specific feature
and is not included in most other PVM implementations.
7.3.2 An example of a PVM program
The following example shows a simple PVM program on the Cray T3E.
In the example, the number of processors specified by the command
mpprun, is passed to the variable nproc. The process number 0 sends
a distinct message to all nodes, and these print out what they received.
Due to buffering, the master node 0 can send a message to itself, too.
PROGRAM main
IMPLICIT NONE
INCLUDE ’fpvm3.h’
INTEGER, PARAMETER :: tag = 100, msglen = 1, stride = 1
INTEGER :: mytid, mype, nproc, j, to, rc, &
from, message
CALL PVMFmytid(mytid)
CALL PVMFgetpe(mytid, mype)
CALL PVMFgsize(PVMALL, nproc)
WRITE (*,*) ’PE#’,mype,’: tid=’,mytid,’ nproc=’,nproc
IF (mype == 0) THEN
DOj=0,nproc-1
CALL PVMFinitsend(PvmDataRaw, rc)
Vista de página 67
1 2 ... 63 64 65 66 67 68 69 70 71 72 73 ... 123 124

Comentários a estes Manuais

Sem comentários