HTML version of Scripted Foils prepared 11 November 1996

Foil 16 Simple Example of Derived Datatype

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 97.9
1 integer derivedtype, ...
2 call MPI_TYPE_CONTIGUOUS(10, MPI_REAL, derivedtype, ierr)
3 call MPI_TYPE_COMMIT(derivedtype, ierr)
4 call MPI_SEND(data, 1, derivedtype, dest,tag, MPI_COMM_WORLD, ierr)
5 call MPI_TYPE_FREE(derivedtype, ierr)
6 is equivalent to simpler single call
7 call MPI_SEND(data, 10, MPI_REAL, dest, tag, MPI_COMM_WORLD, ierr)
8 and each sends 10 contiguous real values at location data to process dest

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