Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
use local variable in each user code so that they don't get intermixed with each...
[simgrid.git] / src / smpi / smpi_global.c
index 66a1a1a..36ecab6 100644 (file)
@@ -62,6 +62,7 @@ void smpi_process_post_send(MPI_Comm comm, MPI_Request request) {
       /* Materialize the *_ANY_* fields from corresponding irecv request */
       req->src = request->src;
       req->tag = request->tag;
+      req->data = request->data;
       request->rdv = req->rdv;
       return;
     } else {
@@ -90,6 +91,7 @@ void smpi_process_post_recv(MPI_Request request) {
       /* Materialize the *_ANY_* fields from the irecv request */
       request->src = req->src;
       request->tag = req->tag;
+      request->data = req->data;
       request->rdv = req->rdv;
       return;
     } else {
@@ -105,6 +107,7 @@ void smpi_global_init(void) {
   int i;
   MPI_Group group;
 
+  SIMIX_network_set_copy_data_callback(&SIMIX_network_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++) {
@@ -151,6 +154,11 @@ int main(int argc, char **argv)
                    "Boolean indicating whether we should display the timing after simulation.",
                    xbt_cfgelm_int, &default_display_timing, 1, 1, NULL, NULL);
 
+  int default_display_smpe = 0;
+  xbt_cfg_register(&_surf_cfg_set, "SMPE",
+                   "Boolean indicating whether we should display simulated time spent in MPI calls.",
+                   xbt_cfgelm_int, &default_display_smpe, 1, 1, NULL, NULL);
+
   SIMIX_global_init(&argc, argv);
 
   // parse the platform file: get the host list