[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mpi-21] MPI::BOTTOM



A user recently raised an issue that I just looked into and discovered a problem with the C++ binding for MPI::BOTTOM.

In the spec, MPI::BOTTOM is defined to be of type (const void*). However, all receive buffers are defined to be of type (void*) -- such as for the various flavors of point-to-point receive, the receive buffer for collectives, etc. This means that you'll get a compiler error when trying to use MPI::BOTTOM as a receive buffer:

bottom.cc:81: error: invalid conversion from ‘const void*’ to ‘void*’
bottom.cc:81: error: initializing argument 1 of ‘virtual void MPI::Comm::Bcast(void*, int, const MPI::Datatype&, int) const’


A user can cast away the const-ness of MPI::BOTTOM, but that seems inelegant/wrong.

I don't yet have a solution to this problem; I raise it here so that it gets added to the list of issues to be addressed in MPI-2.1.

--
Jeff Squyres
Cisco Systems