X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9bf049cea1d0bdabc36c9ffbb69ded21bf462ce4..838f47a13991d9f04fc4682b790688147b569132:/src/smpi/smpi_bench.cpp diff --git a/src/smpi/smpi_bench.cpp b/src/smpi/smpi_bench.cpp index a284bb180e..194208744d 100644 --- a/src/smpi/smpi_bench.cpp +++ b/src/smpi/smpi_bench.cpp @@ -3,34 +3,18 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include - -#include -#include - #include "src/internal_config.h" #include "private.h" #include "private.hpp" -#include -#include "xbt/dict.h" -#include "xbt/sysdep.h" -#include "xbt/ex.h" -#include "surf/surf.h" -#include "simgrid/sg_config.h" #include "simgrid/modelchecker.h" #include "src/mc/mc_replay.h" +#include "src/smpi/smpi_process.hpp" +#include "src/smpi/smpi_comm.hpp" -#include #ifndef WIN32 #include #endif -#include -#include -#include #include // sqrt -#include -#include -#include #if HAVE_PAPI #include @@ -41,7 +25,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; @@ -94,9 +78,16 @@ void smpi_execute(double duration) } } +void smpi_execute_public(double duration) +{ + smpi_bench_end(); + smpi_execute(duration); + smpi_bench_begin(); +} + void smpi_bench_begin() { - if (smpi_privatize_global_variables) { + if (smpi_privatize_global_variables == SMPI_PRIVATIZE_MMAP) { smpi_switch_data_segment(smpi_process()->index()); }