A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[trace] process category is deprecated (for now, at least)
[simgrid.git]
/
examples
/
amok
/
saturate
/
saturate.c
diff --git
a/examples/amok/saturate/saturate.c
b/examples/amok/saturate/saturate.c
index
70d6cad
..
1b77417
100644
(file)
--- a/
examples/amok/saturate/saturate.c
+++ b/
examples/amok/saturate/saturate.c
@@
-1,8
+1,7
@@
-/* $Id$ */
-
/* saturate - link saturation demo of AMOK features */
/* saturate - link saturation demo of AMOK features */
-/* 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. */
@@
-17,7
+16,8
@@
#include "amok/bandwidth.h"
#include "amok/peermanagement.h"
#include "amok/bandwidth.h"
#include "amok/peermanagement.h"
-XBT_LOG_NEW_DEFAULT_CATEGORY(saturate, "Messages specific to this example");
+XBT_LOG_NEW_DEFAULT_CATEGORY(saturate,
+ "Messages specific to this example");
/* **********************************************************************
* Sensor code
/* **********************************************************************
* Sensor code
@@
-40,7
+40,7
@@
int sensor(int argc, char *argv[])
gras_os_sleep(2); /* let the master get ready */
master = gras_socket_client_from_string(argv[1]);
gras_os_sleep(2); /* let the master get ready */
master = gras_socket_client_from_string(argv[1]);
- amok_pm_group_join(master, "saturate"
, -1
);
+ amok_pm_group_join(master, "saturate");
amok_pm_mainloop(600);
gras_socket_close(mysock);
amok_pm_mainloop(600);
gras_socket_close(mysock);
@@
-84,8
+84,8
@@
static double XP(const char *bw1, const char *bw2,
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);
+ INFO6("BW(%s,%s//%s,%s) => %f sec, achieving %f Mb/s", bw1, bw2, sat1,
+ s
at2, s
ec, bw / 1024.0 / 1024.0);
amok_bw_saturate_stop(sat1, 4000, NULL, NULL);
amok_bw_saturate_stop(sat1, 4000, NULL, NULL);
@@
-253,10
+253,12
@@
static void full_fledged_saturation(int argc, char *argv[])
amok_bw_saturate_stop(h1->name, h1->port, &time1, &bw1);
INFO2
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);
+ ("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);
}
}
free(bw_sat);
}
}
free(bw_sat);