From 993a209621600d56fe86f17b6615c23267e7cb06 Mon Sep 17 00:00:00 2001 From: degomme Date: Mon, 3 Apr 2017 14:41:23 +0200 Subject: [PATCH] Oops, we need to store a pointer to the simix process in the smpi process now. --- src/smpi/smpi_process.cpp | 5 +++++ src/smpi/smpi_process.hpp | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/smpi/smpi_process.cpp b/src/smpi/smpi_process.cpp index 83c2219162..fbf586f91b 100644 --- a/src/smpi/smpi_process.cpp +++ b/src/smpi/smpi_process.cpp @@ -94,6 +94,7 @@ void Process::set_data(int index, int *argc, char ***argv) argv_ = argv; // set the process attached to the mailbox mailbox_small_->setReceiver(simgrid::s4u::Actor::self()); + process_ = SIMIX_process_self(); XBT_DEBUG("<%d> New process in the game: %p", index, SIMIX_process_self()); } @@ -164,6 +165,10 @@ void *Process::get_user_data() return data_; } +smx_actor_t Process::process(){ + return process_; +} + /** * \brief Returns a structure that stores the location (filename + linenumber) diff --git a/src/smpi/smpi_process.hpp b/src/smpi/smpi_process.hpp index ca557a157a..f31e8dd3cf 100644 --- a/src/smpi/smpi_process.hpp +++ b/src/smpi/smpi_process.hpp @@ -37,6 +37,7 @@ class Process { msg_bar_t finalization_barrier_; int return_value_; smpi_trace_call_location_t trace_call_loc_; + smx_actor_t process_; #if HAVE_PAPI /** Contains hardware data as read by PAPI **/ int papi_event_set_; @@ -77,6 +78,7 @@ class Process { int return_value(); void set_return_value(int val); static void init(int *argc, char ***argv); + smx_actor_t process(); }; -- 2.20.1