Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Oops, we need to store a pointer to the simix process in the smpi process now.
authordegomme <augustin.degomme@unibas.ch>
Mon, 3 Apr 2017 12:41:23 +0000 (14:41 +0200)
committerdegomme <augustin.degomme@unibas.ch>
Tue, 4 Apr 2017 08:27:12 +0000 (10:27 +0200)
src/smpi/smpi_process.cpp
src/smpi/smpi_process.hpp

index 83c2219..fbf586f 100644 (file)
@@ -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());
     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());
 }
 
     XBT_DEBUG("<%d> New process in the game: %p", index, SIMIX_process_self());
 }
 
@@ -164,6 +165,10 @@ void *Process::get_user_data()
   return data_;
 }
 
   return data_;
 }
 
+smx_actor_t Process::process(){
+  return process_;
+}
+
 
 /**
  * \brief Returns a structure that stores the location (filename + linenumber)
 
 /**
  * \brief Returns a structure that stores the location (filename + linenumber)
index ca557a1..f31e8dd 100644 (file)
@@ -37,6 +37,7 @@ class Process {
     msg_bar_t finalization_barrier_;
     int return_value_;
     smpi_trace_call_location_t trace_call_loc_;
     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_;
 #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);
     int return_value();
     void set_return_value(int val);
     static void init(int *argc, char ***argv);
+    smx_actor_t process();
 };
 
 
 };