[Mpi-forum] why (int)0x4c000101 ?

Jeff Squyres jsquyres at cisco.com
Tue May 29 07:32:26 CDT 2012


You should probably ask on the MPICH mailing list -- this is the mailing list for the general MPI Forum itself.


On May 27, 2012, at 10:42 AM, ÄþÄþ ¶­ wrote:

> when I read mpich2-1.4.1 code, I saw code as follow:
> 
> Code:
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
> 10
> 11
> 12
> 13
> 14
> 15
> 16
> 17
> 18
> typedef int MPI_Datatype;
> #define MPI_CHAR           ((MPI_Datatype)0x4c000101)
> #define MPI_SIGNED_CHAR    ((MPI_Datatype)0x4c000118)
> #define MPI_UNSIGNED_CHAR  ((MPI_Datatype)0x4c000102)
> #define MPI_BYTE           ((MPI_Datatype)0x4c00010d)
> #define MPI_WCHAR          ((MPI_Datatype)0x4c00040e)
> #define MPI_SHORT          ((MPI_Datatype)0x4c000203)
> #define MPI_UNSIGNED_SHORT ((MPI_Datatype)0x4c000204)
> #define MPI_INT            ((MPI_Datatype)0x4c000405)
> #define MPI_UNSIGNED       ((MPI_Datatype)0x4c000406)
> #define MPI_LONG           ((MPI_Datatype)0x4c000407)
> #define MPI_UNSIGNED_LONG  ((MPI_Datatype)0x4c000408)
> #define MPI_FLOAT          ((MPI_Datatype)0x4c00040a)
> #define MPI_DOUBLE         ((MPI_Datatype)0x4c00080b)
> #define MPI_LONG_DOUBLE    ((MPI_Datatype)0x4c000c0c)
> #define MPI_LONG_LONG_INT  ((MPI_Datatype)0x4c000809)
> #define MPI_UNSIGNED_LONG_LONG ((MPI_Datatype)0x4c000819)
> #define MPI_LONG_LONG      MPI_LONG_LONG_INT
> 
> Anyone can tell me what is the meaning of those hex values? and why does the author use them?
> why do they define "MPI_CHAR" as ((MPI_Datatype)0x4c000101) instead of "char"?
> thx
> _______________________________________________
> mpi-forum mailing list
> mpi-forum at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-forum


-- 
Jeff Squyres
jsquyres at cisco.com
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/





More information about the mpi-forum mailing list