Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't auto-destroy the MSG_comm_t in MSG_comm_wait()
authorthiery <thiery@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 7 Dec 2010 12:23:40 +0000 (12:23 +0000)
committerthiery <thiery@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 7 Dec 2010 12:23:40 +0000 (12:23 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9057 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/msg/actions/actions.c

index f5be733..f9e3e78 100644 (file)
@@ -469,7 +469,7 @@ static void action_allReduce(xbt_dynar_t action) {
     }
     MSG_comm_waitall(comms,communicator_size-1,-1);
     for (i = 1; i < communicator_size; i++) {
     }
     MSG_comm_waitall(comms,communicator_size-1,-1);
     for (i = 1; i < communicator_size; i++) {
-      // MSG_comm_destroy(comms[i-1]);
+      MSG_comm_destroy(comms[i-1]);
       MSG_task_destroy(tasks[i-1]);
     }
     free(tasks);
       MSG_task_destroy(tasks[i-1]);
     }
     free(tasks);
@@ -488,7 +488,7 @@ static void action_allReduce(xbt_dynar_t action) {
     }
     MSG_comm_waitall(comms,communicator_size-1,-1);
     /* for (i = 1; i < communicator_size; i++) */
     }
     MSG_comm_waitall(comms,communicator_size-1,-1);
     /* for (i = 1; i < communicator_size; i++) */
-    /*   MSG_comm_destroy(comms[i-1]); */
+    MSG_comm_destroy(comms[i-1]);
     free(comms);
 
     DEBUG2("%s: all messages sent by %s have been received",
     free(comms);
 
     DEBUG2("%s: all messages sent by %s have been received",