Session::Session(pid_t pid, int socket)
{
std::unique_ptr<simgrid::mc::RemoteClient> process(new simgrid::mc::RemoteClient(pid, socket));
+#if HAVE_SMPI
// TODO, automatic detection of the config from the process
process->privatized(smpi_privatize_global_variables != SmpiPrivStrategies::NONE);
+#else
+ process->privatized(false);
+#endif
modelChecker_ = std::unique_ptr<ModelChecker>(
new simgrid::mc::ModelChecker(std::move(process)));
xbt_assert(mc_model_checker == nullptr);
#include "src/mc/mc_state.hpp"
#include "src/mc/remote/Client.hpp"
+#if HAVE_SMPI
#include "smpi_request.hpp"
+#endif
#include <cstdint>
pattern->src_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(synchro->src_proc))->pid_;
pattern->src_host = MC_smx_actor_get_host_name(issuer);
+#if HAVE_SMPI
simgrid::smpi::Request mpi_request = mc_model_checker->process().read<simgrid::smpi::Request>(
RemotePtr<simgrid::smpi::Request>((std::uint64_t)simcall_comm_isend__get__data(request)));
pattern->tag = mpi_request.tag();
+#endif
if (synchro->src_buff != nullptr) {
pattern->data.resize(synchro->src_buff_size);
mc_model_checker->process().read_bytes(pattern->data.data(), pattern->data.size(), remote(synchro->src_buff));
}
+#if HAVE_SMPI
if(mpi_request.detached()){
if (not this->initial_communications_pattern_done) {
/* Store comm pattern */
}
return;
}
+#endif
} else if (call_type == MC_CALL_TYPE_RECV) {
pattern->type = simgrid::mc::PatternCommunicationType::receive;
pattern->comm_addr = static_cast<simgrid::kernel::activity::CommImpl*>(simcall_comm_irecv__getraw__result(request));
+#if HAVE_SMPI
simgrid::smpi::Request mpi_request;
mc_model_checker->process().read(&mpi_request,
remote((simgrid::smpi::Request*)simcall_comm_irecv__get__data(request)));
pattern->tag = mpi_request.tag();
+#endif
simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_comm;
mc_model_checker->process().read(temp_comm,
const void* RemoteClient::read_bytes(void* buffer, std::size_t size, RemotePtr<void> address, int process_index,
ReadOptions options) const
{
+#if HAVE_SMPI
if (process_index != simgrid::mc::ProcessIndexDisabled) {
std::shared_ptr<simgrid::mc::ObjectInformation> const& info = this->find_object_info_rw(address);
-// Segment overlap is not handled.
-#if HAVE_SMPI
+ // Segment overlap is not handled.
if (info.get() && this->privatized(*info)) {
if (process_index < 0)
xbt_die("Missing process index");
size_t offset = address.address() - (std::uint64_t)info->start_rw;
address = remote((char*)privatization_region.address + offset);
}
-#endif
}
+#endif
if (pread_whole(this->memory_file, buffer, size, (size_t)address.address()) < 0)
xbt_die("Read at %p from process %lli failed", (void*)address.address(), (long long)this->pid_);
return buffer;
explicit Adagio(simgrid::s4u::Host* ptr)
: Governor(ptr), rates(100, std::vector<double>(ptr->get_pstate_count(), 0.0))
{
+#if HAVE_SMPI
simgrid::smpi::plugin::ampi::on_iteration_in.connect([this](simgrid::s4u::ActorPtr actor) {
// Every instance of this class subscribes to this event, so one per host
// This means that for any actor, all 'hosts' are normally notified of these
task_id = 0;
}
});
+#endif
simgrid::kernel::activity::ExecImpl::on_creation.connect([this](simgrid::kernel::activity::ExecImplPtr activity) {
if (activity->host_ == get_host())
pre_task();