-/* Copyright (c) 2003-6 Martin Quinson. All rights reserved. */
+/* Copyright (c) 2005, 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+ * All rights reserved. */
/* 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. */
amok_pm_init();
mysock = gras_socket_server_range(3000, 9999, 0, 0);
amok_pm_init();
mysock = gras_socket_server_range(3000, 9999, 0, 0);
/* Test BW without saturation */
amok_bw_request(bw1, 4000, bw2, 4000,
buf_size, msg_size, msg_amount, min_duration, &sec, &bw);
/* Test BW without saturation */
amok_bw_request(bw1, 4000, bw2, 4000,
buf_size, msg_size, msg_amount, min_duration, &sec, &bw);
- INFO4("BW(%s,%s) => %f sec, achieving %f Mb/s",
+ XBT_INFO("BW(%s,%s) => %f sec, achieving %f Mb/s",
bw1, bw2, sec, (bw / 1024.0 / 1024.0));
bw1, bw2, sec, (bw / 1024.0 / 1024.0));
amok_bw_request(bw1, 4000, bw2, 4000,
buf_size, msg_size, msg_amount, min_duration, &sec_sat,
&bw_sat);
amok_bw_request(bw1, 4000, bw2, 4000,
buf_size, msg_size, msg_amount, min_duration, &sec_sat,
&bw_sat);
- INFO6("BW(%s,%s//%s,%s) => %f sec, achieving %f Mb/s", bw1, bw2, sat1, sat2,
- sec, bw / 1024.0 / 1024.0);
+ XBT_INFO("BW(%s,%s//%s,%s) => %f sec, achieving %f Mb/s", bw1, bw2, sat1,
+ sat2, sec, bw / 1024.0 / 1024.0);
amok_bw_saturate_stop(sat1, 4000, NULL, NULL);
if (bw_sat / bw < 0.7) {
amok_bw_saturate_stop(sat1, 4000, NULL, NULL);
if (bw_sat / bw < 0.7) {
h1->name, h1->port, h2->name, h2->port);
amok_bw_saturate_start(h1->name, h1->port, h2->name, h2->port, 0, /* Be a nice boy, compute msg_size yourself */
30 /* 5 sec timeout */ );
/* Stop it after a while */
h1->name, h1->port, h2->name, h2->port);
amok_bw_saturate_start(h1->name, h1->port, h2->name, h2->port, 0, /* Be a nice boy, compute msg_size yourself */
30 /* 5 sec timeout */ );
/* Stop it after a while */
amok_bw_saturate_stop(h1->name, h1->port, &duration, &bw);
}
CATCH(e) {
amok_bw_saturate_stop(h1->name, h1->port, &duration, &bw);
}
CATCH(e) {
- INFO2("Saturation took %.2fsec, achieving %fb/s", duration, bw);
+ XBT_INFO("Saturation took %.2fsec, achieving %fb/s", duration, bw);
/* Game is over, friends */
amok_pm_group_shutdown("saturate");
/* Game is over, friends */
amok_pm_group_shutdown("saturate");
/********************************************************************************************/
static void full_fledged_saturation(int argc, char *argv[])
{
/********************************************************************************************/
static void full_fledged_saturation(int argc, char *argv[])
{
bw = amok_bw_matrix(peers, buf_size, msg_size, msg_amount, min_duration);
bw = amok_bw_matrix(peers, buf_size, msg_size, msg_amount, min_duration);
(long int) (time(NULL) - begin), gras_os_time() - begin_simulated);
/* Do the test with saturation */
(long int) (time(NULL) - begin), gras_os_time() - begin_simulated);
/* Do the test with saturation */
amok_bw_saturate_start(h1->name, h1->port, h2->name, h2->port, 0, /* Be nice, compute msg_size yourself */
0 /* no timeout */ );
}
amok_bw_saturate_start(h1->name, h1->port, h2->name, h2->port, 0, /* Be nice, compute msg_size yourself */
0 /* no timeout */ );
}
h1->name, h2->name, h3->name, h4->name);
amok_bw_request(h3->name, h3->port, h4->name, h4->port,
buf_size, msg_size, msg_amount, min_duration,
NULL, &(bw_sat[k * nb_peers + l]));
ratio = bw_sat[k * nb_peers + l] / bw[k * nb_peers + l];
h1->name, h2->name, h3->name, h4->name);
amok_bw_request(h3->name, h3->port, h4->name, h4->port,
buf_size, msg_size, msg_amount, min_duration,
NULL, &(bw_sat[k * nb_peers + l]));
ratio = bw_sat[k * nb_peers + l] / bw[k * nb_peers + l];
h1->name, h2->name, h3->name, h4->name,
ratio,
bw[k * nb_peers + l], bw_sat[k * nb_peers + l],
h1->name, h2->name, h3->name, h4->name,
ratio,
bw[k * nb_peers + l], bw_sat[k * nb_peers + l],
}
amok_bw_saturate_stop(h1->name, h1->port, &time1, &bw1);
}
amok_bw_saturate_stop(h1->name, h1->port, &time1, &bw1);
- INFO2
- ("Did an iteration on saturation pair in %ld sec (%.2f simulated sec)",
- (long int) (time(NULL) - begin), gras_os_time() - begin_simulated);
- INFO2("the duration of the experiment >>>>> %.3f sec (%.3f bandwidth)",
- time1, bw1);
+ XBT_INFO
+ ("Did an iteration on saturation pair in %ld sec (%.2f simulated sec)",
+ (long int) (time(NULL) - begin),
+ gras_os_time() - begin_simulated);
+ XBT_INFO
+ ("the duration of the experiment >>>>> %.3f sec (%.3f bandwidth)",
+ time1, bw1);