TutorialsTutorials HomeMPI IntroductionIndexBasic Concepts Initialization Data Types Basic Send Basic Receive Broadcast Reduction Example
FullDocument
Related InfoMPI ResourcesIBM DocsProgramming GuideSubroutine Reference
|
Data typesOne argument that usually must be given to MPI routines is the type of the data being passed. User-defined datatypes (an advanced MPI topic) allows MPI to automatically scatter and gather data to and from non-contiguous buffers. MPI defines a number of constants that correspond to language datatypes in Fortran and C. When an MPI routine is called, the Fortran data type of the data being passed must match the corresponding MPI integer constant. The following table the MPI 1.2 datatype definitions. Type Length --------------- ------ MPI_PACKED 1 MPI_BYTE 1 MPI_CHAR 1 MPI_UNSIGNED_CHAR 1 MPI_SIGNED_CHAR 1 MPI_WCHAR 2 MPI_SHORT 2 MPI_UNSIGNED_SHORT 2 MPI_INT 4 MPI_UNSIGNED 4 MPI_LONG 4 MPI_UNSIGNED_LONG 4 MPI_FLOAT 4 MPI_DOUBLE 8 MPI_LONG_DOUBLE 16 MPI_CHARACTER 1 MPI_LOGICAL 4 MPI_INTEGER 4 MPI_REAL 4 MPI_DOUBLE_PRECISION 8 MPI_COMPLEX 2*4 MPI_DOUBLE_COMPLEX 2*8 Optional Type Length ------------------ ------ MPI_INTEGER1 1 MPI_INTEGER2 2 MPI_INTEGER4 4 MPI_INTEGER8 8 MPI_LONG_LONG 8 MPI_UNSIGNED_LONG_LONG 8 MPI_REAL4 4 MPI_REAL8 8 MPI_REAL16 16 |
![]() |
Page last modified: Mon, 11 Jan 2010 21:29:37 GMT Page URL: http://www.nersc.gov/nusers/help/tutorials/mpi/intro/types.php Web contact: webmaster@nersc.gov Computing questions: consult@nersc.gov Privacy and Security Notice |
![]() |