Basic HTML version of Foils prepared 19 September 98

Foil 69 Use of Derived Types in Jacobi Iteration

From MPI Message Passing Interface Computational Science for Simulations -- Fall Semester 1998. by Geoffrey C. Fox, Nancy McCracken


1 Display Fortran version (interchange row and column for C)
2 Integer nbrtop, nbrbottom, nbrleft, nbrright
3 # These are processor ranks of 4 nearest neighbors ( top, bottom, left and right respectively) -- find from MPI_CART_SHIFT (see later)
4 integer rowtype, coltype # The new derived types
5 call MPI_TYPE_CONTIGUOUS(nxblock, MPI_REAL, coltype, ierr)
6 call MPI_TYPE_COMMIT(coltype, ierr)
7 call MPI_TYPE_VECTOR(nyblock, 1, nxblock+2, MPI_REAL, rowtype, ierr)
8 call MPI_TYPE_COMMIT(rowtype, ierr)
9 # Now Transmit from internal edges rows to guard rings on neighbors
10 call MPI_SEND( u(1,1), 1, coltype, nbrleft, 0, comm, ierr)
11 call MPI_SEND( u(1,nyblock), 1, coltype, nbrright, 0, comm, ierr)
12 call MPI_SEND( u(1,1), 1, rowtype, nbtop, 0, comm, ierr)
13 call MPI_SEND( u(nxblock,1), 1, rowtype, nbtop, 0, comm, ierr)
14
15

in Table To:


© 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 Sun Apr 11 1999