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
Chord: update some messages displayed
[simgrid.git]
/
examples
/
msg
/
token_ring
/
ring_call.c
diff --git
a/examples/msg/token_ring/ring_call.c
b/examples/msg/token_ring/ring_call.c
index
2c17529
..
305945b
100644
(file)
--- a/
examples/msg/token_ring/ring_call.c
+++ b/
examples/msg/token_ring/ring_call.c
@@
-39,15
+39,11
@@
int master(int argc, char *argv[])
task_comm_size,
NULL);
MSG_task_send(task_s,mailbox);
task_comm_size,
NULL);
MSG_task_send(task_s,mailbox);
- MSG_process_sleep(1);
- //MSG_comm_wait(comm, -1);
- INFO1("Send Data to \"%s\"", mailbox);
+ XBT_INFO("Send Data to \"%s\"", mailbox);
sprintf(mailbox, "host%d", num);
MSG_task_receive(&(task_r), mailbox);
sprintf(mailbox, "host%d", num);
MSG_task_receive(&(task_r), mailbox);
- //res = MSG_comm_wait(res_irecv, -1);
- INFO1("Received \"%s\"", MSG_task_get_name(task_r));
- //MSG_comm_destroy(res_irecv);
+ XBT_INFO("Received \"%s\"", MSG_task_get_name(task_r));
return 0;
}
return 0;
}
@@
-63,12
+59,7
@@
int slave(int argc, char *argv[])
sprintf(mailbox, "host%d", num);
MSG_task_receive(&(task_r), mailbox);
sprintf(mailbox, "host%d", num);
MSG_task_receive(&(task_r), mailbox);
- //res = MSG_comm_wait(res_irecv, -1);
- INFO1("Received \"%s\"", MSG_task_get_name(task_r));
- MSG_process_sleep(1);
- //MSG_comm_destroy(res_irecv);
- //Receive something now need to tell it!
-
+ XBT_INFO("Received \"%s\"", MSG_task_get_name(task_r));
sprintf(mailbox, "host%d", num+1);
if(num == totalHosts-1)
sprintf(mailbox, "host%d", 0);
sprintf(mailbox, "host%d", num+1);
if(num == totalHosts-1)
sprintf(mailbox, "host%d", 0);
@@
-78,8
+69,7
@@
int slave(int argc, char *argv[])
task_comm_size,
NULL);
MSG_task_send(task_s, mailbox);
task_comm_size,
NULL);
MSG_task_send(task_s, mailbox);
- //MSG_comm_wait(comm, -1);
- INFO1("Send Data to \"%s\"", mailbox);
+ XBT_INFO("Send Data to \"%s\"", mailbox);
return 0;
}
return 0;
}
@@
-102,7
+92,7
@@
static int surf_parse_bypass_application(void)
SURFXML_START_TAG(platform);
SURFXML_START_TAG(platform);
-
DEBUG1
("process : %s en master",MSG_host_get_name(hosts[0]));
+
XBT_DEBUG
("process : %s en master",MSG_host_get_name(hosts[0]));
/* <process host="host A" function="master"> */
SURFXML_BUFFER_SET(process_host, MSG_host_get_name(hosts[0]));
SURFXML_BUFFER_SET(process_function, "master");
/* <process host="host A" function="master"> */
SURFXML_BUFFER_SET(process_host, MSG_host_get_name(hosts[0]));
SURFXML_BUFFER_SET(process_function, "master");
@@
-118,7
+108,7
@@
static int surf_parse_bypass_application(void)
for(i=1;i<totalHosts;i++)
{
for(i=1;i<totalHosts;i++)
{
-
DEBUG1
("process : %s en slave",MSG_host_get_name(hosts[i]));
+
XBT_DEBUG
("process : %s en slave",MSG_host_get_name(hosts[i]));
/* <process host="host A" function="slave"> */
SURFXML_BUFFER_SET(process_host,MSG_host_get_name(hosts[i]) );
SURFXML_BUFFER_SET(process_function, "slave");
/* <process host="host A" function="slave"> */
SURFXML_BUFFER_SET(process_host,MSG_host_get_name(hosts[i]) );
SURFXML_BUFFER_SET(process_function, "slave");
@@
-158,7
+148,7
@@
int main(int argc, char **argv)
res = MSG_main();
res = MSG_main();
-
INFO1
("Simulation time %g", MSG_get_clock());
+
XBT_INFO
("Simulation time %g", MSG_get_clock());
MSG_clean();
MSG_clean();