This will still not build, but it is simpler to to see the changes with smaller commits
#include <smpi/sampi.h>
#include <src/smpi/include/smpi_comm.hpp>
#include <src/smpi/include/smpi_actor.hpp>
+#include <src/smpi/plugins/ampi/instr_ampi.hpp>
+#include <src/instr/instr_smpi.hpp>
#include <xbt/replay.hpp>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(plugin_pampi, smpi, "Logging specific to the AMPI functions");
__libc_free(ptr);
}
+namespace simgrid {
+namespace smpi {
+namespace plugin {
+namespace ampi {
+ simgrid::xbt::signal<void(simgrid::s4u::ActorPtr)> on_iteration_in;
+ simgrid::xbt::signal<void(simgrid::s4u::ActorPtr)> on_iteration_out;
+}
+}
+}
+}
+
/* FIXME The following contains several times "rank() + 1". This works for one
* instance, but we need to find a way to deal with this for several instances and
* for daemons: If we just replace this with the process id, we will get id's that
--- /dev/null
+/* Copyright (c) 2010-2018. The SimGrid Team. All rights reserved. */
+
+/* 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 <simgrid/s4u.hpp>
+
+namespace simgrid {
+namespace smpi {
+namespace plugin {
+namespace ampi {
+ extern simgrid::xbt::signal<void(simgrid::s4u::ActorPtr)> on_iteration_out;
+ extern simgrid::xbt::signal<void(simgrid::s4u::ActorPtr)> on_iteration_in;
+}
+}
+}
+}
+
#include <smpi/smpi.h>
#include <src/smpi/include/smpi_comm.hpp>
#include <src/smpi/include/smpi_actor.hpp>
+#include <src/smpi/plugins/ampi/instr_ampi.hpp>
+#include <src/smpi/plugins/ampi/ampi.hpp>
#include <xbt/replay.hpp>
#include "src/kernel/activity/ExecImpl.hpp"
{
CHECK_ACTION_PARAMS(action, 0, 0)
TRACE_Iteration_in(simgrid::s4u::this_actor::get_pid(), nullptr);
+ simgrid::smpi::plugin::ampi::on_iteration_in(MPI_COMM_WORLD->group()->actor(std::stol(action[0])));
}
-// FIXME Move declaration
XBT_PRIVATE void action_iteration_out(simgrid::xbt::ReplayAction& action);
void action_iteration_out(simgrid::xbt::ReplayAction& action)
{
CHECK_ACTION_PARAMS(action, 0, 0)
TRACE_Iteration_out(simgrid::s4u::this_actor::get_pid(), nullptr);
+ simgrid::smpi::plugin::ampi::on_iteration_out(MPI_COMM_WORLD->group()->actor(std::stol(action[0])));
}
}
}