Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please sonar a tiny bit
[simgrid.git] / src / smpi / smpi_bench.cpp
index a284bb1..c27028a 100644 (file)
 #ifndef WIN32
 #include <sys/mman.h>
 #endif
-#include <sys/stat.h>
-#include <errno.h>
-#include <fcntl.h>
 #include <math.h> // sqrt
-#include <unistd.h>
-#include <string.h>
 #include <stdio.h>
 
 #if HAVE_PAPI
@@ -41,7 +36,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_bench, smpi, "Logging specific to SMPI (ben
 
 xbt_dict_t samples = nullptr;         /* Allocated on first use */
 
-double smpi_cpu_threshold;
+double smpi_cpu_threshold = -1;
 double smpi_host_speed;
 
 shared_malloc_type smpi_cfg_shared_malloc = shmalloc_global;
@@ -96,7 +91,7 @@ void smpi_execute(double duration)
 
 void smpi_bench_begin()
 {
-  if (smpi_privatize_global_variables) {
+  if (smpi_privatize_global_variables == SMPI_PRIVATIZE_MMAP) {
     smpi_switch_data_segment(smpi_process()->index());
   }