Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] new option for smpirun (-triva) to generate graph configurations for triva
[simgrid.git] / src / smpi / smpi_global.c
index 99aca73..896facd 100644 (file)
@@ -10,6 +10,7 @@
 #include "private.h"
 #include "smpi_mpi_dt_private.h"
 #include "mc/mc.h"
+#include "surf/surf.h"
 
 XBT_LOG_NEW_CATEGORY(smpi, "All SMPI categories");
 
@@ -42,7 +43,7 @@ void smpi_process_init(int *argc, char ***argv)
     proc = SIMIX_process_self();
     index = atoi((*argv)[1]);
     data = smpi_process_remote_data(index);
-    SIMIX_process_set_data(proc, data);
+    SIMIX_req_process_set_data(proc, data);
     if (*argc > 2) {
       free((*argv)[1]);
       memmove(&(*argv)[1], &(*argv)[2], sizeof(char *) * (*argc - 2));
@@ -68,7 +69,7 @@ int smpi_process_argc(void) {
   return data->argc ? *(data->argc) - 1 : 0;
 }
 
-int smpi_process_getarg(integer* index, char* dst, ftnlen len) {
+int smpi_process_getarg(int* index, char* dst, size_t len) {
   smpi_process_data_t data = smpi_process_data();
   char* arg;
   size_t i;
@@ -102,7 +103,7 @@ int smpi_global_size(void) {
 
 smpi_process_data_t smpi_process_data(void)
 {
-  return SIMIX_process_get_data(SIMIX_process_self());
+  return SIMIX_req_process_get_data(SIMIX_process_self());
 }
 
 smpi_process_data_t smpi_process_remote_data(int index)
@@ -186,7 +187,7 @@ void smpi_process_post_send(MPI_Comm comm, MPI_Request request)
       return;
     }
   }
-  request->rdv = SIMIX_rdv_create(NULL);
+  request->rdv = SIMIX_req_rdv_create(NULL);
   xbt_fifo_push(data->pending_sent, request);
 }
 
@@ -212,7 +213,7 @@ void smpi_process_post_recv(MPI_Request request)
       return;
     }
   }
-  request->rdv = SIMIX_rdv_create(NULL);
+  request->rdv = SIMIX_req_rdv_create(NULL);
   xbt_fifo_push(data->pending_recv, request);
 }
 
@@ -221,8 +222,8 @@ void smpi_global_init(void)
   int i;
   MPI_Group group;
 
-  SIMIX_network_set_copy_data_callback
-      (&SIMIX_network_copy_buffer_callback);
+  SIMIX_comm_set_copy_data_callback
+      (&SIMIX_comm_copy_buffer_callback);
   process_count = SIMIX_process_count();
   process_data = xbt_new(smpi_process_data_t, process_count);
   for (i = 0; i < process_count; i++) {
@@ -318,14 +319,11 @@ int MAIN__(void)
   /* Clean IO before the run */
   fflush(stdout);
   fflush(stderr);
-  SIMIX_init();
 
-#ifdef HAVE_MC
-  if (_surf_do_model_check)
-    MC_modelcheck(1);
+  if (MC_IS_ENABLED)
+    MC_modelcheck();
   else
-#endif
-    while (SIMIX_solve(NULL, NULL) != -1.0);
+    SIMIX_run();
 
   if (xbt_cfg_get_int(_surf_cfg_set, "smpi/display_timing"))
     INFO1("simulation time %g", SIMIX_get_clock());