namespace simgrid{
namespace smpi{
-Process::Process(int index)
+Process::Process(int index, msg_bar_t finalization_barrier)
+ : finalization_barrier_(finalization_barrier)
{
char name[MAILBOX_NAME_MAXLEN];
mailbox_ = simgrid::s4u::Mailbox::byName(get_mailbox_name(name, index));
void Process::set_data(int index, int* argc, char*** argv)
{
-
char* instance_id = (*argv)[1];
comm_world_ = smpi_deployment_comm_world(instance_id);
msg_bar_t bar = smpi_deployment_finalization_barrier(instance_id);
XBT_DEBUG("<%d> New process in the game: %p", index_, SIMIX_process_self());
}
-void Process::destroy()
+/** @brief Prepares the current process for termination. */
+void Process::finalize()
{
- if(smpi_privatize_global_variables == SMPI_PRIVATIZE_MMAP){
- smpi_switch_data_segment(index_);
- }
state_ = SMPI_FINALIZED;
XBT_DEBUG("<%d> Process left the game", index_);
-}
-/** @brief Prepares the current process for termination. */
-void Process::finalize()
-{
// This leads to an explosion of the search graph which cannot be reduced:
if(MC_is_active() || MC_record_replay_is_active())
return;
return sampling_;
}
-void Process::set_finalization_barrier(msg_bar_t bar){
- finalization_barrier_=bar;
-}
-
msg_bar_t Process::finalization_barrier(){
return finalization_barrier_;
}