/* This shows how to extend the trace format by adding a new kind of events.
This function is registered through xbt_replay_action_register() below. */
-static void action_blah(simgrid::xbt::ReplayAction& args)
+static void action_blah(simgrid::xbt::ReplayAction& /*args*/)
{
/* Add your answer to the blah event here.
args is a strings array containing the blank-separated parameters found in the trace for this event instance. */
std::string container_name = instr_pid(actor.get());
actor->on_exit(
- [container_name](int status, void* actor) {
+ [container_name](int status, void*) {
if (status == SMX_EXIT_FAILURE)
// kill means that this actor no longer exists, let's destroy it
simgrid::instr::Container::by_name(container_name)->remove_from_parent();
#endif
}
-Context* ContextFactory::attach(void_pfn_smxprocess_t cleanup_func, smx_actor_t process)
+Context* ContextFactory::attach(void_pfn_smxprocess_t, smx_actor_t)
{
xbt_die("Cannot attach with this ContextFactory.\n"
"Try using --cfg=contexts/factory:thread instead.\n");
}
-Context* ContextFactory::create_maestro(std::function<void()> code, smx_actor_t process)
+Context* ContextFactory::create_maestro(std::function<void()>, smx_actor_t)
{
xbt_die("Cannot create_maestro with this ContextFactory.\n"
"Try using --cfg=contexts/factory:thread instead.\n");
*
* Delegates to the local/ptrace implementation.
*/
-int UnwindContext::find_proc_info(unw_addr_space_t as,
- unw_word_t ip, unw_proc_info_t *pip,
- int need_unwind_info, void* arg) noexcept
+int UnwindContext::find_proc_info(unw_addr_space_t /*as*/, unw_word_t ip, unw_proc_info_t* pip, int need_unwind_info,
+ void* arg) noexcept
{
simgrid::mc::UnwindContext* context = (simgrid::mc::UnwindContext*) arg;
return unw_get_accessors(context->process_->unw_underlying_addr_space)->find_proc_info(
*
* Delegates to the local/ptrace implementation.
*/
-void UnwindContext::put_unwind_info(unw_addr_space_t as,
- unw_proc_info_t *pip, void* arg) noexcept
+void UnwindContext::put_unwind_info(unw_addr_space_t /*as*/, unw_proc_info_t* pip, void* arg) noexcept
{
simgrid::mc::UnwindContext* context = (simgrid::mc::UnwindContext*) arg;
return unw_get_accessors(context->process_->unw_underlying_addr_space)->put_unwind_info(
*
* Not implemented.
*/
-int UnwindContext::get_dyn_info_list_addr(unw_addr_space_t as,
- unw_word_t *dilap, void* arg) noexcept
+int UnwindContext::get_dyn_info_list_addr(unw_addr_space_t /*as*/, unw_word_t* dilap, void* arg) noexcept
{
simgrid::mc::UnwindContext* context = (simgrid::mc::UnwindContext*) arg;
return unw_get_accessors(context->process_->unw_underlying_addr_space)->get_dyn_info_list_addr(
*
* Delegates to the `simgrid::mc::Process*`.
*/
-int UnwindContext::access_mem(unw_addr_space_t as,
- unw_word_t addr, unw_word_t *valp,
- int write, void* arg) noexcept
+int UnwindContext::access_mem(unw_addr_space_t /*as*/, unw_word_t addr, unw_word_t* valp, int write, void* arg) noexcept
{
simgrid::mc::UnwindContext* context = (simgrid::mc::UnwindContext*) arg;
if (write)
/** Read a standard register (libunwind method)
*/
-int UnwindContext::access_reg(unw_addr_space_t as,
- unw_regnum_t regnum, unw_word_t *valp,
- int write, void* arg) noexcept
+int UnwindContext::access_reg(unw_addr_space_t /*as*/, unw_regnum_t regnum, unw_word_t* valp, int write,
+ void* arg) noexcept
{
simgrid::mc::UnwindContext* as_context = (simgrid::mc::UnwindContext*) arg;
unw_context_t* context = &as_context->unwindContext_;
* `getcontext()` is not relevant for the caller. It is not really necessary
* to save and handle them.
*/
-int UnwindContext::access_fpreg(unw_addr_space_t as,
- unw_regnum_t regnum, unw_fpreg_t *fpvalp,
- int write, void* arg) noexcept
+int UnwindContext::access_fpreg(unw_addr_space_t /*as*/, unw_regnum_t /*regnum*/, unw_fpreg_t* /*fpvalp*/,
+ int /*write*/, void* /*arg*/) noexcept
{
return -UNW_EBADREG;
}
*
* We don't use this.
*/
-int UnwindContext::resume(unw_addr_space_t as,
- unw_cursor_t *cp, void* arg) noexcept
+int UnwindContext::resume(unw_addr_space_t /*as*/, unw_cursor_t* /*cp*/, void* /*arg*/) noexcept
{
return -UNW_EUNSPEC;
}
/** Find informations about a function (libunwind method)
*/
-int UnwindContext::get_proc_name(unw_addr_space_t as,
- unw_word_t addr, char *bufp,
- size_t buf_len, unw_word_t *offp,
- void* arg) noexcept
+int UnwindContext::get_proc_name(unw_addr_space_t /*as*/, unw_word_t addr, char* bufp, size_t buf_len, unw_word_t* offp,
+ void* arg) noexcept
{
simgrid::mc::UnwindContext* context = (simgrid::mc::UnwindContext*) arg;
simgrid::mc::Frame* frame = context->process_->find_function(remote(addr));
return instance_.get();
}
-void Client::handleDeadlockCheck(s_mc_message_t* msg)
+void Client::handleDeadlockCheck(s_mc_message_t*)
{
bool deadlock = false;
if (not simix_global->process_list.empty()) {
s_mc_message_int_t answer{MC_MESSAGE_DEADLOCK_CHECK_REPLY, deadlock};
xbt_assert(channel_.send(answer) == 0, "Could not send response");
}
-void Client::handleContinue(s_mc_message_t* msg)
+void Client::handleContinue(s_mc_message_t*)
{
/* Nothing to do */
}
}
}
-void Client::reportAssertionFailure(const char* description)
+void Client::reportAssertionFailure()
{
if (channel_.send(MC_MESSAGE_ASSERTION_FAILED))
xbt_die("Could not send assertion to model-checker");
Channel const& getChannel() const { return channel_; }
Channel& getChannel() { return channel_; }
void mainLoop();
- void reportAssertionFailure(const char* description = nullptr);
+ void reportAssertionFailure();
void ignoreMemory(void* addr, std::size_t size);
void ignoreHeap(void* addr, std::size_t size);
void unignoreHeap(void* addr, std::size_t size);
}
const void* RemoteClient::read_bytes(void* buffer, std::size_t size, RemotePtr<void> address, int process_index,
- ReadOptions options) const
+ ReadOptions /*options*/) const
{
#if HAVE_SMPI
if (process_index != simgrid::mc::ProcessIndexDisabled) {
return this;
}
-Exec* Exec::wait_for(double timeout)
+Exec* Exec::wait_for(double)
{
THROW_UNIMPLEMENTED;
return this;
return this;
}
-Io* Io::wait_for(double timeout)
+Io* Io::wait_for(double)
{
THROW_UNIMPLEMENTED;
return this;
class Instance {
public:
- Instance(const std::string name, int max_no_processes, int process_count, MPI_Comm comm,
- simgrid::s4u::Barrier* finalization_barrier)
+ Instance(const std::string name, int max_no_processes, MPI_Comm comm, simgrid::s4u::Barrier* finalization_barrier)
: name(name)
, size(max_no_processes)
, present_processes(0)
}
}
- Instance instance(std::string(name), num_processes, process_count, MPI_COMM_NULL,
- new simgrid::s4u::Barrier(num_processes));
+ Instance instance(std::string(name), num_processes, MPI_COMM_NULL, new simgrid::s4u::Barrier(num_processes));
MPI_Group group = new simgrid::smpi::Group(instance.size);
instance.comm_world = new simgrid::smpi::Comm(group, nullptr);
// FIXME : using MPI_Attr_put with MPI_UNIVERSE_SIZE is forbidden and we make it a no-op (which triggers a warning as MPI_ERR_ARG is returned).
}
};
-void WaitTestParser::parse(simgrid::xbt::ReplayAction& action, std::string name)
+void WaitTestParser::parse(simgrid::xbt::ReplayAction& action, std::string)
{
CHECK_ACTION_PARAMS(action, 3, 0)
src = std::stoi(action[2]);
tag = std::stoi(action[4]);
}
-void SendRecvParser::parse(simgrid::xbt::ReplayAction& action, std::string name)
+void SendRecvParser::parse(simgrid::xbt::ReplayAction& action, std::string)
{
CHECK_ACTION_PARAMS(action, 3, 1)
partner = std::stoi(action[2]);
datatype1 = simgrid::smpi::Datatype::decode(action[5]);
}
-void ComputeParser::parse(simgrid::xbt::ReplayAction& action, std::string name)
+void ComputeParser::parse(simgrid::xbt::ReplayAction& action, std::string)
{
CHECK_ACTION_PARAMS(action, 1, 0)
flops = parse_double(action[2]);
}
-void BcastArgParser::parse(simgrid::xbt::ReplayAction& action, std::string name)
+void BcastArgParser::parse(simgrid::xbt::ReplayAction& action, std::string)
{
CHECK_ACTION_PARAMS(action, 1, 2)
size = parse_double(action[2]);
datatype1 = simgrid::smpi::Datatype::decode(action[4]);
}
-void ReduceArgParser::parse(simgrid::xbt::ReplayAction& action, std::string name)
+void ReduceArgParser::parse(simgrid::xbt::ReplayAction& action, std::string)
{
CHECK_ACTION_PARAMS(action, 2, 2)
comm_size = parse_double(action[2]);
datatype1 = simgrid::smpi::Datatype::decode(action[5]);
}
-void AllReduceArgParser::parse(simgrid::xbt::ReplayAction& action, std::string name)
+void AllReduceArgParser::parse(simgrid::xbt::ReplayAction& action, std::string)
{
CHECK_ACTION_PARAMS(action, 2, 1)
comm_size = parse_double(action[2]);
datatype1 = simgrid::smpi::Datatype::decode(action[4]);
}
-void AllToAllArgParser::parse(simgrid::xbt::ReplayAction& action, std::string name)
+void AllToAllArgParser::parse(simgrid::xbt::ReplayAction& action, std::string)
{
CHECK_ACTION_PARAMS(action, 2, 1)
comm_size = MPI_COMM_WORLD->size();
recv_size_sum = std::accumulate(recvcounts->begin(), recvcounts->end(), 0);
}
-void ScatterArgParser::parse(simgrid::xbt::ReplayAction& action, std::string name)
+void ScatterArgParser::parse(simgrid::xbt::ReplayAction& action, std::string)
{
/* The structure of the scatter action for the rank 0 (total 4 processes) is the following:
0 gather 68 68 0 0 0
datatype2 = simgrid::smpi::Datatype::decode(action[6]);
}
-void ScatterVArgParser::parse(simgrid::xbt::ReplayAction& action, std::string name)
+void ScatterVArgParser::parse(simgrid::xbt::ReplayAction& action, std::string)
{
/* The structure of the scatterv action for the rank 0 (total 4 processes) is the following:
0 gather 68 10 10 10 68 0 0 0
root = (action.size() > 3 + comm_size) ? std::stoi(action[3 + comm_size]) : 0;
}
-void ReduceScatterArgParser::parse(simgrid::xbt::ReplayAction& action, std::string name)
+void ReduceScatterArgParser::parse(simgrid::xbt::ReplayAction& action, std::string)
{
/* The structure of the reducescatter action for the rank 0 (total 4 processes) is the following:
0 reducescatter 275427 275427 275427 204020 11346849 0
recv_size_sum = std::accumulate(recvcounts->begin(), recvcounts->end(), 0);
}
-void AllToAllVArgParser::parse(simgrid::xbt::ReplayAction& action, std::string name)
+void AllToAllVArgParser::parse(simgrid::xbt::ReplayAction& action, std::string)
{
/* The structure of the alltoallv action for the rank 0 (total 4 processes) is the following:
0 alltoallv 100 1 7 10 12 100 1 70 10 5
TRACE_smpi_recv(args.src, args.dst, args.tag);
}
-void SendAction::kernel(simgrid::xbt::ReplayAction& action)
+void SendAction::kernel(simgrid::xbt::ReplayAction&)
{
int dst_traced = MPI_COMM_WORLD->group()->actor(args.partner)->get_pid();
TRACE_smpi_comm_out(my_proc_id);
}
-void RecvAction::kernel(simgrid::xbt::ReplayAction& action)
+void RecvAction::kernel(simgrid::xbt::ReplayAction&)
{
TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::Pt2PtTIData(name, args.partner, args.size,
args.tag, Datatype::encode(args.datatype1)));
}
}
-void ComputeAction::kernel(simgrid::xbt::ReplayAction& action)
+void ComputeAction::kernel(simgrid::xbt::ReplayAction&)
{
TRACE_smpi_computing_in(my_proc_id, args.flops);
smpi_execute_flops(args.flops);
TRACE_smpi_computing_out(my_proc_id);
}
-void TestAction::kernel(simgrid::xbt::ReplayAction& action)
+void TestAction::kernel(simgrid::xbt::ReplayAction&)
{
MPI_Request request = req_storage.find(args.src, args.dst, args.tag);
req_storage.remove(request);
smpi_process()->simulated_start();
}
-void CommunicatorAction::kernel(simgrid::xbt::ReplayAction& action)
+void CommunicatorAction::kernel(simgrid::xbt::ReplayAction&)
{
/* nothing to do */
}
-void WaitAllAction::kernel(simgrid::xbt::ReplayAction& action)
+void WaitAllAction::kernel(simgrid::xbt::ReplayAction&)
{
const unsigned int count_requests = req_storage.size();
}
}
-void BarrierAction::kernel(simgrid::xbt::ReplayAction& action)
+void BarrierAction::kernel(simgrid::xbt::ReplayAction&)
{
TRACE_smpi_comm_in(my_proc_id, __func__, new simgrid::instr::NoOpTIData("barrier"));
Colls::barrier(MPI_COMM_WORLD);
TRACE_smpi_comm_out(my_proc_id);
}
-void BcastAction::kernel(simgrid::xbt::ReplayAction& action)
+void BcastAction::kernel(simgrid::xbt::ReplayAction&)
{
TRACE_smpi_comm_in(my_proc_id, "action_bcast",
new simgrid::instr::CollTIData("bcast", MPI_COMM_WORLD->group()->actor(args.root)->get_pid(),
TRACE_smpi_comm_out(my_proc_id);
}
-void ReduceAction::kernel(simgrid::xbt::ReplayAction& action)
+void ReduceAction::kernel(simgrid::xbt::ReplayAction&)
{
TRACE_smpi_comm_in(my_proc_id, "action_reduce",
new simgrid::instr::CollTIData("reduce", MPI_COMM_WORLD->group()->actor(args.root)->get_pid(),
TRACE_smpi_comm_out(my_proc_id);
}
-void AllReduceAction::kernel(simgrid::xbt::ReplayAction& action)
+void AllReduceAction::kernel(simgrid::xbt::ReplayAction&)
{
TRACE_smpi_comm_in(my_proc_id, "action_allreduce", new simgrid::instr::CollTIData("allreduce", -1, args.comp_size, args.comm_size, -1,
Datatype::encode(args.datatype1), ""));
TRACE_smpi_comm_out(my_proc_id);
}
-void AllToAllAction::kernel(simgrid::xbt::ReplayAction& action)
+void AllToAllAction::kernel(simgrid::xbt::ReplayAction&)
{
TRACE_smpi_comm_in(my_proc_id, "action_alltoall",
new simgrid::instr::CollTIData("alltoall", -1, -1.0, args.send_size, args.recv_size,
TRACE_smpi_comm_out(my_proc_id);
}
-void GatherAction::kernel(simgrid::xbt::ReplayAction& action)
+void GatherAction::kernel(simgrid::xbt::ReplayAction&)
{
TRACE_smpi_comm_in(my_proc_id, name.c_str(), new simgrid::instr::CollTIData(name, (name == "gather") ? args.root : -1, -1.0, args.send_size, args.recv_size,
Datatype::encode(args.datatype1), Datatype::encode(args.datatype2)));
TRACE_smpi_comm_out(my_proc_id);
}
-void GatherVAction::kernel(simgrid::xbt::ReplayAction& action)
+void GatherVAction::kernel(simgrid::xbt::ReplayAction&)
{
int rank = MPI_COMM_WORLD->rank();
TRACE_smpi_comm_out(my_proc_id);
}
-void ScatterAction::kernel(simgrid::xbt::ReplayAction& action)
+void ScatterAction::kernel(simgrid::xbt::ReplayAction&)
{
int rank = MPI_COMM_WORLD->rank();
TRACE_smpi_comm_in(my_proc_id, "action_scatter", new simgrid::instr::CollTIData(name, args.root, -1.0, args.send_size, args.recv_size,
TRACE_smpi_comm_out(my_proc_id);
}
-void ScatterVAction::kernel(simgrid::xbt::ReplayAction& action)
+void ScatterVAction::kernel(simgrid::xbt::ReplayAction&)
{
int rank = MPI_COMM_WORLD->rank();
TRACE_smpi_comm_in(my_proc_id, "action_scatterv", new simgrid::instr::VarCollTIData(name, args.root, -1, args.sendcounts, args.recv_size,
TRACE_smpi_comm_out(my_proc_id);
}
-void ReduceScatterAction::kernel(simgrid::xbt::ReplayAction& action)
+void ReduceScatterAction::kernel(simgrid::xbt::ReplayAction&)
{
TRACE_smpi_comm_in(my_proc_id, "action_reducescatter",
new simgrid::instr::VarCollTIData("reducescatter", -1, 0, nullptr, -1, args.recvcounts,
TRACE_smpi_comm_out(my_proc_id);
}
-void AllToAllVAction::kernel(simgrid::xbt::ReplayAction& action)
+void AllToAllVAction::kernel(simgrid::xbt::ReplayAction&)
{
TRACE_smpi_comm_in(my_proc_id, __func__,
new simgrid::instr::VarCollTIData(
TRACE_smpi_comm_in(my_proc_id, "smpi_replay_run_init", new simgrid::instr::NoOpTIData("init"));
TRACE_smpi_comm_out(my_proc_id);
xbt_replay_action_register("init", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::InitAction().execute(action); });
- xbt_replay_action_register("finalize", [](simgrid::xbt::ReplayAction& action) { /* nothing to do */ });
+ xbt_replay_action_register("finalize", [](simgrid::xbt::ReplayAction&) { /* nothing to do */ });
xbt_replay_action_register("comm_size", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::CommunicatorAction().execute(action); });
xbt_replay_action_register("comm_split",[](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::CommunicatorAction().execute(action); });
xbt_replay_action_register("comm_dup", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::CommunicatorAction().execute(action); });
memcpy(b, a, *length * (*datatype)->size());
}
-static void no_func(void *a, void *b, int *length, MPI_Datatype * datatype)
+static void no_func(void*, void*, int*, MPI_Datatype*)
{
/* obviously a no-op */
}
}
}
-int Request::match_recv(void* a, void* b, simgrid::kernel::activity::CommImpl* ignored)
+int Request::match_recv(void* a, void* b, simgrid::kernel::activity::CommImpl*)
{
MPI_Request ref = static_cast<MPI_Request>(a);
MPI_Request req = static_cast<MPI_Request>(b);
}else return 0;
}
-int Request::match_send(void* a, void* b, simgrid::kernel::activity::CommImpl* ignored)
+int Request::match_send(void* a, void* b, simgrid::kernel::activity::CommImpl*)
{
MPI_Request ref = static_cast<MPI_Request>(a);
MPI_Request req = static_cast<MPI_Request>(b);
class MigrateParser : public simgrid::smpi::replay::ActionArgParser {
public:
double memory_consumption;
- void parse(simgrid::xbt::ReplayAction& action, std::string name)
+ void parse(simgrid::xbt::ReplayAction& action, std::string)
{
// The only parameter is the amount of memory used by the current process.
CHECK_ACTION_PARAMS(action, 1, 0);
class MigrateAction : public simgrid::smpi::replay::ReplayAction<simgrid::smpi::plugin::MigrateParser> {
public:
explicit MigrateAction() : ReplayAction("Migrate") {}
- void kernel(simgrid::xbt::ReplayAction& action)
+ void kernel(simgrid::xbt::ReplayAction&)
{
static std::map<simgrid::s4u::ActorPtr, int> migration_call_counter;
static simgrid::s4u::Barrier smpilb_bar(smpi_process_count());
{"Full", "Full update of remaining and variables. Slow but may be useful when debugging."},
}),
- [](std::string const& val) {
+ [](std::string const&) {
xbt_assert(_sg_cfg_init_status < 2,
"Cannot change the optimization algorithm after the initialization");
});
}
}
-void CpuModel::update_actions_state_full(double now, double delta)
+void CpuModel::update_actions_state_full(double /*now*/, double delta)
{
for (auto it = std::begin(*get_started_action_set()); it != std::end(*get_started_action_set());) {
CpuAction& action = static_cast<CpuAction&>(*it);
bool is_used() override;
CpuAction *execution_start(double size) override;
- kernel::resource::Action* execution_start(double size, int requested_cores) override
+ kernel::resource::Action* execution_start(double, int) override
{
THROW_UNIMPLEMENTED;
return nullptr;
all_existing_models.push_back(this);
}
-LinkImpl* NetworkConstantModel::create_link(const std::string& name, double bw, double lat,
- s4u::Link::SharingPolicy policy)
+LinkImpl* NetworkConstantModel::create_link(const std::string& name, double, double, s4u::Link::SharingPolicy)
{
xbt_die("Refusing to create the link %s: there is no link in the Constant network model. "
}
}
-kernel::resource::Action* NetworkConstantModel::communicate(s4u::Host* src, s4u::Host* dst, double size, double rate)
+kernel::resource::Action* NetworkConstantModel::communicate(s4u::Host* src, s4u::Host* dst, double size, double)
{
NetworkConstantAction* action = new NetworkConstantAction(this, size, sg_latency_factor);
bool is_used() override;
void apply_event(kernel::profile::Event* event, double value) override;
kernel::resource::Action* execution_start(double size) override;
- kernel::resource::Action* execution_start(double size, int requested_cores) override
+ kernel::resource::Action* execution_start(double, int) override
{
THROW_UNIMPLEMENTED;
return nullptr;