Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add a 16 byte envelope to each MPI message.
authorAugustin Degomme <adegomme@gmail.com>
Wed, 3 Jun 2020 00:19:51 +0000 (02:19 +0200)
committerAugustin Degomme <adegomme@gmail.com>
Wed, 3 Jun 2020 00:21:28 +0000 (02:21 +0200)
This simulates the send of src/dest,tag, and communicator, as in all MPI implems.
This avoids 0-sized messages to be sent to the lower layers, and should be more realistic
This will change simulation times a little bit.

src/smpi/mpi/smpi_request.cpp

index 90d7485..b12e4b0 100644 (file)
@@ -496,8 +496,9 @@ void Request::start()
 
     // we make a copy here, as the size is modified by simix, and we may reuse the request in another receive later
     real_size_=size_;
 
     // we make a copy here, as the size is modified by simix, and we may reuse the request in another receive later
     real_size_=size_;
+    size_t payload_size_ = size_ + 16;//MPI enveloppe size (tag+dest+communicator)
     action_   = simcall_comm_isend(
     action_   = simcall_comm_isend(
-        simgrid::s4u::Actor::by_pid(src_)->get_impl(), mailbox->get_impl(), size_, -1.0, buf, real_size_, &match_send,
+        simgrid::s4u::Actor::by_pid(src_)->get_impl(), mailbox->get_impl(), payload_size_, -1.0, buf, real_size_, &match_send,
         &xbt_free_f, // how to free the userdata if a detached send fails
         process->replaying() ? &smpi_comm_null_copy_buffer_callback : smpi_comm_copy_data_callback, this,
         // detach if msg size < eager/rdv switch limit
         &xbt_free_f, // how to free the userdata if a detached send fails
         process->replaying() ? &smpi_comm_null_copy_buffer_callback : smpi_comm_copy_data_callback, this,
         // detach if msg size < eager/rdv switch limit