Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI] Make spelling uniform: privatisation -> privatization
authorChristian Heinrich <franz-christian.heinrich@inria.fr>
Thu, 6 Jul 2017 17:29:42 +0000 (19:29 +0200)
committerChristian Heinrich <franz-christian.heinrich@inria.fr>
Thu, 6 Jul 2017 17:29:42 +0000 (19:29 +0200)
src/mc/Process.cpp
src/mc/RegionSnapshot.hpp
src/mc/mc_checkpoint.cpp
src/mc/mc_unw_vmread.cpp
src/smpi/private.h
src/smpi/smpi_bench.cpp
src/smpi/smpi_memory.cpp

index 08f4944..d4d71ea 100644 (file)
@@ -483,18 +483,18 @@ const void *Process::read_bytes(void* buffer, std::size_t size,
       if (process_index >= (int) MC_smpi_process_count())
         xbt_die("Invalid process index");
 
       if (process_index >= (int) MC_smpi_process_count())
         xbt_die("Invalid process index");
 
-      // Read smpi_privatisation_regions from MCed:
-      smpi_privatisation_region_t remote_smpi_privatisation_regions =
-        mc_model_checker->process().read_variable<smpi_privatisation_region_t>(
-          "smpi_privatisation_regions");
+      // Read smpi_privatization_regions from MCed:
+      smpi_privatization_region_t remote_smpi_privatization_regions =
+        mc_model_checker->process().read_variable<smpi_privatization_region_t>(
+          "smpi_privatization_regions");
 
 
-      s_smpi_privatisation_region_t privatisation_region =
-        mc_model_checker->process().read<s_smpi_privatisation_region_t>(
-          remote(remote_smpi_privatisation_regions + process_index));
+      s_smpi_privatization_region_t privatization_region =
+        mc_model_checker->process().read<s_smpi_privatization_region_t>(
+          remote(remote_smpi_privatization_regions + process_index));
 
       // Address translation in the privatization segment:
       size_t offset = address.address() - (std::uint64_t)info->start_rw;
 
       // Address translation in the privatization segment:
       size_t offset = address.address() - (std::uint64_t)info->start_rw;
-      address = remote((char*)privatisation_region.address + offset);
+      address = remote((char*)privatization_region.address + offset);
     }
 #endif
   }
     }
 #endif
   }
index 8fd9e60..baa41dd 100644 (file)
@@ -101,7 +101,7 @@ public:
  *  * sparse/per-page snapshots are snaapshots which shared
  *    identical pages.
  *
  *  * sparse/per-page snapshots are snaapshots which shared
  *    identical pages.
  *
- *  * privatized (SMPI global variable privatisation).
+ *  * privatized (SMPI global variable privatization).
  *
  *  This is handled with a variant based approach:
  *
  *
  *  This is handled with a variant based approach:
  *
