From: Martin Quinson Date: Wed, 24 Aug 2016 08:35:56 +0000 (+0200) Subject: allow this example to start without paramters X-Git-Tag: v3_14~490 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/70595966d0d7225d1406acf94e1ebb3a8b9b4357?ds=sidebyside allow this example to start without paramters --- diff --git a/examples/msg/app-pmm/app-pmm.c b/examples/msg/app-pmm/app-pmm.c index 00c76e126e..dd5e22af34 100644 --- a/examples/msg/app-pmm/app-pmm.c +++ b/examples/msg/app-pmm/app-pmm.c @@ -243,7 +243,10 @@ int main(int argc, char *argv[]) xbt_os_timer_t timer = xbt_os_timer_new(); MSG_init(&argc, argv); - MSG_create_environment(argv[1]); + const char *platform = "../../platforms/cluster.xml"; + if (argc > 1) + platform = argv[1]; + MSG_create_environment(platform); MSG_function_register("node", node); for(int i = 0 ; i< 9; i++) { @@ -259,7 +262,7 @@ int main(int argc, char *argv[]) xbt_os_cputimer_start(timer); msg_error_t res = MSG_main(); xbt_os_cputimer_stop(timer); - XBT_CRITICAL("Simulated time: %g", MSG_get_clock()); + XBT_INFO("Simulated time: %g", MSG_get_clock()); return res != MSG_OK; } diff --git a/examples/msg/app-pmm/app-pmm.tesh b/examples/msg/app-pmm/app-pmm.tesh index 5d37f1dc5a..0912eb8e6f 100644 --- a/examples/msg/app-pmm/app-pmm.tesh +++ b/examples/msg/app-pmm/app-pmm.tesh @@ -95,4 +95,4 @@ $ ./app-pmm/app-pmm --log=msg_pmm.thres:verbose --log=no_loc ${srcdir:=.}/../pla > [node-2.acme.org:node:(3) 0.046847] [msg_pmm/VERBOSE] Multiplication done. Send the sub-result. > [node-5.acme.org:node:(6) 0.046847] [msg_pmm/VERBOSE] Multiplication done. Send the sub-result. > [node-7.acme.org:node:(8) 0.046847] [msg_pmm/VERBOSE] Multiplication done. Send the sub-result. -> [0.054659] [msg_pmm/CRITICAL] Simulated time: 0.0546594 +> [0.054659] [msg_pmm/INFO] Simulated time: 0.0546594