/* 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. */
XBT_INFO("Sender spec: %s", args[0].c_str());
for (unsigned int test = 1; test <= args[0].size(); test++) {
simgrid::s4u::this_actor::sleep_until(test * 5 - 5);
XBT_INFO("Sender spec: %s", args[0].c_str());
for (unsigned int test = 1; test <= args[0].size(); test++) {
simgrid::s4u::this_actor::sleep_until(test * 5 - 5);
- std::string* mboxName = new std::string("Test #" + std::to_string(test));
- simgrid::s4u::Mailbox* mbox = simgrid::s4u::Mailbox::by_name(*mboxName);
+ auto* mboxName = new std::string("Test #" + std::to_string(test));
+ auto* mbox = simgrid::s4u::Mailbox::by_name(*mboxName);
switch (args[0][test - 1]) {
case 'r':
XBT_INFO("Test %u: r (regular send)", test);
switch (args[0][test - 1]) {
case 'r':
XBT_INFO("Test %u: r (regular send)", test);
break;
case 'R':
XBT_INFO("Test %u: R (sleep + regular send)", test);
simgrid::s4u::this_actor::sleep_for(0.5);
break;
case 'R':
XBT_INFO("Test %u: R (sleep + regular send)", test);
simgrid::s4u::this_actor::sleep_for(0.5);
break;
case 'I':
XBT_INFO("Test %u: I (sleep + isend)", test);
simgrid::s4u::this_actor::sleep_for(0.5);
break;
case 'I':
XBT_INFO("Test %u: I (sleep + isend)", test);
simgrid::s4u::this_actor::sleep_for(0.5);
break;
case 'D':
XBT_INFO("Test %u: D (sleep + detached send)", test);
simgrid::s4u::this_actor::sleep_for(0.5);
break;
case 'D':
XBT_INFO("Test %u: D (sleep + detached send)", test);
simgrid::s4u::this_actor::sleep_for(0.5);
XBT_INFO("Receiver spec: %s", args[0].c_str());
for (unsigned int test = 1; test <= args[0].size(); test++) {
simgrid::s4u::this_actor::sleep_until(test * 5 - 5);
XBT_INFO("Receiver spec: %s", args[0].c_str());
for (unsigned int test = 1; test <= args[0].size(); test++) {
simgrid::s4u::this_actor::sleep_until(test * 5 - 5);
- std::string mboxName = "Test #" + std::to_string(test);
- simgrid::s4u::Mailbox* mbox = simgrid::s4u::Mailbox::by_name(mboxName);
- void* received = nullptr;
+ std::string mboxName = "Test #" + std::to_string(test);
+ simgrid::s4u::Mailbox* mbox = simgrid::s4u::Mailbox::by_name(mboxName);
+ std::string* received = nullptr;
switch (args[0][test - 1]) {
case 'r':
XBT_INFO("Test %u: r (regular receive)", test);
switch (args[0][test - 1]) {
case 'r':
XBT_INFO("Test %u: r (regular receive)", test);
break;
case 'R':
XBT_INFO("Test %u: R (sleep + regular receive)", test);
simgrid::s4u::this_actor::sleep_for(0.5);
break;
case 'R':
XBT_INFO("Test %u: R (sleep + regular receive)", test);
simgrid::s4u::this_actor::sleep_for(0.5);
break;
case 'I':
XBT_INFO("Test %u: I (sleep + asynchronous irecv)", test);
simgrid::s4u::this_actor::sleep_for(0.5);
break;
case 'I':
XBT_INFO("Test %u: I (sleep + asynchronous irecv)", test);
simgrid::s4u::this_actor::sleep_for(0.5);
break;
case 'p':
XBT_INFO("Test %u: p (regular receive on permanent mailbox)", test);
mbox->set_receiver(simgrid::s4u::Actor::self());
break;
case 'p':
XBT_INFO("Test %u: p (regular receive on permanent mailbox)", test);
mbox->set_receiver(simgrid::s4u::Actor::self());
break;
case 'P':
XBT_INFO("Test %u: P (sleep + regular receive on permanent mailbox)", test);
simgrid::s4u::this_actor::sleep_for(0.5);
mbox->set_receiver(simgrid::s4u::Actor::self());
break;
case 'P':
XBT_INFO("Test %u: P (sleep + regular receive on permanent mailbox)", test);
simgrid::s4u::this_actor::sleep_for(0.5);
mbox->set_receiver(simgrid::s4u::Actor::self());
break;
case 'j':
XBT_INFO("Test %u: j (irecv on permanent mailbox)", test);
mbox->set_receiver(simgrid::s4u::Actor::self());
break;
case 'j':
XBT_INFO("Test %u: j (irecv on permanent mailbox)", test);
mbox->set_receiver(simgrid::s4u::Actor::self());
break;
case 'J':
XBT_INFO("Test %u: J (sleep + irecv on permanent mailbox)", test);
simgrid::s4u::this_actor::sleep_for(0.5);
mbox->set_receiver(simgrid::s4u::Actor::self());
break;
case 'J':
XBT_INFO("Test %u: J (sleep + irecv on permanent mailbox)", test);
simgrid::s4u::this_actor::sleep_for(0.5);
mbox->set_receiver(simgrid::s4u::Actor::self());
XBT_INFO("Test %u OK", test);
}
simgrid::s4u::this_actor::sleep_for(0.5);
XBT_INFO("Test %u OK", test);
}
simgrid::s4u::this_actor::sleep_for(0.5);
simgrid::s4u::Actor::create("recver", hosts[1], receiver, argRecv);
e.run();
simgrid::s4u::Actor::create("recver", hosts[1], receiver, argRecv);
e.run();