-/* Copyright (c) 2009-2020. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2009-2021. 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. */
#if HAVE_PAPI
#include "papi.h"
-extern std::string papi_default_config_name;
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_process, smpi, "Logging specific to SMPI (kernel)");
// TODO: Implement host/process/thread based counters. This implementation
// just always takes the values passed via "default", like this:
// "default:COUNTER1:COUNTER2:COUNTER3;".
- auto it = units2papi_setup.find(papi_default_config_name);
+ auto it = units2papi_setup.find("default");
if (it != units2papi_setup.end()) {
papi_event_set_ = it->second.event_set;
papi_counter_data_ = it->second.counter_data;
ActorExt::~ActorExt()
{
- if (info_env_ != MPI_INFO_NULL)
- simgrid::smpi::Info::unref(info_env_);
- if (comm_self_ != MPI_COMM_NULL)
- simgrid::smpi::Comm::destroy(comm_self_);
- if (comm_intra_ != MPI_COMM_NULL)
- simgrid::smpi::Comm::destroy(comm_intra_);
xbt_os_timer_free(timer_);
}
{
state_ = SmpiProcessState::FINALIZED;
XBT_DEBUG("<%ld> Process left the game", actor_->get_pid());
-
+ if (info_env_ != MPI_INFO_NULL)
+ simgrid::smpi::Info::unref(info_env_);
+ if (comm_self_ != MPI_COMM_NULL)
+ simgrid::smpi::Comm::destroy(comm_self_);
+ if (comm_intra_ != MPI_COMM_NULL)
+ simgrid::smpi::Comm::destroy(comm_intra_);
smpi_deployment_unregister_process(instance_id_);
}
MPI_Comm ActorExt::comm_self()
{
if (comm_self_ == MPI_COMM_NULL) {
- MPI_Group group = new Group(1);
- comm_self_ = new Comm(group, nullptr);
+ auto* group = new Group(1);
+ comm_self_ = new Comm(group, nullptr);
group->set_mapping(actor_, 0);
}
return comm_self_;