Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of https://framagit.org/simgrid/simgrid
authormlaurent <mathieu.laurent@ens-rennes.fr>
Fri, 16 Jun 2023 08:37:21 +0000 (10:37 +0200)
committermlaurent <mathieu.laurent@ens-rennes.fr>
Fri, 16 Jun 2023 08:37:21 +0000 (10:37 +0200)
1  2 
src/kernel/actor/CommObserver.cpp
src/mc/transition/TransitionComm.cpp

@@@ -204,11 -199,10 +204,11 @@@ void CommIsendSimcall::serialize(std::s
  {
    /* Note that the comm_ is 0 until after the execution of the simcall */
    stream << (short)mc::Transition::Type::COMM_ASYNC_SEND << ' ';
-   stream << (uintptr_t)comm_ << ' ' << mbox_->get_id() << ' ' << (uintptr_t)src_buff_ << ' ' << src_buff_size_ << ' '
-          << tag_;
+   stream << (comm_ ? comm_->get_id() : 0) << ' ' << mbox_->get_id() << ' ' << (uintptr_t)src_buff_ << ' '
+          << src_buff_size_ << ' ' << tag_;
    XBT_DEBUG("SendObserver comm:%p mbox:%u buff:%p size:%zu tag:%d", comm_, mbox_->get_id(), src_buff_, src_buff_size_,
              tag_);
 +  stream << ' ' << fun_call_;
  }
  std::string CommIsendSimcall::to_string() const
  {
@@@ -221,9 -215,8 +221,9 @@@ void CommIrecvSimcall::serialize(std::s
  {
    /* Note that the comm_ is 0 until after the execution of the simcall */
    stream << (short)mc::Transition::Type::COMM_ASYNC_RECV << ' ';
-   stream << (uintptr_t)comm_ << ' ' << mbox_->get_id() << ' ' << (uintptr_t)dst_buff_ << ' ' << tag_;
+   stream << (comm_ ? comm_->get_id() : 0) << ' ' << mbox_->get_id() << ' ' << (uintptr_t)dst_buff_ << ' ' << tag_;
    XBT_DEBUG("RecvObserver comm:%p mbox:%u buff:%p tag:%d", comm_, mbox_->get_id(), dst_buff_, tag_);
 +  stream << ' ' << fun_call_;
  }
  std::string CommIrecvSimcall::to_string() const
  {
@@@ -35,10 -35,9 +35,10 @@@ CommWaitTransition::CommWaitTransition(
  CommWaitTransition::CommWaitTransition(aid_t issuer, int times_considered, std::stringstream& stream)
      : Transition(Type::COMM_WAIT, issuer, times_considered)
  {
 -  xbt_assert(stream >> timeout_ >> comm_ >> sender_ >> receiver_ >> mbox_ >> sbuff_ >> rbuff_ >> size_);
 +  xbt_assert(stream >> timeout_ >> comm_ >> sender_ >> receiver_ >> mbox_ >> sbuff_ >> rbuff_ >> size_ >>
 +             user_fun_call_);
-   XBT_DEBUG("CommWaitTransition %s comm:%" PRIxPTR ", sender:%ld receiver:%ld mbox:%u sbuff:%" PRIxPTR
-             " rbuff:%" PRIxPTR " size:%zu",
+   XBT_DEBUG("CommWaitTransition %s comm:%u, sender:%ld receiver:%ld mbox:%u sbuff:%" PRIxPTR " rbuff:%" PRIxPTR
+             " size:%zu",
              (timeout_ ? "timeout" : "no-timeout"), comm_, sender_, receiver_, mbox_, sbuff_, rbuff_, size_);
  }
  std::string CommWaitTransition::to_string(bool verbose) const
@@@ -84,8 -83,8 +84,8 @@@ CommTestTransition::CommTestTransition(
  CommTestTransition::CommTestTransition(aid_t issuer, int times_considered, std::stringstream& stream)
      : Transition(Type::COMM_TEST, issuer, times_considered)
  {
 -  xbt_assert(stream >> comm_ >> sender_ >> receiver_ >> mbox_ >> sbuff_ >> rbuff_ >> size_);
 +  xbt_assert(stream >> comm_ >> sender_ >> receiver_ >> mbox_ >> sbuff_ >> rbuff_ >> size_ >> user_fun_call_);
-   XBT_DEBUG("CommTestTransition comm:%" PRIxPTR ", sender:%ld receiver:%ld mbox:%u sbuff:%" PRIxPTR " rbuff:%" PRIxPTR
+   XBT_DEBUG("CommTestTransition comm:%u, sender:%ld receiver:%ld mbox:%u sbuff:%" PRIxPTR " rbuff:%" PRIxPTR
              " size:%zu",
              comm_, sender_, receiver_, mbox_, sbuff_, rbuff_, size_);
  }
@@@ -208,8 -207,8 +208,8 @@@ CommSendTransition::CommSendTransition(
  CommSendTransition::CommSendTransition(aid_t issuer, int times_considered, std::stringstream& stream)
      : Transition(Type::COMM_ASYNC_SEND, issuer, times_considered)
  {
 -  xbt_assert(stream >> comm_ >> mbox_ >> sbuff_ >> size_ >> tag_);
 +  xbt_assert(stream >> comm_ >> mbox_ >> sbuff_ >> size_ >> tag_ >> user_fun_call_);
-   XBT_DEBUG("SendTransition comm:%" PRIxPTR " mbox:%u sbuff:%" PRIxPTR " size:%zu", comm_, mbox_, sbuff_, size_);
+   XBT_DEBUG("SendTransition comm:%u mbox:%u sbuff:%" PRIxPTR " size:%zu", comm_, mbox_, sbuff_, size_);
  }
  std::string CommSendTransition::to_string(bool verbose = false) const
  {