C o d e
  S c i e n t i f i c   P a r a l l e l   C o m p u t i n g
C h a p t e r   5
ABOUT CODE CONTACT ERRATA HOME LINKS PUP


The program labelled standalone was tested with MPICH2, other codes fragments for this chapter have not been tested.

program file description
5.1 semaforexampl.F pseudo-code to illustrate use of semaphore
5.2 see text code for two processes illustrating a race condition
5.3 barrierdodocode.F pseudo-code to illustrate use of barrier
5.4 sharmemsumexpl.F parallel summation using a shared memory model
5.5 pienodeidmess.F message passing code using the nodeid()
5.6 piennodesmess.F message passing code using nnodes()
5.7 batonpass.F
synchronization using baton using message passing (Fortran and MPI), also see MPIbatonpass.f, program 7.1.
5.8 partsumesspass.F message passing code for partial sum
5.9 mexsumpartsumlock.F partial sum using nodeid()
5.10 jakepreambl.F declarations required for Jacobi codes
5.11 samseqjakode.F sample Jacobi iteration sequential code
5.12 samshmemparjakode.F shared memory parallel implementation of Jacobi iteration
5.13 dismemparjakode.F message passing parallel implementation of Jacobi iteration