X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e631173bebbd716f33286a72e58d50cf1b79057a..0dda9bcd2d7df2c8141a8170a7cb8fe20746b4a9:/src/smpi/smpi_process.hpp diff --git a/src/smpi/smpi_process.hpp b/src/smpi/smpi_process.hpp index 173e3577dd..f532ec7522 100644 --- a/src/smpi/smpi_process.hpp +++ b/src/smpi/smpi_process.hpp @@ -7,11 +7,9 @@ #ifndef SMPI_PROCESS_HPP #define SMPI_PROCESS_HPP - -#include #include "src/instr/instr_smpi.h" -#include "private.h" #include "simgrid/s4u/Mailbox.hpp" +#include "xbt/synchro.h" namespace simgrid{ namespace smpi{ @@ -28,13 +26,14 @@ class Process { MPI_Comm comm_self_ = MPI_COMM_NULL; MPI_Comm comm_intra_ = MPI_COMM_NULL; MPI_Comm* comm_world_ = nullptr; + void* data_ = nullptr; /* user data */ int index_ = MPI_UNDEFINED; char state_; int sampling_ = 0; /* inside an SMPI_SAMPLE_ block? */ char* instance_id_ = nullptr; bool replaying_ = false; /* is the process replaying a trace */ - msg_bar_t finalization_barrier_ = nullptr; - int return_value_ = 0; + msg_bar_t finalization_barrier_; + int return_value_ = 0; smpi_trace_call_location_t trace_call_loc_; smx_actor_t process_ = nullptr; #if HAVE_PAPI @@ -43,7 +42,7 @@ class Process { papi_counter_t papi_counter_data_; #endif public: - explicit Process(int index); + explicit Process(int index, msg_bar_t barrier); void set_data(int index, int* argc, char*** argv); void finalize(); int finalized(); @@ -51,6 +50,8 @@ class Process { void mark_as_initialized(); void set_replaying(bool value); bool replaying(); + void set_user_data(void *data); + void *get_user_data(); smpi_trace_call_location_t* call_location(); int index(); MPI_Comm comm_world(); @@ -58,8 +59,8 @@ class Process { smx_mailbox_t mailbox_small(); xbt_mutex_t mailboxes_mutex(); #if HAVE_PAPI - int papi_event_set(void); - papi_counter_t& papi_counters(void); + int papi_event_set(); + papi_counter_t& papi_counters(); #endif xbt_os_timer_t timer(); void simulated_start(); @@ -70,7 +71,6 @@ class Process { void set_sampling(int s); int sampling(); msg_bar_t finalization_barrier(); - void set_finalization_barrier(msg_bar_t bar); int return_value(); void set_return_value(int val); static void init(int *argc, char ***argv);