Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
further improve the MSG doc by documenting the examples
[simgrid.git] / examples / msg / parallel_task / parallel_task.c
index e6ac43a..7811e91 100644 (file)
 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
                              "Messages specific for this msg example");
 
+/** @addtogroup MSG_examples
+ * 
+ * - <b>parallel_task/parallel_task.c</b>: Demonstrates the use of
+ *   @ref MSG_parallel_task_create, to create special tasks that run
+ *   on several hosts at the same time. The resulting simulations are
+ *   very close to what can be achieved in @ref SD_API, but still
+ *   allows to use the other features of MSG (it'd be cool to be able
+ *   to mix interfaces, but it's not possible ATM).
+ */
+
 int test(int argc, char *argv[]);
 MSG_error_t test_all(const char *platform_file);
 
@@ -71,7 +81,7 @@ MSG_error_t test_all(const char *platform_file)
   MSG_create_environment(platform_file);
 
   all_hosts = MSG_hosts_as_dynar();
-  first_host = xbt_dynar_pop_as(all_hosts,m_host_t);
+  first_host = xbt_dynar_getfirst_as(all_hosts,m_host_t);
   MSG_process_create("test", test, NULL, first_host);
   res = MSG_main();
   xbt_dynar_free(&all_hosts);