using simgrid::s4u::ActorPtr;
Process::Process(ActorPtr actor, msg_bar_t finalization_barrier)
using simgrid::s4u::ActorPtr;
Process::Process(ActorPtr actor, msg_bar_t finalization_barrier)
- mailbox_ = simgrid::s4u::Mailbox::byName("SMPI-" + std::to_string(process_->get_pid()));
- mailbox_small_ = simgrid::s4u::Mailbox::byName("small-" + std::to_string(process_->get_pid()));
+ mailbox_ = simgrid::s4u::Mailbox::by_name("SMPI-" + std::to_string(actor_->get_pid()));
+ mailbox_small_ = simgrid::s4u::Mailbox::by_name("small-" + std::to_string(actor_->get_pid()));
if (barrier != nullptr) // don't overwrite the current one if the instance has none
finalization_barrier_ = barrier;
if (barrier != nullptr) // don't overwrite the current one if the instance has none
finalization_barrier_ = barrier;
- process_ = simgrid::s4u::Actor::self();
- static_cast<simgrid::msg::ActorExt*>(process_->get_impl()->userdata)->data = this;
+ actor_ = simgrid::s4u::Actor::self();
+ static_cast<simgrid::msg::ActorExt*>(actor_->get_impl()->getUserData())->data = this;
- mailbox_small_->setReceiver(process_);
- XBT_DEBUG("<%ld> SMPI process has been initialized: %p", process_->get_pid(), process_.get());
+ mailbox_small_->set_receiver(actor_);
+ XBT_DEBUG("<%ld> SMPI process has been initialized: %p", actor_->get_pid(), actor_.get());
- state_ = SMPI_FINALIZED;
- XBT_DEBUG("<%ld> Process left the game", process_->get_pid());
+ state_ = SmpiProcessState::FINALIZED;
+ XBT_DEBUG("<%ld> Process left the game", actor_->get_pid());
// This leads to an explosion of the search graph which cannot be reduced:
if(MC_is_active() || MC_record_replay_is_active())
// This leads to an explosion of the search graph which cannot be reduced:
if(MC_is_active() || MC_record_replay_is_active())
if(comm_self_==MPI_COMM_NULL){
MPI_Group group = new Group(1);
comm_self_ = new Comm(group, nullptr);
if(comm_self_==MPI_COMM_NULL){
MPI_Group group = new Group(1);
comm_self_ = new Comm(group, nullptr);
void Process::init(int *argc, char ***argv){
if (smpi_process_count() == 0) {
void Process::init(int *argc, char ***argv){
if (smpi_process_count() == 0) {
// 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);
// 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);
/* Now using the segment index of this process */
process->set_privatized_region(smpi_init_global_memory_segment_process());
/* Done at the process's creation */
/* Now using the segment index of this process */
process->set_privatized_region(smpi_init_global_memory_segment_process());
/* Done at the process's creation */