CREATE_MPI_DATATYPE(MPI_PACKED, 53, char);
// Internal use only
CREATE_MPI_DATATYPE(MPI_PTR, 54, void*);
+CREATE_MPI_DATATYPE(MPI_COUNT, 55, long long);
+
namespace simgrid{
namespace smpi{
int Datatype::pack(void* inbuf, int incount, void* outbuf, int outcount, int* position,MPI_Comm comm){
if (outcount - *position < incount*static_cast<int>(size_))
- return MPI_ERR_BUFFER;
+ return MPI_ERR_OTHER;
Datatype::copy(inbuf, incount, this, static_cast<char*>(outbuf) + *position, outcount, MPI_CHAR);
*position += incount * size_;
return MPI_SUCCESS;
int Datatype::unpack(void* inbuf, int insize, int* position, void* outbuf, int outcount,MPI_Comm comm){
if (outcount*static_cast<int>(size_)> insize)
- return MPI_ERR_BUFFER;
+ return MPI_ERR_OTHER;
Datatype::copy(static_cast<char*>(inbuf) + *position, insize, MPI_CHAR, outbuf, outcount, this);
*position += outcount * size_;
return MPI_SUCCESS;
sendcount *= sendtype->size();
recvcount *= recvtype->size();
int count = sendcount < recvcount ? sendcount : recvcount;
-
+ XBT_DEBUG("Copying %d bytes from %p to %p", count, sendbuf, recvbuf);
if (not(sendtype->flags() & DT_FLAG_DERIVED) && not(recvtype->flags() & DT_FLAG_DERIVED)) {
if (not smpi_process()->replaying())
memcpy(recvbuf, sendbuf, count);