X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/582b1300f2920ab088233dbd6ab9f382f2d2026a..31240e831c7cf5bc0769e411ab74018c2add3262:/src/smpi/internals/smpi_bench.cpp diff --git a/src/smpi/internals/smpi_bench.cpp b/src/smpi/internals/smpi_bench.cpp index 7e05e7afcb..4aa873a1f4 100644 --- a/src/smpi/internals/smpi_bench.cpp +++ b/src/smpi/internals/smpi_bench.cpp @@ -102,12 +102,10 @@ void smpi_bench_begin() if (not simgrid::config::get_value("smpi/papi-events").empty()) { int event_set = smpi_process()->papi_event_set(); // PAPI_start sets everything to 0! See man(3) PAPI_start - if (PAPI_LOW_LEVEL_INITED == PAPI_is_initialized()) { - if (PAPI_start(event_set) != PAPI_OK) { - // TODO This needs some proper handling. - XBT_CRITICAL("Could not start PAPI counters.\n"); - xbt_die("Error."); - } + if (PAPI_LOW_LEVEL_INITED == PAPI_is_initialized() && PAPI_start(event_set) != PAPI_OK) { + // TODO This needs some proper handling. + XBT_CRITICAL("Could not start PAPI counters.\n"); + xbt_die("Error."); } } #endif