std::stringstream stream;
if (auto* comm = dynamic_cast<activity::CommImpl*>(activity_)) {
type = Simcall::COMM_WAIT;
- stream << timeout_ << ' ' << comm;
+ stream << (timeout_ > 0) << ' ' << comm;
stream << ' ' << (comm->src_actor_ != nullptr ? comm->src_actor_->get_pid() : -1);
stream << ' ' << (comm->dst_actor_ != nullptr ? comm->dst_actor_->get_pid() : -1);
stream << ' ' << (comm->get_mailbox() != nullptr ? comm->get_mailbox()->get_id() : 666);
{
std::stringstream stream(buffer);
stream >> timeout_ >> comm_ >> sender_ >> receiver_ >> mbox_ >> src_buff_ >> dst_buff_ >> size_;
- XBT_DEBUG("CommWaitTransition tout:%f comm:%p, sender:%ld receiver:%ld mbox:%u sbuff:%p rbuff:%p size:%zu", timeout_,
- comm_, sender_, receiver_, mbox_, src_buff_, dst_buff_, size_);
+ XBT_DEBUG("CommWaitTransition %s comm:%p, sender:%ld receiver:%ld mbox:%u sbuff:%p rbuff:%p size:%zu",
+ (timeout_ ? "timeout" : "no-timeout"), comm_, sender_, receiver_, mbox_, src_buff_, dst_buff_, size_);
}
std::string CommWaitTransition::to_string(bool verbose)
{
textual_ = Transition::to_string(verbose);
- textual_ +=
- xbt::string_printf("%ld: WaitComm(from %ld to %ld, mbox=%u, tout=%f", aid_, sender_, receiver_, mbox_, timeout_);
+ textual_ += xbt::string_printf("%ld: WaitComm(from %ld to %ld, mbox=%u, %s", aid_, sender_, receiver_, mbox_,
+ (timeout_ ? "timeout" : "no timeout"));
if (verbose) {
textual_ += ", src_buff=" + xbt::string_printf("%p", src_buff_) + ", size=" + std::to_string(size_);
textual_ += ", dst_buff=" + xbt::string_printf("%p", dst_buff_);
/* Timeouts in wait transitions are not considered by the independence theorem, thus assumed dependent */
if (const auto* wait = dynamic_cast<const CommWaitTransition*>(other)) {
- if (timeout_ > 0 || wait->timeout_ > 0)
+ if (timeout_ || wait->timeout_)
return true;
if (src_buff_ == wait->src_buff_ && dst_buff_ == wait->dst_buff_)
return isend->depends(this);
if (auto* wait = dynamic_cast<const CommWaitTransition*>(other)) {
- if (wait->timeout_ > 0)
+ if (wait->timeout_)
return true;
if (mbox_ != wait->mbox_)
return false;
if (const auto* wait = dynamic_cast<const CommWaitTransition*>(other)) {
- if (wait->timeout_ > 0)
+ if (wait->timeout_)
return true;
if (mbox_ != wait->mbox_)