namespace simgrid {
namespace smpi {
-class SmpiHost {
+class Host {
private:
std::vector<s_smpi_factor_t> orecv_parsed_values;
simgrid::s4u::Host *host = nullptr;
public:
- static simgrid::xbt::Extension<simgrid::s4u::Host, SmpiHost> EXTENSION_ID;
+ static simgrid::xbt::Extension<simgrid::s4u::Host, Host> EXTENSION_ID;
- explicit SmpiHost(simgrid::s4u::Host *ptr);
- ~SmpiHost();
+ explicit Host(simgrid::s4u::Host *ptr);
+ ~Host();
double orecv(size_t size);
double osend(size_t size);
/* 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 "private.hpp"
#include "simgrid/msg.h" /* barrier */
#include "simgrid/s4u/Engine.hpp"
already_called = 1;
std::vector<simgrid::s4u::Host*> list = simgrid::s4u::Engine::get_instance()->get_all_hosts();
for (auto const& host : list) {
- host->extension_set(new simgrid::smpi::SmpiHost(host));
+ host->extension_set(new simgrid::smpi::Host(host));
}
}
/* 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"
// 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));
+ host.extension_set(new simgrid::smpi::Host(&host));
});
// parse the platform file: get the host list
/* 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 "simgrid/s4u/VirtualMachine.hpp"
#include "smpi_utils.hpp"
#include "xbt/config.hpp"
namespace simgrid {
namespace smpi {
-simgrid::xbt::Extension<simgrid::s4u::Host, SmpiHost> SmpiHost::EXTENSION_ID;
+simgrid::xbt::Extension<simgrid::s4u::Host, Host> Host::EXTENSION_ID;
-double SmpiHost::orecv(size_t size)
+double Host::orecv(size_t size)
{
double current = orecv_parsed_values.empty() ? 0.0 : orecv_parsed_values.front().values[0] +
orecv_parsed_values.front().values[1] * size;
return current;
}
-double SmpiHost::osend(size_t size)
+double Host::osend(size_t size)
{
double current =
osend_parsed_values.empty() ? 0.0 : osend_parsed_values[0].values[0] + osend_parsed_values[0].values[1] * size;
return current;
}
-double SmpiHost::oisend(size_t size)
+double Host::oisend(size_t size)
{
double current =
oisend_parsed_values.empty() ? 0.0 : oisend_parsed_values[0].values[0] + oisend_parsed_values[0].values[1] * size;
return current;
}
-SmpiHost::SmpiHost(simgrid::s4u::Host *ptr) : host(ptr)
+Host::Host(simgrid::s4u::Host *ptr) : host(ptr)
{
- if (not SmpiHost::EXTENSION_ID.valid())
- SmpiHost::EXTENSION_ID = simgrid::s4u::Host::extension_create<SmpiHost>();
+ if (not Host::EXTENSION_ID.valid())
+ Host::EXTENSION_ID = simgrid::s4u::Host::extension_create<Host>();
const char* orecv_string = host->getProperty("smpi/or");
if (orecv_string != nullptr) {
}
}
-SmpiHost::~SmpiHost()=default;
+Host::~Host()=default;
}
}
#include "smpi_request.hpp"
-#include "SmpiHost.hpp"
+#include "smpi_host.hpp"
#include "mc/mc.h"
#include "private.hpp"
#include "smpi_comm.hpp"
if (detached_ != 0 || ((flags_ & (ISEND | SSEND)) != 0)) { // issend should be treated as isend
// isend and send timings may be different
sleeptime = ((flags_ & ISEND) != 0)
- ? simgrid::s4u::Actor::self()->get_host()->extension<simgrid::smpi::SmpiHost>()->oisend(size_)
- : simgrid::s4u::Actor::self()->get_host()->extension<simgrid::smpi::SmpiHost>()->osend(size_);
+ ? simgrid::s4u::Actor::self()->get_host()->extension<simgrid::smpi::Host>()->oisend(size_)
+ : simgrid::s4u::Actor::self()->get_host()->extension<simgrid::smpi::Host>()->osend(size_);
}
if(sleeptime > 0.0){
if(req->detached_sender_ != nullptr){
//integrate pseudo-timing for buffering of small messages, do not bother to execute the simcall if 0
double sleeptime =
- simgrid::s4u::Actor::self()->get_host()->extension<simgrid::smpi::SmpiHost>()->orecv(req->real_size());
+ simgrid::s4u::Actor::self()->get_host()->extension<simgrid::smpi::Host>()->orecv(req->real_size());
if(sleeptime > 0.0){
simcall_process_sleep(sleeptime);
XBT_DEBUG("receiving size of %zu : sleep %f ", req->real_size_, sleeptime);
src/smpi/internals/smpi_deployment.cpp
src/smpi/internals/smpi_dvfs.cpp
src/smpi/internals/smpi_global.cpp
- src/smpi/internals/SmpiHost.cpp
+ src/smpi/internals/smpi_host.cpp
src/smpi/internals/smpi_replay.cpp
src/smpi/internals/smpi_process.cpp
src/smpi/internals/smpi_utils.cpp
src/smpi/include/smpi_comm.hpp
src/smpi/include/smpi_f2c.hpp
src/smpi/include/smpi_group.hpp
- src/smpi/include/SmpiHost.hpp
+ src/smpi/include/smpi_host.hpp
src/smpi/include/smpi_datatype.hpp
src/smpi/include/smpi_info.hpp
src/smpi/include/smpi_keyvals.hpp