A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stringify (a lot)
[simgrid.git]
/
src
/
smpi
/
internals
/
smpi_bench.cpp
diff --git
a/src/smpi/internals/smpi_bench.cpp
b/src/smpi/internals/smpi_bench.cpp
index
5b05ac5
..
7f8dd61
100644
(file)
--- a/
src/smpi/internals/smpi_bench.cpp
+++ b/
src/smpi/internals/smpi_bench.cpp
@@
-3,7
+3,6
@@
/* 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. */
/* 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 "private.h"
#include "private.hpp"
#include "simgrid/modelchecker.h"
#include "smpi_comm.hpp"
#include "private.hpp"
#include "simgrid/modelchecker.h"
#include "smpi_comm.hpp"
@@
-28,7
+27,6
@@
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_privatization_region_t smpi_privatization_regions;
extern "C" XBT_PUBLIC(void) smpi_execute_flops_(double *flops);
void smpi_execute_flops_(double *flops)
extern "C" XBT_PUBLIC(void) smpi_execute_flops_(double *flops);
void smpi_execute_flops_(double *flops)
@@
-88,7
+86,7
@@
void smpi_bench_begin()
return;
#if HAVE_PAPI
return;
#if HAVE_PAPI
- if (
xbt_cfg_get_string("smpi/papi-events")[0] != '\0'
) {
+ if (
not xbt_cfg_get_string("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()) {
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()) {
@@
-128,8
+126,6
@@
void smpi_bench_end()
} else {
for (unsigned int i = 0; i < counter_data.size(); i++) {
counter_data[i].second += event_values[i];
} else {
for (unsigned int i = 0; i < counter_data.size(); i++) {
counter_data[i].second += event_values[i];
- // XBT_DEBUG("[%i] PAPI: Counter %s: Value is now %lli (got increment by %lli\n", smpi_process()->index(),
- // counter_data[i].first.c_str(), counter_data[i].second, event_values[i]);
}
}
}
}
}
}
@@
-160,14
+156,12
@@
void smpi_bench_end()
#if HAVE_PAPI
if (xbt_cfg_get_string("smpi/papi-events")[0] != '\0' && TRACE_smpi_is_enabled()) {
#if HAVE_PAPI
if (xbt_cfg_get_string("smpi/papi-events")[0] != '\0' && TRACE_smpi_is_enabled()) {
- char container_name[INSTR_DEFAULT_STR_SIZE];
- smpi_container(smpi_process()->index(), container_name, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get(container_name);
+ container_t container = new simgrid::instr::Container(smpi_container(smpi_process()->index()));
papi_counter_t& counter_data = smpi_process()->papi_counters();
for (auto const& pair : counter_data) {
papi_counter_t& counter_data = smpi_process()->papi_counters();
for (auto const& pair : counter_data) {
- new
_pajeSetVariable(surf_get_clock(), container,
-
PJ_type_get(/* countername */ pair.first.c_str(), container->type), pair.second);
+ new
simgrid::instr::SetVariableEvent(
+
surf_get_clock(), container,
PJ_type_get(/* countername */ pair.first.c_str(), container->type), pair.second);
}
}
#endif
}
}
#endif
@@
-206,13
+200,13
@@
int smpi_usleep(useconds_t usecs)
}
#if _POSIX_TIMERS > 0
}
#if _POSIX_TIMERS > 0
-int smpi_nanosleep(const struct timespec
*tp, struct timespec * t
)
+int smpi_nanosleep(const struct timespec
* tp, struct timespec* /*t*/
)
{
return static_cast<int>(private_sleep(static_cast<double>(tp->tv_sec + tp->tv_nsec / 1000000000.0)));
}
#endif
{
return static_cast<int>(private_sleep(static_cast<double>(tp->tv_sec + tp->tv_nsec / 1000000000.0)));
}
#endif
-int smpi_gettimeofday(struct timeval
*tv, void* tz
)
+int smpi_gettimeofday(struct timeval
* tv, void* /*tz*/
)
{
smpi_bench_end();
double now = SIMIX_get_clock();
{
smpi_bench_end();
double now = SIMIX_get_clock();
@@
-229,7
+223,7
@@
int smpi_gettimeofday(struct timeval *tv, void* tz)
}
#if _POSIX_TIMERS > 0
}
#if _POSIX_TIMERS > 0
-int smpi_clock_gettime(clockid_t
clk_id, struct timespec *
tp)
+int smpi_clock_gettime(clockid_t
/*clk_id*/, struct timespec*
tp)
{
//there is only one time in SMPI, so clk_id is ignored.
smpi_bench_end();
{
//there is only one time in SMPI, so clk_id is ignored.
smpi_bench_end();