[mpich-discuss] why (int)0x4c000101???

Jed Brown jedbrown at mcs.anl.gov
Wed Jun 6 09:04:11 CDT 2012


On Sat, Jun 2, 2012 at 11:33 PM, ÄþÄþ ¶­ <dncdd at yahoo.com.cn> wrote:
>
> 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"?
>

MPI_CHAR is a constant value, not a type. You should not care what the
numeric value is (and your code definitely should not depend on it).

MPI_Datatype is a type (like "char" is a type), but it is different for
different MPI implementations. Again, your code should not assume anything
about this type.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20120606/d89ba362/attachment-0001.html>


More information about the mpich-discuss mailing list