X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/37026c8cf369c36af2673b6a9404d7871b197686..897c14185f8a5e6506c9037d4342329a460a7a95:/src/smpi/internals/smpi_actor.cpp diff --git a/src/smpi/internals/smpi_actor.cpp b/src/smpi/internals/smpi_actor.cpp index e657ab901b..3a5af91263 100644 --- a/src/smpi/internals/smpi_actor.cpp +++ b/src/smpi/internals/smpi_actor.cpp @@ -27,6 +27,7 @@ ActorExt::ActorExt(s4u::ActorPtr actor, s4u::Barrier* finalization_barrier) mailboxes_mutex_ = s4u::Mutex::create(); timer_ = xbt_os_timer_new(); state_ = SmpiProcessState::UNINITIALIZED; + info_env_ = MPI_INFO_NULL; if (MC_is_active()) MC_ignore_heap(timer_, xbt_os_timer_size()); @@ -193,6 +194,11 @@ MPI_Comm ActorExt::comm_self() return comm_self_; } +MPI_Info ActorExt::info_env() +{ + return info_env_; +} + MPI_Comm ActorExt::comm_intra() { return comm_intra_; @@ -215,10 +221,8 @@ int ActorExt::sampling() void ActorExt::init() { - if (smpi_process_count() == 0) { - xbt_die("SimGrid was not initialized properly before entering MPI_Init. Aborting, please check compilation process " - "and use smpirun\n"); - } + xbt_assert(smpi_process_count() != 0, "SimGrid was not initialized properly before entering MPI_Init. " + "Aborting, please check compilation process and use smpirun."); simgrid::s4u::ActorPtr proc = simgrid::s4u::Actor::self(); // cheinrich: I'm not sure what the impact of the SMPI_switch_data_segment on this call is. I moved @@ -235,8 +239,8 @@ void ActorExt::init() SMPI_switch_data_segment(proc); } - const char* instance_id = simgrid::s4u::Actor::self()->get_property("instance_id"); - const int rank = xbt_str_parse_int(simgrid::s4u::Actor::self()->get_property("rank"), "Cannot parse rank"); + const char* instance_id = proc->get_property("instance_id"); + const int rank = xbt_str_parse_int(proc->get_property("rank"), "Cannot parse rank"); process->state_ = SmpiProcessState::INITIALIZING; smpi_deployment_register_process(instance_id, rank, proc); @@ -246,11 +250,12 @@ void ActorExt::init() int ActorExt::get_optind() { - return optind; + return optind_; } + void ActorExt::set_optind(int new_optind) { - optind = new_optind; + optind_ = new_optind; } } // namespace smpi