void Request::init_buffer(int count){
// FIXME Handle the case of a partial shared malloc.
// This part handles the problem of non-contiguous memory (for the unserialization at the reception)
- if ((((flags_ & MPI_REQ_RECV) != 0) && ((flags_ & MPI_REQ_ACCUMULATE) != 0)) || (type_->flags() & DT_FLAG_DERIVED)) {
+ if (not smpi_process()->replaying() &&
+ ((((flags_ & MPI_REQ_RECV) != 0) && ((flags_ & MPI_REQ_ACCUMULATE) != 0)) || (type_->flags() & DT_FLAG_DERIVED))) {
// This part handles the problem of non-contiguous memory
old_buf_ = buf_;
if (count==0){
XBT_DEBUG("Exception in testany");
return 0;
}
-
+
if (i != -1) { // -1 is not MPI_UNDEFINED but a SIMIX return code. (nothing matches)
*index = map[i];
if (requests[*index] != MPI_REQUEST_NULL && (requests[*index]->flags_ & MPI_REQ_GENERALIZED) &&
}else{
*outflag=0;
}
- if (ret != MPI_SUCCESS)
+ if (ret != MPI_SUCCESS)
error = 1;
}else{
Status::empty(pstat);
status[i] = *pstat;
}
}
- if(error==1)
+ if (error == 1)
return MPI_ERR_IN_STATUS;
- else
+ else
return MPI_SUCCESS;
}
/*(seconds * flop/s -> total flops)*/ smpi_iprobe_sleep * speed * maxrate)
->set_name("iprobe")
/* Not the entire CPU can be used when iprobing: This is important for
- * the energy consumption caused by polling with iprobes.
+ * the energy consumption caused by polling with iprobes.
* Note also that the number of flops that was
* computed above contains a maxrate factor and is hence reduced (maxrate < 1)
*/
- ->set_bound(maxrate*speed)
+ ->set_bound(maxrate * speed)
->start()
->wait();
}
MPI_Datatype datatype = req->type_;
// FIXME Handle the case of a partial shared malloc.
- if (((req->flags_ & MPI_REQ_ACCUMULATE) != 0) ||
- (datatype->flags() & DT_FLAG_DERIVED)) { // && (not smpi_is_shared(req->old_buf_))){
- if (not smpi_process()->replaying() && smpi_switch_data_segment(simgrid::s4u::Actor::self(), req->old_buf_))
+ if (not smpi_process()->replaying() &&
+ (((req->flags_ & MPI_REQ_ACCUMULATE) != 0) || (datatype->flags() & DT_FLAG_DERIVED))) {
+ if (smpi_switch_data_segment(simgrid::s4u::Actor::self(), req->old_buf_))
XBT_VERB("Privatization : We are unserializing to a zone in global memory Switch data segment ");
if(datatype->flags() & DT_FLAG_DERIVED){
// This is a finished detached request, let's return this one
comms.clear(); // don't do the waitany call afterwards
index = i;
- if (requests[index] != MPI_REQUEST_NULL && (requests[index])->flags_ & MPI_REQ_NBC)
+ if (requests[index]->flags_ & MPI_REQ_NBC)
finish_nbc_requests(&requests[index], 0);
finish_wait(&requests[i], status); // cleanup if refcount = 0
if (requests[i] != MPI_REQUEST_NULL && (requests[i]->flags_ & MPI_REQ_NON_PERSISTENT))
indices[count] = index;
count++;
for (int i = 0; i < incount; i++) {
- if (i!=index && requests[i] != MPI_REQUEST_NULL
- && not(requests[i]->flags_ & MPI_REQ_FINISHED)) {
+ if (i != index && requests[i] != MPI_REQUEST_NULL && not(requests[i]->flags_ & MPI_REQ_FINISHED)) {
test(&requests[i], pstat,&flag);
if (flag==1){
indices[count] = i;