64-bitmpicray

Does Cray mpich have a 64 bit integer MPI variable?


I am using cray-mpich/7.4.0. When I do

 printf("Size:%d",sizeof(MPI_UINT64_T));

It print 4 instead of 8. Why is that? The cluster machine is 64 bit for sure.

I have tried this with openmpi/1.10.2 on another cluster and that prints 8.


Solution

  • Previous answer is right. But you really should use MPI_Type_size.

    MPI_Type_size(MPI_UINT64_T,&tsize);
    fprintf(stderr,"Size:%d, MPI_Type_size:%d\n",sizeof(MPI_UINT64_T),tsize);
    

    which shows the difference between the size of the MPI_Datatype and what you really want to know, the size of the UINT64 type.

    Size:4, MPI_Type_size:8