Scripted HTML version of 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
integer North,South,East,West
# These are the processor ranks of 4 nearest neighbors
integer rowtype,coltype # the new derived types
# Fortran stores elements in columns contiguously
# (C has opposite convention!)
call MPI_TYPE_CONTIGUOUS(NLOC, MPI_REAL, coltype, ierr)
call MPI_TYPE_COMMIT(coltype,ierr)
# rows (North and South) are not contiguous
call MPI_TYPE_VECTOR(NLOC, 1, NLOC2, MPI_REAL, rowtype, ierr)
call MPI_TYPE_COMMIT(rowtype,ierr)
call MPI_SEND(array(2,2), 1, coltype, west,0,comm,ierr)
call MPI_SEND(array(2,NLOC+1), 1, coltype, east,0,comm,ierr)
call MPI_SEND(array(2,2), rowtype, north, 0,comm,ierr)
call MPI_SEND(array(NLOC+1,2), 1, rowtype, south, 0,comm,ierr)



© 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