Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of https://framagit.org/simgrid/simgrid
[simgrid.git] / src / smpi / mpi / smpi_request.cpp
index 8939695..6b58173 100644 (file)
@@ -528,15 +528,13 @@ void Request::start()
     comm_->increment_sent_messages_count(comm_->group()->rank(src_), comm_->group()->rank(dst_), tag_);
 
     void* buf = buf_;
-    if ((flags_ & MPI_REQ_SSEND) == 0 &&
-        ((flags_ & MPI_REQ_RMA) != 0 || (flags_ & MPI_REQ_BSEND) != 0 ||
-         static_cast<int>(size_) < smpi_cfg_detached_send_thresh())) {
-      void *oldbuf = nullptr;
+    if ((flags_ & MPI_REQ_SSEND) == 0 && ((flags_ & MPI_REQ_RMA) != 0 || (flags_ & MPI_REQ_BSEND) != 0 ||
+                                          static_cast<int>(size_) < smpi_cfg_detached_send_thresh())) {
       detached_    = true;
       XBT_DEBUG("Send request %p is detached", this);
       this->ref();
       if (not(type_->flags() & DT_FLAG_DERIVED)) {
-        oldbuf = buf_;
+        void* oldbuf = buf_;
         if (not process->replaying() && oldbuf != nullptr && size_ != 0) {
           if (smpi_switch_data_segment(simgrid::s4u::Actor::by_pid(src_), buf_))
             XBT_DEBUG("Privatization : We are sending from a zone inside global memory. Switch data segment ");