Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Read smpi_loaded_page from MCed in MC_process_init()
authorGabriel Corona <gabriel.corona@loria.fr>
Tue, 17 Mar 2015 14:31:08 +0000 (15:31 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Tue, 17 Mar 2015 15:18:04 +0000 (16:18 +0100)
src/mc/mc_checkpoint.c

index 61414d7..897ff8f 100644 (file)
@@ -278,8 +278,10 @@ static void MC_get_memory_regions(mc_process_t process, mc_snapshot_t snapshot)
 
 #ifdef HAVE_SMPI
   if (smpi_privatize_global_variables && MC_smpi_process_count()) {
 
 #ifdef HAVE_SMPI
   if (smpi_privatize_global_variables && MC_smpi_process_count()) {
-    // FIXME, cross-process
-    snapshot->privatization_index = smpi_loaded_page;
+    // snapshot->privatization_index = smpi_loaded_page
+    MC_process_read_variable(&mc_model_checker->process,
+      "smpi_loaded_page", &snapshot->privatization_index,
+      sizeof(snapshot->privatization_index));
   } else
 #endif
   {
   } else
 #endif
   {
@@ -789,6 +791,7 @@ void MC_restore_snapshot_regions(mc_snapshot_t snapshot)
   }
 
 #ifdef HAVE_SMPI
   }
 
 #ifdef HAVE_SMPI
+  // TODO, send a message to implement this in the MCed process
   if(snapshot->privatization_index >= 0) {
     // We just rewrote the global variables.
     // The privatisation segment SMPI thinks
   if(snapshot->privatization_index >= 0) {
     // We just rewrote the global variables.
     // The privatisation segment SMPI thinks