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
Remove unused variables.
[simgrid.git]
/
examples
/
msg
/
chainsend
/
broadcaster.c
diff --git
a/examples/msg/chainsend/broadcaster.c
b/examples/msg/chainsend/broadcaster.c
index
2d0b1c0
..
c0fe0d8
100644
(file)
--- a/
examples/msg/chainsend/broadcaster.c
+++ b/
examples/msg/chainsend/broadcaster.c
@@
-7,43
+7,17
@@
xbt_dynar_t build_hostlist_from_hostcount(int hostcount)
{
xbt_dynar_t host_list = xbt_dynar_new(sizeof(char*), NULL);
char *hostname = NULL;
- msg_host_t h = NULL;
int i = 1;
for (; i < hostcount+1; i++) {
hostname = xbt_new(char, HOSTNAME_LENGTH);
snprintf(hostname, HOSTNAME_LENGTH, "host%d", i);
- //XBT_INFO("%s", hostname);
- /*h = MSG_get_host_by_name(hostname);
- if (h == NULL) {
- XBT_INFO("Unknown host %s. Stopping Now! ", hostname);
- abort();
- } else {*/
- xbt_dynar_push(host_list, &hostname);
- /*}*/
+ XBT_DEBUG("%s", hostname);
+ xbt_dynar_push(host_list, &hostname);
}
return host_list;
}
-/*xbt_dynar_t build_hostlist_from_argv(int argc, char *argv[])
-{
- xbt_dynar_t host_list = xbt_dynar_new(sizeof(char*), NULL);
- msg_host_t h = NULL;
- int i = 1;
-
- for (; i < argc; i++) {
- XBT_INFO("host%d = %s", i, argv[i]);
- h = MSG_get_host_by_name(argv[i]);
- if (h == NULL) {
- XBT_INFO("Unknown host %s. Stopping Now! ", argv[i]);
- abort();
- } else {
- xbt_dynar_push(host_list, &(argv[i]));
- }
- }
- return host_list;
-}*/
-
void delete_hostlist(xbt_dynar_t h)
{
xbt_dynar_free(&h);
@@
-76,7
+50,7
@@
int broadcaster_build_chain(const char **first, xbt_dynar_t host_list, xbt_dynar
next = *cur;
else
next = NULL;
-
//XBT_INFO
("Building chain -- broadcaster:\"%s\" dest:\"%s\" prev:\"%s\" next:\"%s\"", me, current_host, prev, next);
+
XBT_DEBUG
("Building chain -- broadcaster:\"%s\" dest:\"%s\" prev:\"%s\" next:\"%s\"", me, current_host, prev, next);
/* Send message to current peer */
task = task_message_chain_new(me, current_host, prev, next);
@@
-94,7
+68,6
@@
int broadcaster_send_file(const char *first)
{
const char *me = MSG_host_get_name(MSG_host_self());
msg_task_t task = NULL;
- msg_comm_t comm = NULL;
int status;
int piece_count = PIECE_COUNT;
@@
-102,7
+75,7
@@
int broadcaster_send_file(const char *first)
for (; cur < piece_count; cur++) {
task = task_message_data_new(me, first, NULL, 0);
- XBT_
INFO
("Sending (send) from %s into mailbox %s", me, first);
+ XBT_
DEBUG
("Sending (send) from %s into mailbox %s", me, first);
status = MSG_task_send(task, first);
xbt_assert(status == MSG_OK, "broadcaster_send_file() failed");