Re: [Mpi-forum] MPI_Type_size question
Rob Ross wrote on Fri, 18 Jun 2010 at 13:13:26
Hi,
Your type isn't big enough to cause overflow. But yes it's an issue.
Oops, you're right, I'm off by 1024 from what I had entended, the count should have been: 1073741824 Sorry! -Fab
Rob
On Jun 18, 2010, at 11:55 AM, Fab Tillier wrote:
Hi Folks,
Looking at putting together the MPI_Count ticket, I ran across the following issue and was hoping to get some guidance. Take the following code, using the current int counts, and assume sizeof(int) == 4, sizeof(MPI_DOUBLE) == 8:
{ MPI_Datatype myType; MPI_Type_contiguous( 1048576, MPI_DOUBLE, &myType );
int size; MPI_Type_size( myType, &size ); }
Should MPI_Type_size return an error, due to overflow? Does size get set to MPI_UNDEFINED and the call succeeds?
Similar issues exist for MPI_Pack with the outsize and position parameters, MPI_Unpack with the insize and position parameters, and MPI_Pack_size with the size parameter.
Lastly, it is my belief that these parameters should really be of type MPI_Aint, but changing this would break backward compatibility. They cannot be of type MPI_Count, since overflow can occur if MPI_Count is defined as a C int. How should the standard handle this?
Thoughts? -Fab
_______________________________________________ mpi-forum mailing list [email protected] http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-forum
_______________________________________________ mpi-forum mailing list [email protected] http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-forum
participants (1)
-
Fab Tillier