/* 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 "SmpiHost.hpp"
+#include "smpi_host.hpp"
#include "mc/mc.h"
#include "simgrid/s4u/Engine.hpp"
#include "smpi_coll.hpp"
ActorPtr me = Actor::self();
if (me == nullptr) // This happens sometimes (eg, when linking against NS3 because it pulls openMPI...)
return nullptr;
- simgrid::msg::ActorExt* msgExt = static_cast<simgrid::msg::ActorExt*>(me->get_impl()->userdata);
+ simgrid::msg::ActorExt* msgExt = static_cast<simgrid::msg::ActorExt*>(me->get_impl()->getUserData());
return static_cast<simgrid::smpi::Process*>(msgExt->data);
}
}
#endif
- if (smpi_cpu_threshold < 0)
- smpi_cpu_threshold = DBL_MAX;
-
- std::string val = simgrid::config::get_value<std::string>("smpi/shared-malloc");
- if ((val == "yes") || (val == "1") || (val == "on") || (val == "global")) {
- smpi_cfg_shared_malloc = shmalloc_global;
- } else if (val == "local") {
- smpi_cfg_shared_malloc = shmalloc_local;
- } else if ((val == "no") || (val == "0") || (val == "off")) {
- smpi_cfg_shared_malloc = shmalloc_none;
- } else {
- xbt_die("Invalid value '%s' for option smpi/shared-malloc. Possible values: 'on' or 'global', 'local', 'off'",
- val.c_str());
- }
+ if (smpi_cpu_threshold < 0)
+ smpi_cpu_threshold = DBL_MAX;
+
+ std::string val = simgrid::config::get_value<std::string>("smpi/shared-malloc");
+ if ((val == "yes") || (val == "1") || (val == "on") || (val == "global")) {
+ smpi_cfg_shared_malloc = shmalloc_global;
+ } else if (val == "local") {
+ smpi_cfg_shared_malloc = shmalloc_local;
+ } else if ((val == "no") || (val == "0") || (val == "off")) {
+ smpi_cfg_shared_malloc = shmalloc_none;
+ } else {
+ xbt_die("Invalid value '%s' for option smpi/shared-malloc. Possible values: 'on' or 'global', 'local', 'off'",
+ val.c_str());
+ }
}
typedef std::function<int(int argc, char *argv[])> smpi_entry_point_type;
// TODO This will not be executed in the case where smpi_main is not called,
// e.g., not for smpi_msg_masterslave. This should be moved to another location
// that is always called -- maybe close to Actor::onCreation?
- simgrid::s4u::Host::onCreation.connect([](simgrid::s4u::Host& host) {
- host.extension_set(new simgrid::smpi::SmpiHost(&host));
- });
+ simgrid::s4u::Host::on_creation.connect(
+ [](simgrid::s4u::Host& host) { host.extension_set(new simgrid::smpi::Host(&host)); });
// parse the platform file: get the host list
SIMIX_create_environment(argv[1]);
}
smpi_global_destroy();
- TRACE_end();
-
return smpi_exit_status;
}
smpi_init_options();
smpi_global_init();
smpi_check_options();
- simgrid::s4u::onSimulationEnd.connect(TRACE_smpi_release);
+ simgrid::s4u::on_simulation_end.connect(TRACE_smpi_release);
}
void SMPI_finalize(){