From 1ac0a9a0d3915e3ffa89e2901028e2463da3804d Mon Sep 17 00:00:00 2001 From: suter Date: Thu, 4 Feb 2010 13:02:38 +0000 Subject: [PATCH] Repair collective operations (changes made for asynchronous end to end communications had a bad impact) !!! WARNING !!! In order to save space the arbitrary choice changed. The processes now have to be named p0, p1, ..., pN instead of process0, process1, processN The resulting gain becomes impressive for large traces. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7055 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- examples/msg/actions/actions.c | 71 +++++++++++++--------- examples/msg/actions/actions_allReduce.txt | 14 ++--- examples/msg/actions/actions_bcast.txt | 32 +++++----- examples/msg/actions/actions_reduce.txt | 14 ++--- examples/msg/actions/bcast_deployment.xml | 6 +- 5 files changed, 75 insertions(+), 62 deletions(-) diff --git a/examples/msg/actions/actions.c b/examples/msg/actions/actions.c index 5034d09e9e..9661ad177a 100644 --- a/examples/msg/actions/actions.c +++ b/examples/msg/actions/actions.c @@ -45,7 +45,7 @@ static void send(xbt_dynar_t action) // char *to = xbt_dynar_get_as(action, 2, char *); DEBUG2("Entering Send: %s (size: %lg)", name, parse_double(size)); MSG_task_send(MSG_task_create(name, 0, parse_double(size), NULL), to); - INFO2("%s %f", name, MSG_get_clock()-clock); + DEBUG2("%s %f", name, MSG_get_clock()-clock); free(name); } @@ -84,7 +84,7 @@ static void Isend(xbt_dynar_t action) comm_helper = MSG_process_create_with_arguments(spawn_name, spawned_send, NULL, MSG_host_self(), 2, myargv); - INFO2("%s %f",xbt_str_join(action, " "), MSG_get_clock()-clock); + DEBUG2("%s %f",xbt_str_join(action, " "), MSG_get_clock()-clock); } @@ -101,7 +101,7 @@ static void recv(xbt_dynar_t action) DEBUG1("Receiving: %s", name); MSG_task_receive(&task, mailbox_name); // MSG_task_receive(&task, MSG_process_get_name(MSG_process_self())); - INFO2("%s %f", name, MSG_get_clock()-clock); + DEBUG2("%s %f", name, MSG_get_clock()-clock); MSG_task_destroy(task); free(name); } @@ -142,7 +142,7 @@ static void Irecv(xbt_dynar_t action) NULL, MSG_host_self(), 1, myargv); - INFO2("%s %f", xbt_str_join(action, " "), + DEBUG2("%s %f", xbt_str_join(action, " "), MSG_get_clock()-clock); free(name); @@ -158,17 +158,17 @@ static void wait_action(xbt_dynar_t action) DEBUG1("Entering %s", name); sprintf(task_name,"%s_wait",MSG_process_get_name(MSG_process_self())); - INFO1("wait: %s", task_name); + DEBUG1("wait: %s", task_name); MSG_task_receive(&task,task_name); MSG_task_destroy(task); - INFO2("%s %f", name, MSG_get_clock()-clock); + DEBUG2("%s %f", name, MSG_get_clock()-clock); free(name); } static void barrier (xbt_dynar_t action) { char *name = xbt_str_join(action, " "); - INFO1("barrier: %s", name); + DEBUG1("barrier: %s", name); free(name); @@ -181,6 +181,7 @@ static void reduce(xbt_dynar_t action) char *name; char task_name[80]; char spawn_name[80]; + char **myargv; char *comm_size = xbt_dynar_get_as(action, 2, char *); char *comp_size = xbt_dynar_get_as(action, 3, char *); m_process_t comm_helper=NULL; @@ -202,19 +203,25 @@ static void reduce(xbt_dynar_t action) name = bprintf("reduce_%d", counters->reduce_counter++); - if (!strcmp(process_name, "process0")){ + if (!strcmp(process_name, "p0")){ DEBUG2("%s: %s is the Root",name, process_name); for(i=1;ibcast_counter++); - if (!strcmp(process_name, "process0")){ + if (!strcmp(process_name, "p0")){ DEBUG2("%s: %s is the Root",name, process_name); for(i=1;iallReduce_counter++); - if (!strcmp(process_name, "process0")){ + if (!strcmp(process_name, "p0")){ DEBUG2("%s: %s is the Root",name, process_name); for(i=1;i - - - + + + -- 2.20.1