#include "src/msg/msg_private.hpp"
#include "src/simix/smx_private.hpp"
+#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)");
namespace simgrid{
MC_ignore_heap(timer_, xbt_os_timer_size());
#if HAVE_PAPI
- if (simgrid::config::get_value<std::string>("smpi/papi-events")[0] != '\0') {
+ if (not simgrid::config::get_value<std::string>("smpi/papi-events").empty()) {
// TODO: Implement host/process/thread based counters. This implementation
// just always takes the values passed via "default", like this:
// "default:COUNTER1:COUNTER2:COUNTER3;".
if (it != units2papi_setup.end()) {
papi_event_set_ = it->second.event_set;
papi_counter_data_ = it->second.counter_data;
- XBT_DEBUG("Setting PAPI set for process %i", i);
+ XBT_DEBUG("Setting PAPI set for process %li", actor->get_pid());
} else {
papi_event_set_ = PAPI_NULL;
- XBT_DEBUG("No PAPI set for process %i", i);
+ XBT_DEBUG("No PAPI set for process %li", actor->get_pid());
}
}
#endif
finalization_barrier_ = barrier;
actor_ = simgrid::s4u::Actor::self();
- static_cast<simgrid::msg::ActorExt*>(actor_->get_impl()->getUserData())->data = this;
+ static_cast<simgrid::msg::ActorExt*>(actor_->get_impl()->get_user_data())->data = this;
if (*argc > 3) {
memmove(&(*argv)[0], &(*argv)[2], sizeof(char*) * (*argc - 2));
}
if (argc != nullptr && argv != nullptr) {
simgrid::s4u::ActorPtr proc = simgrid::s4u::Actor::self();
- proc->get_impl()->context->set_cleanup(&MSG_process_cleanup_from_SIMIX);
+ proc->get_impl()->context_->set_cleanup(&MSG_process_cleanup_from_SIMIX);
char* instance_id = (*argv)[1];
try {
// cheinrich: I'm not sure what the impact of the SMPI_switch_data_segment on this call is. I moved
// this up here so that I can set the privatized region before the switch.
Process* process = smpi_process_remote(proc);
- if (smpi_privatize_global_variables == SmpiPrivStrategies::Mmap) {
+ if (smpi_privatize_global_variables == SmpiPrivStrategies::MMAP) {
/* Now using the segment index of this process */
process->set_privatized_region(smpi_init_global_memory_segment_process());
/* Done at the process's creation */