]> AND Public Git Repository - simgrid.git/blobdiff - src/smpi/mpi/smpi_request.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Allow dlsym to call free() on memory that is allocated before mmalloc init
[simgrid.git] / src / smpi / mpi / smpi_request.cpp
index 77e49ab4580ff0c949a2405f59d3bd3da0e9f88d..0ceb1a398b421a6edc8025e309a3cd20fd2ebb4b 100644 (file)
@@ -36,8 +36,7 @@ std::vector<s_smpi_factor_t> smpi_ois_values;
 
 extern std::function<void(simgrid::kernel::activity::CommImpl*, void*, size_t)> smpi_comm_copy_data_callback;
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 
 Request::Request(const void* buf, int count, MPI_Datatype datatype, aid_t src, aid_t dst, int tag, MPI_Comm comm,
                  unsigned flags, MPI_Op op)
@@ -1025,9 +1024,9 @@ void Request::finish_wait(MPI_Request* request, MPI_Status * status)
   if(req->detached_sender_ != nullptr){
     //integrate pseudo-timing for buffering of small messages, do not bother to execute the simcall if 0
     simgrid::s4u::Host* dst_host = simgrid::s4u::Actor::by_pid(req->dst_)->get_host();
-    double sleeptime             = simgrid::s4u::Actor::self()->get_host()->extension<simgrid::smpi::Host>()->orecv(
-        req->real_size(), req->src_host_, dst_host);
-    if (sleeptime > 0.0) {
+    if (double sleeptime = simgrid::s4u::Actor::self()->get_host()->extension<simgrid::smpi::Host>()->orecv(
+            req->real_size(), req->src_host_, dst_host);
+        sleeptime > 0.0) {
       simgrid::s4u::this_actor::sleep_for(sleeptime);
       XBT_DEBUG("receiving size of %zu : sleep %f ", req->real_size_, sleeptime);
     }
@@ -1355,5 +1354,4 @@ std::vector<MPI_Request> Request::get_nbc_requests() const
 {
   return nbc_requests_;
 }
-}
-}
+} // namespace simgrid::smpi