Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
top_srcdir is not supposed to be a relative path
[simgrid.git] / src / smpi / smpi_global.c
index d9da589..1221b7c 100644 (file)
@@ -124,8 +124,18 @@ void smpi_global_init()
 
        int size = SIMIX_host_get_number();
 
-       smpi_global                                      = xbt_new(s_smpi_global_t, 1);
+       /* Connect our log channels: that must be done manually under windows */
+#ifdef XBT_LOG_CONNECT
+       XBT_LOG_CONNECT(smpi_base, smpi);
+       XBT_LOG_CONNECT(smpi_bench, smpi);
+       XBT_LOG_CONNECT(smpi_kernel, smpi);
+       XBT_LOG_CONNECT(smpi_mpi, smpi);
+       XBT_LOG_CONNECT(smpi_receiver, smpi);
+       XBT_LOG_CONNECT(smpi_sender, smpi);
+       XBT_LOG_CONNECT(smpi_util, smpi);
+#endif
 
+       smpi_global                                      = xbt_new(s_smpi_global_t, 1);
        // config variable
        smpi_global->reference_speed                     = SMPI_DEFAULT_SPEED;
 
@@ -291,6 +301,7 @@ int smpi_run_simulation(int *argc, char **argv)
        /* Clean IO before the run */
        fflush(stdout);
        fflush(stderr);
+        SIMIX_init();
 
        while (SIMIX_solve(actions_done, actions_failed) != -1.0) {
                while ((action = xbt_fifo_pop(actions_failed))) {