Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
icomms are async (and there is no peer!!)
[simgrid.git] / examples / msg / async-waitall / async-waitall.c
similarity index 96%
rename from examples/msg/icomms/peer2.c
rename to examples/msg/async-waitall/async-waitall.c
index 73823ea..8a0759e 100644 (file)
@@ -28,9 +28,7 @@ static int sender(int argc, char *argv[])
     char sprintf_buffer[256];
     sprintf(mailbox, "receiver-%ld", i % receivers_count);
     sprintf(sprintf_buffer, "Task_%d", i);
-    task =
-        MSG_task_create(sprintf_buffer, task_comp_size, task_comm_size,
-                        NULL);
+    task = MSG_task_create(sprintf_buffer, task_comp_size, task_comm_size, NULL);
     comm[i] = MSG_task_isend(task, mailbox);
     XBT_INFO("Send to receiver-%ld Task_%d", i % receivers_count, i);
   }
@@ -40,8 +38,8 @@ static int sender(int argc, char *argv[])
     task = MSG_task_create("finalize", 0, 0, 0);
     comm[i + number_of_tasks] = MSG_task_isend(task, mailbox);
     XBT_INFO("Send to receiver-%ld finalize", i % receivers_count);
-
   }
+
   /* Here we are waiting for the completion of all communications */
   MSG_comm_waitall(comm, (number_of_tasks + receivers_count), -1);
   for (i = 0; i < number_of_tasks + receivers_count; i++)