/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
- } catch (std::invalid_argument& ia) {
- throw std::invalid_argument(std::string("Processes of this example must have a numerical name, not ") +
- ia.what());
+ } catch (const std::invalid_argument& ia) {
+ throw std::invalid_argument(std::string("Actors of this example must have a numerical name, not ") + ia.what());
}
my_mailbox = simgrid::s4u::Mailbox::by_name(std::to_string(rank));
if (rank + 1 == simgrid::s4u::Engine::get_instance()->get_host_count())
}
my_mailbox = simgrid::s4u::Mailbox::by_name(std::to_string(rank));
if (rank + 1 == simgrid::s4u::Engine::get_instance()->get_host_count())
XBT_INFO("Host \"%u\" send 'Token' to Host \"%s\"", rank, neighbor_mailbox->get_cname());
std::string msg = "Token";
neighbor_mailbox->put(&msg, task_comm_size);
XBT_INFO("Host \"%u\" send 'Token' to Host \"%s\"", rank, neighbor_mailbox->get_cname());
std::string msg = "Token";
neighbor_mailbox->put(&msg, task_comm_size);
XBT_INFO("Host \"%u\" received \"%s\"", rank, res->c_str());
} else {
std::string* res = static_cast<std::string*>(my_mailbox->get());
XBT_INFO("Host \"%u\" received \"%s\"", rank, res->c_str());
} else {
std::string* res = static_cast<std::string*>(my_mailbox->get());