From: Christian Heinrich Date: Wed, 17 Jan 2018 20:20:30 +0000 (+0100) Subject: [SMPI] smpi_process.cpp: Replace 'index' with 'Actor::getPid' X-Git-Tag: v3.19~312^2~17 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/cfc580fc9b791015278c808c736f3ee66865baf8?hp=bdaa135f5f4c27c592daf1483894bcbb0eeb9aa9 [SMPI] smpi_process.cpp: Replace 'index' with 'Actor::getPid' --- diff --git a/src/smpi/internals/smpi_process.cpp b/src/smpi/internals/smpi_process.cpp index ebd9468e31..a28de3510b 100644 --- a/src/smpi/internals/smpi_process.cpp +++ b/src/smpi/internals/smpi_process.cpp @@ -32,6 +32,7 @@ static char *get_mailbox_name_small(char *str, int index) namespace simgrid{ namespace smpi{ +using simgrid::s4u::Actor; using simgrid::s4u::ActorPtr; Process::Process(ActorPtr actor, msg_bar_t finalization_barrier) @@ -39,9 +40,8 @@ Process::Process(ActorPtr actor, msg_bar_t finalization_barrier) { char name[MAILBOX_NAME_MAXLEN]; process_ = actor; - int index = actor->getPid(); // TODO cheinrich: This needs to be removed! Just a quick hack to make the following 2 lines work - mailbox_ = simgrid::s4u::Mailbox::byName(get_mailbox_name(name, index)); - mailbox_small_ = simgrid::s4u::Mailbox::byName(get_mailbox_name_small(name, index)); + mailbox_ = simgrid::s4u::Mailbox::byName(get_mailbox_name(name, process_->getPid())); + mailbox_small_ = simgrid::s4u::Mailbox::byName(get_mailbox_name_small(name, process_->getPid())); mailboxes_mutex_ = xbt_mutex_init(); timer_ = xbt_os_timer_new(); state_ = SMPI_UNINITIALIZED;