index e4fa6e4..a91ef29 100644 (file)
@@ -89,21 +89,21 @@ RegionSnapshot privatized_region(
 {
   size_t process_count = MC_smpi_process_count();
 
 {
   size_t process_count = MC_smpi_process_count();
 
-  // Read smpi_privatisation_regions from MCed:
-  smpi_privatisation_region_t remote_smpi_privatisation_regions;
+  // Read smpi_privatization_regions from MCed:
+  smpi_privatization_region_t remote_smpi_privatization_regions;
   mc_model_checker->process().read_variable(
   mc_model_checker->process().read_variable(
-    "smpi_privatisation_regions",
-    &remote_smpi_privatisation_regions, sizeof(remote_smpi_privatisation_regions));
-  s_smpi_privatisation_region_t privatisation_regions[process_count];
+    "smpi_privatization_regions",
+    &remote_smpi_privatization_regions, sizeof(remote_smpi_privatization_regions));
+  s_smpi_privatization_region_t privatization_regions[process_count];
   mc_model_checker->process().read_bytes(
   mc_model_checker->process().read_bytes(
-    &privatisation_regions, sizeof(privatisation_regions),
-    remote(remote_smpi_privatisation_regions));
+    &privatization_regions, sizeof(privatization_regions),
+    remote(remote_smpi_privatization_regions));
 
   std::vector<simgrid::mc::RegionSnapshot> data;
   data.reserve(process_count);
   for (size_t i = 0; i < process_count; i++)
     data.push_back(simgrid::mc::region(region_type, start_addr,
 
   std::vector<simgrid::mc::RegionSnapshot> data;
   data.reserve(process_count);
   for (size_t i = 0; i < process_count; i++)
     data.push_back(simgrid::mc::region(region_type, start_addr,
-      privatisation_regions[i].address, size));
+      privatization_regions[i].address, size));
 
   simgrid::mc::RegionSnapshot region = simgrid::mc::RegionSnapshot(
     region_type, start_addr, permanent_addr, size);
 
   simgrid::mc::RegionSnapshot region = simgrid::mc::RegionSnapshot(
     region_type, start_addr, permanent_addr, size);
@@ -510,7 +510,7 @@ static std::vector<s_fd_infos_t> get_current_fds(pid_t pid)
     link[res] = '\0';
 
 #if HAVE_SMPI
     link[res] = '\0';
 
 #if HAVE_SMPI
-    if(smpi_is_privatisation_file(link))
+    if(smpi_is_privatization_file(link))
       continue;
 #endif
 
       continue;
 #endif
 
index 8d5f249..148a2f5 100644 (file)
@@ -109,7 +109,7 @@ namespace unw {
  *  does not use ptrace() to read the target process memory by
  *  `process_vm_readv()` or `/dev/${pid}/mem` if possible.
  *
  *  does not use ptrace() to read the target process memory by
  *  `process_vm_readv()` or `/dev/${pid}/mem` if possible.
  *
- *  Does not support any MC-specific behaviour (privatisation, snapshots)
+ *  Does not support any MC-specific behaviour (privatization, snapshots)
  *  and `ucontext_t`.
  *
  *  It works with `void*` contexts allocated with `_UPT_create(pid)`.
  *  and `ucontext_t`.
  *
  *  It works with `void*` contexts allocated with `_UPT_create(pid)`.
index d307b72..7caa176 100644 (file)
@@ -83,7 +83,7 @@ extern XBT_PRIVATE shared_malloc_type smpi_cfg_shared_malloc; // Whether to acti
 
 XBT_PRIVATE void smpi_switch_data_segment(int dest);
 XBT_PRIVATE void smpi_really_switch_data_segment(int dest);
 
 XBT_PRIVATE void smpi_switch_data_segment(int dest);
 XBT_PRIVATE void smpi_really_switch_data_segment(int dest);
-XBT_PRIVATE int smpi_is_privatisation_file(char* file);
+XBT_PRIVATE int smpi_is_privatization_file(char* file);
 
 XBT_PRIVATE void smpi_get_executable_global_size();
 XBT_PRIVATE void smpi_initialize_global_memory_segments();
 
 XBT_PRIVATE void smpi_get_executable_global_size();
 XBT_PRIVATE void smpi_initialize_global_memory_segments();
@@ -361,13 +361,13 @@ void mpi_file_write_ ( int* fh, void* buf, int* count, int* datatype, MPI_Status
 
 // TODO, make this static and expose it more cleanly
 
 
 // TODO, make this static and expose it more cleanly
 
-typedef struct s_smpi_privatisation_region {
+typedef struct s_smpi_privatization_region {
   void* address;
   int file_descriptor;
   void* address;
   int file_descriptor;
-} s_smpi_privatisation_region_t;
-typedef s_smpi_privatisation_region_t* smpi_privatisation_region_t;
+} s_smpi_privatization_region_t;
+typedef s_smpi_privatization_region_t* smpi_privatization_region_t;
 
 
-extern XBT_PRIVATE smpi_privatisation_region_t smpi_privatisation_regions;
+extern XBT_PRIVATE smpi_privatization_region_t smpi_privatization_regions;
 extern XBT_PRIVATE int smpi_loaded_page;
 extern XBT_PRIVATE int smpi_universe_size;
 
 extern XBT_PRIVATE int smpi_loaded_page;
 extern XBT_PRIVATE int smpi_universe_size;
 
index f902f4e..ce3502d 100644 (file)
@@ -30,7 +30,7 @@ double smpi_host_speed;
 
 shared_malloc_type smpi_cfg_shared_malloc = shmalloc_global;
 double smpi_total_benched_time = 0;
 
 shared_malloc_type smpi_cfg_shared_malloc = shmalloc_global;
 double smpi_total_benched_time = 0;
-smpi_privatisation_region_t smpi_privatisation_regions;
+smpi_privatization_region_t smpi_privatization_regions;
 
 void smpi_bench_destroy()
 {
 
 void smpi_bench_destroy()
 {
index 4b62f24..22fbd56 100644 (file)
@@ -91,12 +91,12 @@ void smpi_really_switch_data_segment(int dest)
 #if HAVE_PRIVATIZATION
   if(smpi_loaded_page==-1){//initial switch, do the copy from the real page here
     for (int i=0; i< smpi_process_count(); i++){
 #if HAVE_PRIVATIZATION
   if(smpi_loaded_page==-1){//initial switch, do the copy from the real page here
     for (int i=0; i< smpi_process_count(); i++){
-      memcpy(smpi_privatisation_regions[i].address, TOPAGE(smpi_start_data_exe), smpi_size_data_exe);
+      memcpy(smpi_privatization_regions[i].address, TOPAGE(smpi_start_data_exe), smpi_size_data_exe);
     }
   }
 
   // FIXME, cross-process support (mmap across process when necessary)
     }
   }
 
   // FIXME, cross-process support (mmap across process when necessary)
-  int current = smpi_privatisation_regions[dest].file_descriptor;
+  int current = smpi_privatization_regions[dest].file_descriptor;
   XBT_DEBUG("Switching data frame to the one of process %d", dest);
   void* tmp =
       mmap(TOPAGE(smpi_start_data_exe), smpi_size_data_exe, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, current, 0);
   XBT_DEBUG("Switching data frame to the one of process %d", dest);
   void* tmp =
       mmap(TOPAGE(smpi_start_data_exe), smpi_size_data_exe, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, current, 0);
@@ -106,7 +106,7 @@ void smpi_really_switch_data_segment(int dest)
 #endif
 }
 
 #endif
 }
 
-int smpi_is_privatisation_file(char* file)
+int smpi_is_privatization_file(char* file)
 {
   return strncmp("/dev/shm/my-buffer-", file, std::strlen("/dev/shm/my-buffer-")) == 0;
 }
 {
   return strncmp("/dev/shm/my-buffer-", file, std::strlen("/dev/shm/my-buffer-")) == 0;
 }
@@ -124,8 +124,8 @@ void smpi_initialize_global_memory_segments()
     return;
   }
 
     return;
   }
 
-  smpi_privatisation_regions = static_cast<smpi_privatisation_region_t>(
-      xbt_malloc(smpi_process_count() * sizeof(struct s_smpi_privatisation_region)));
+  smpi_privatization_regions = static_cast<smpi_privatization_region_t>(
+      xbt_malloc(smpi_process_count() * sizeof(struct s_smpi_privatization_region)));
 
   for (int i=0; i< smpi_process_count(); i++){
     // create SIMIX_process_count() mappings of this size with the same data inside
 
   for (int i=0; i< smpi_process_count(); i++){
     // create SIMIX_process_count() mappings of this size with the same data inside
@@ -174,8 +174,8 @@ Ask the Internet about tutorials on how to increase the files limit such as: htt
     memcpy(address, TOPAGE(smpi_start_data_exe), smpi_size_data_exe);
 
     // store the address of the mapping for further switches
     memcpy(address, TOPAGE(smpi_start_data_exe), smpi_size_data_exe);
 
     // store the address of the mapping for further switches
-    smpi_privatisation_regions[i].file_descriptor = file_descriptor;
-    smpi_privatisation_regions[i].address         = address;
+    smpi_privatization_regions[i].file_descriptor = file_descriptor;
+    smpi_privatization_regions[i].address         = address;
   }
 #else /* ! HAVE_PRIVATIZATION */
   smpi_privatize_global_variables = false;
   }
 #else /* ! HAVE_PRIVATIZATION */
   smpi_privatize_global_variables = false;
@@ -189,11 +189,11 @@ void smpi_destroy_global_memory_segments(){
     return;
 #if HAVE_PRIVATIZATION
   for (int i=0; i< smpi_process_count(); i++) {
     return;
 #if HAVE_PRIVATIZATION
   for (int i=0; i< smpi_process_count(); i++) {
-    if (munmap(smpi_privatisation_regions[i].address, smpi_size_data_exe) < 0)
-      XBT_WARN("Unmapping of fd %d failed: %s", smpi_privatisation_regions[i].file_descriptor, strerror(errno));
-    close(smpi_privatisation_regions[i].file_descriptor);
+    if (munmap(smpi_privatization_regions[i].address, smpi_size_data_exe) < 0)
+      XBT_WARN("Unmapping of fd %d failed: %s", smpi_privatization_regions[i].file_descriptor, strerror(errno));
+    close(smpi_privatization_regions[i].file_descriptor);
   }
   }
-  xbt_free(smpi_privatisation_regions);
+  xbt_free(smpi_privatization_regions);
 #endif
 }
 
 #endif
 }