- MC_snapshot_add_region(snapshot, 1, mc_libsimgrid_info->start_rw,
- mc_libsimgrid_info->end_rw -
- mc_libsimgrid_info->start_rw);
- if (!smpi_privatize_global_variables) {
- MC_snapshot_add_region(snapshot, 2, mc_binary_info->start_rw,
- mc_binary_info->end_rw - mc_binary_info->start_rw);
- snapshot->privatization_regions = NULL;
- snapshot->privatization_index = -1;
- } else {
+ MC_snapshot_add_region(snapshot, 1,
+ mc_libsimgrid_info->start_rw, mc_libsimgrid_info->start_rw,
+ mc_libsimgrid_info->end_rw - mc_libsimgrid_info->start_rw);
+
+#ifdef HAVE_SMPI
+ size_t i;
+ if (smpi_privatize_global_variables && smpi_process_count()) {
+ // Snapshot the global variable of the application separately for each
+ // simulated process: