HTML version of Scripted Foils prepared 11 November 1996

Foil 15 Derived Datatype Basics

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 355.6
1 Derived Datatypes should be declared integer in Fortran and MPI_Datatype in C
2 Generally have form {(type0,disp0),(type1,disp1)...(type(n-1),disp(n-1))} with list of primitive data types typei and displacements (from start of buffer) dispi
3 call MPI_TYPE_CONTIGUOUS (count, oldtype, newtype, ierr)
  • creates a new datatype newtype made up of count repetitions of old datatype oldtype
4 one must use call MPI_TYPE_COMMIT(derivedtype,ierr)
5 before one can use the type derivedtype in a communication call
6 call MPI_TYPE_FREE(derivedtype,ierr) frees up space used by this derived type

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