-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
{
MPI_Request request = nullptr; /* MC needs the comm to be set to nullptr during the call */
if(op==MPI_OP_NULL){
- request = new Request(buf==MPI_BOTTOM ? nullptr : buf , count, datatype, src, dst, tag,
+ request = new Request(buf==MPI_BOTTOM ? nullptr : buf , count, datatype, comm->group()->actor(src)->getPid(),
+ comm->group()->actor(dst)->getPid(), tag,
comm, RMA | NON_PERSISTENT | ISEND | SEND | PREPARED);
}else{
- request = new Request(buf==MPI_BOTTOM ? nullptr : buf, count, datatype, src, dst, tag,
+ request = new Request(buf==MPI_BOTTOM ? nullptr : buf, count, datatype, comm->group()->actor(src)->getPid(),
+ comm->group()->actor(dst)->getPid(), tag,
comm, RMA | NON_PERSISTENT | ISEND | SEND | PREPARED | ACCUMULATE);
request->op_ = op;
}
{
MPI_Request request = nullptr; /* MC needs the comm to be set to nullptr during the call */
if(op==MPI_OP_NULL){
- request = new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, src, dst, tag, comm,
+ request = new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, comm->group()->actor(src)->getPid(), comm->group()->actor(dst)->getPid(), tag, comm,
RMA | NON_PERSISTENT | RECV | PREPARED);
}else{
- request = new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, src, dst, tag, comm,
+ request = new Request(buf == MPI_BOTTOM ? nullptr : buf, count, datatype, comm->group()->actor(src)->getPid(), comm->group()->actor(dst)->getPid(), tag, comm,
RMA | NON_PERSISTENT | RECV | PREPARED | ACCUMULATE);
request->op_ = op;
}
{
MPI_Request requests[2];
MPI_Status stats[2];
- unsigned int myid = simgrid::s4u::Actor::self()->getPid();
+ int myid = simgrid::s4u::Actor::self()->getPid();
if ((comm->group()->actor(dst)->getPid() == myid) && (comm->group()->actor(src)->getPid() == myid)){
Datatype::copy(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype);
+ if(status !=MPI_STATUS_IGNORE){
+ status->MPI_SOURCE = src;
+ status->MPI_TAG = recvtag;
+ status->MPI_ERROR = MPI_SUCCESS;
+ status->count = sendcount*sendtype->size();
+ }
return;
}
requests[0] = isend_init(sendbuf, sendcount, sendtype, dst, sendtag, comm);
if ((smpi_privatize_global_variables != 0) && (static_cast<char*>(buf_) >= smpi_data_exe_start) &&
(static_cast<char*>(buf_) < smpi_data_exe_start + smpi_data_exe_size)) {
XBT_DEBUG("Privatization : We are sending from a zone inside global memory. Switch data segment ");
- smpi_switch_data_segment(src_);
+ smpi_switch_data_segment(simgrid::s4u::Actor::byPid(src_));
}
buf = xbt_malloc(size_);
memcpy(buf,oldbuf,size_);
static_cast<char*>(req->old_buf_) >= smpi_data_exe_start &&
static_cast<char*>(req->old_buf_) < smpi_data_exe_start + smpi_data_exe_size) {
XBT_VERB("Privatization : We are unserializing to a zone in global memory Switch data segment ");
- smpi_switch_data_segment(simgrid::s4u::Actor::self()->getPid());
+ smpi_switch_data_segment(simgrid::s4u::Actor::self());
}
if(datatype->flags() & DT_FLAG_DERIVED){