From 4b29c30aaa2abee35781b6b59f96f6979128401c Mon Sep 17 00:00:00 2001 From: SUTER Frederic Date: Thu, 23 Dec 2021 16:02:27 +0100 Subject: [PATCH] update tests and examples after recent changes --- examples/cpp/dag-comm/s4u-dag-comm.cpp | 4 ++-- examples/cpp/dag-from-dot/s4u_dag-from-dot.cpp | 5 +++-- examples/cpp/dag-from-dot/s4u_dag-from-dot.tesh | 16 ++++++++-------- .../dag-incomplete-simulation.cpp | 4 ++-- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/examples/cpp/dag-comm/s4u-dag-comm.cpp b/examples/cpp/dag-comm/s4u-dag-comm.cpp index b5982aefc9..b7a90ea13e 100644 --- a/examples/cpp/dag-comm/s4u-dag-comm.cpp +++ b/examples/cpp/dag-comm/s4u-dag-comm.cpp @@ -49,9 +49,9 @@ int main(int argc, char* argv[]) // Schedule the different activities parent->set_host(tremblay); - transfert->set_from(tremblay); + transfert->set_source(tremblay); child->set_host(jupiter); - transfert->set_to(jupiter); + transfert->set_destination(jupiter); e.run(); diff --git a/examples/cpp/dag-from-dot/s4u_dag-from-dot.cpp b/examples/cpp/dag-from-dot/s4u_dag-from-dot.cpp index deb430ecf6..9229601fc0 100644 --- a/examples/cpp/dag-from-dot/s4u_dag-from-dot.cpp +++ b/examples/cpp/dag-from-dot/s4u_dag-from-dot.cpp @@ -48,7 +48,7 @@ int main(int argc, char** argv) if (comm != nullptr) { auto pred = dynamic_cast(comm->get_parent().get()); auto succ = dynamic_cast(comm->get_child().get()); - comm->set_from(pred->get_host())->set_to(succ->get_host()); + comm->set_source(pred->get_host())->set_destination(succ->get_host()); } } @@ -64,7 +64,8 @@ int main(int argc, char** argv) } auto* comm = dynamic_cast(a.get()); if (comm != nullptr) { - XBT_INFO("%s", comm->get_cname()); + XBT_INFO("[%f->%f] '%s' transferred from %s to %s", comm->get_start_time(), comm->get_finish_time(), + comm->get_cname(), comm->get_source()->get_cname(), comm->get_destination()->get_cname()); } } return 0; diff --git a/examples/cpp/dag-from-dot/s4u_dag-from-dot.tesh b/examples/cpp/dag-from-dot/s4u_dag-from-dot.tesh index 349a97a18d..190597ec66 100644 --- a/examples/cpp/dag-from-dot/s4u_dag-from-dot.tesh +++ b/examples/cpp/dag-from-dot/s4u_dag-from-dot.tesh @@ -36,12 +36,12 @@ $ ${bindir:=.}/s4u_dag-from-dot --log=no_loc ${platfdir}/cluster_backbone.xml ${ > [110.047415] [dag_from_dot/INFO] [70.039443->80.039443] '7' executed on node-16.simgrid.org > [110.047415] [dag_from_dot/INFO] [80.047414->90.047415] '8' executed on node-17.simgrid.org > [110.047415] [dag_from_dot/INFO] [90.047415->100.047415] '9' executed on node-18.simgrid.org -> [110.047415] [dag_from_dot/INFO] 0->1 -> [110.047415] [dag_from_dot/INFO] 1->2 -> [110.047415] [dag_from_dot/INFO] 2->3 -> [110.047415] [dag_from_dot/INFO] 4->5 -> [110.047415] [dag_from_dot/INFO] 6->7 -> [110.047415] [dag_from_dot/INFO] 7->8 -> [110.047415] [dag_from_dot/INFO] 7->end -> [110.047415] [dag_from_dot/INFO] root->5 +> [110.047415] [dag_from_dot/INFO] [10.000000->10.007889] '0->1' transferred from node-1.simgrid.org to node-10.simgrid.org +> [110.047415] [dag_from_dot/INFO] [20.007889->20.015777] '1->2' transferred from node-10.simgrid.org to node-11.simgrid.org +> [110.047415] [dag_from_dot/INFO] [30.015777->30.023666] '2->3' transferred from node-11.simgrid.org to node-12.simgrid.org +> [110.047415] [dag_from_dot/INFO] [50.023666->50.031555] '4->5' transferred from node-13.simgrid.org to node-14.simgrid.org +> [110.047415] [dag_from_dot/INFO] [70.031555->70.039443] '6->7' transferred from node-15.simgrid.org to node-16.simgrid.org +> [110.047415] [dag_from_dot/INFO] [80.039443->80.047414] '7->8' transferred from node-16.simgrid.org to node-17.simgrid.org +> [110.047415] [dag_from_dot/INFO] [80.039443->80.129922] '7->end' transferred from node-16.simgrid.org to node-0.simgrid.org +> [110.047415] [dag_from_dot/INFO] [0.000000->0.090396] 'root->5' transferred from node-0.simgrid.org to node-14.simgrid.org > [110.047415] [dag_from_dot/INFO] [100.047415->110.047415] 'end' executed on node-0.simgrid.org diff --git a/teshsuite/s4u/dag-incomplete-simulation/dag-incomplete-simulation.cpp b/teshsuite/s4u/dag-incomplete-simulation/dag-incomplete-simulation.cpp index e1823d649b..85ed903361 100644 --- a/teshsuite/s4u/dag-incomplete-simulation/dag-incomplete-simulation.cpp +++ b/teshsuite/s4u/dag-incomplete-simulation/dag-incomplete-simulation.cpp @@ -37,8 +37,8 @@ int main(int argc, char** argv) C->add_successor(D); Init->set_host(host); - A->set_from(host)->set_to(host); - D->set_from(host)->set_to(host); + A->set_source(host)->set_destination(host); + D->set_source(host)->set_destination(host); /* let's launch the simulation! */ e.run(); -- 2.20.1