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 'trace_smpi_execute_flops' into 'master'
[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
ac32fa2
..
9b89d24
100644
(file)
--- a/
src/smpi/internals/smpi_bench.cpp
+++ b/
src/smpi/internals/smpi_bench.cpp
@@
-38,7
+38,8
@@
double smpi_host_speed;
SharedMallocType smpi_cfg_shared_malloc = SharedMallocType::GLOBAL;
double smpi_total_benched_time = 0;
SharedMallocType smpi_cfg_shared_malloc = SharedMallocType::GLOBAL;
double smpi_total_benched_time = 0;
-void smpi_execute_flops(double flops) {
+// Private execute_flops used by smpi_execute and spmi_execute_benched
+void private_execute_flops(double flops) {
xbt_assert(flops >= 0, "You're trying to execute a negative amount of flops (%f)!", flops);
XBT_DEBUG("Handle real computation time: %f flops", flops);
simgrid::s4u::this_actor::exec_init(flops)
xbt_assert(flops >= 0, "You're trying to execute a negative amount of flops (%f)!", flops);
XBT_DEBUG("Handle real computation time: %f flops", flops);
simgrid::s4u::this_actor::exec_init(flops)
@@
-49,6
+50,15
@@
void smpi_execute_flops(double flops) {
smpi_switch_data_segment(simgrid::s4u::Actor::self());
}
smpi_switch_data_segment(simgrid::s4u::Actor::self());
}
+void smpi_execute_flops(double flops) {
+ int rank = simgrid::s4u::this_actor::get_pid();
+ TRACE_smpi_computing_in(rank, flops);
+
+ private_execute_flops(flops);
+
+ TRACE_smpi_computing_out(rank);
+}
+
void smpi_execute(double duration)
{
if (duration >= smpi_cpu_threshold) {
void smpi_execute(double duration)
{
if (duration >= smpi_cpu_threshold) {
@@
-57,7
+67,7
@@
void smpi_execute(double duration)
int rank = simgrid::s4u::this_actor::get_pid();
TRACE_smpi_computing_in(rank, flops);
int rank = simgrid::s4u::this_actor::get_pid();
TRACE_smpi_computing_in(rank, flops);
-
smpi
_execute_flops(flops);
+
private
_execute_flops(flops);
TRACE_smpi_computing_out(rank);
TRACE_smpi_computing_out(rank);