From 009ff7e4463fae3c7a2181c1f8147fd100afbfdd Mon Sep 17 00:00:00 2001 From: Augustin Degomme Date: Wed, 3 Jun 2020 02:19:51 +0200 Subject: [PATCH] add a 16 byte envelope to each MPI message. 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/smpi/mpi/smpi_request.cpp b/src/smpi/mpi/smpi_request.cpp index 90d7485744..b12e4b0a75 100644 --- a/src/smpi/mpi/smpi_request.cpp +++ b/src/smpi/mpi/smpi_request.cpp @@ -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_; + size_t payload_size_ = size_ + 16;//MPI enveloppe size (tag+dest+communicator) 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 -- 2.20.1