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
Merge branch 'master' of github.com:simgrid/simgrid
[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
7f8dd61
..
21fe974
100644
(file)
--- a/
src/smpi/internals/smpi_bench.cpp
+++ b/
src/smpi/internals/smpi_bench.cpp
@@
-6,9
+6,10
@@
#include "private.hpp"
#include "simgrid/modelchecker.h"
#include "smpi_comm.hpp"
#include "private.hpp"
#include "simgrid/modelchecker.h"
#include "smpi_comm.hpp"
+#include "simgrid/host.h"
#include "smpi_process.hpp"
#include "src/internal_config.h"
#include "smpi_process.hpp"
#include "src/internal_config.h"
-#include "src/mc/mc_replay.h"
+#include "src/mc/mc_replay.h
pp
"
#include <unordered_map>
#ifndef WIN32
#include <unordered_map>
#ifndef WIN32
@@
-54,10
+55,7
@@
void smpi_execute(double duration)
XBT_DEBUG("Sleep for %g to handle real computation time", duration);
double flops = duration * smpi_host_speed;
int rank = smpi_process()->index();
XBT_DEBUG("Sleep for %g to handle real computation time", duration);
double flops = duration * smpi_host_speed;
int rank = smpi_process()->index();
- instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
- extra->type=TRACING_COMPUTING;
- extra->comp_size=flops;
- TRACE_smpi_computing_in(rank, extra);
+ TRACE_smpi_computing_in(rank, flops);
smpi_execute_flops(flops);
smpi_execute_flops(flops);
@@
-72,7
+70,8
@@
void smpi_execute(double duration)
void smpi_execute_benched(double duration)
{
smpi_bench_end();
void smpi_execute_benched(double duration)
{
smpi_bench_end();
- smpi_execute(duration);
+ double speed = sg_host_speed(sg_host_self());
+ smpi_execute_flops(duration*speed);
smpi_bench_begin();
}
smpi_bench_begin();
}
@@
-156,7
+155,8
@@
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()) {
- container_t container = new simgrid::instr::Container(smpi_container(smpi_process()->index()));
+ container_t container =
+ new simgrid::instr::Container(std::string("rank-") + std::to_string(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) {
@@
-176,10
+176,7
@@
static unsigned int private_sleep(double secs)
XBT_DEBUG("Sleep for: %lf secs", secs);
int rank = MPI_COMM_WORLD->rank();
XBT_DEBUG("Sleep for: %lf secs", secs);
int rank = MPI_COMM_WORLD->rank();
- instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
- extra->type=TRACING_SLEEPING;
- extra->sleep_duration=secs;
- TRACE_smpi_sleeping_in(rank, extra);
+ TRACE_smpi_sleeping_in(rank, secs);
simcall_process_sleep(secs);
simcall_process_sleep(secs);