HTML version of Scripted Foils prepared 11 November 1996

Foil 19 Use of Derived Types in Jacobi Iteration with Guard Rings--II

From CPS615-Completion of MPI foilset and Application to Jacobi Iteration in 2D Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 7 November 96. by Geoffrey C. Fox *
Secs 374.4
1 integer North,South,East,West
2 # These are the processor ranks of 4 nearest neighbors
3 integer rowtype,coltype # the new derived types
4 # Fortran stores elements in columns contiguously
5 # (C has opposite convention!)
6 call MPI_TYPE_CONTIGUOUS(NLOC, MPI_REAL, coltype, ierr)
7 call MPI_TYPE_COMMIT(coltype,ierr)
8 # rows (North and South) are not contiguous
9 call MPI_TYPE_VECTOR(NLOC, 1, NLOC2, MPI_REAL, rowtype, ierr)
10 call MPI_TYPE_COMMIT(rowtype,ierr)
11 call MPI_SEND(array(2,2), 1, coltype, west,0,comm,ierr)
12 call MPI_SEND(array(2,NLOC+1), 1, coltype, east,0,comm,ierr)
13 call MPI_SEND(array(2,2), rowtype, north, 0,comm,ierr)
14 call MPI_SEND(array(NLOC+1,2), 1, rowtype, south, 0,comm,ierr)

Table Font Size


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Fri Aug 15 1997