X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e71689ec8d767b088b24362b50c51f2af875f175..abdd50d7729bd7ed16782a24d97fe92ff28fb57a:/src/smpi/internals/smpi_process.cpp diff --git a/src/smpi/internals/smpi_process.cpp b/src/smpi/internals/smpi_process.cpp index 1d677e5eef..dc1c516a1b 100644 --- a/src/smpi/internals/smpi_process.cpp +++ b/src/smpi/internals/smpi_process.cpp @@ -63,8 +63,8 @@ Process::~Process() void Process::set_data(int* argc, char*** argv) { instance_id_ = std::string((*argv)[1]); - comm_world_ = smpi_deployment_comm_world(instance_id_.c_str()); - msg_bar_t barrier = smpi_deployment_finalization_barrier(instance_id_.c_str()); + comm_world_ = smpi_deployment_comm_world(instance_id_); + msg_bar_t barrier = smpi_deployment_finalization_barrier(instance_id_); if (barrier != nullptr) // don't overwrite the current one if the instance has none finalization_barrier_ = barrier; @@ -81,14 +81,14 @@ void Process::set_data(int* argc, char*** argv) argv_ = argv; // set the process attached to the mailbox mailbox_small_->setReceiver(process_); - XBT_DEBUG("<%lu> SMPI process has been initialized: %p", process_->getPid(), process_.get()); + XBT_DEBUG("<%ld> SMPI process has been initialized: %p", process_->getPid(), process_.get()); } /** @brief Prepares the current process for termination. */ void Process::finalize() { state_ = SMPI_FINALIZED; - XBT_DEBUG("<%lu> Process left the game", process_->getPid()); + XBT_DEBUG("<%ld> Process left the game", process_->getPid()); // This leads to an explosion of the search graph which cannot be reduced: if(MC_is_active() || MC_record_replay_is_active()) @@ -262,12 +262,11 @@ void Process::init(int *argc, char ***argv){ // cheinrich: I'm not sure what the impact of the SMPI_switch_data_segment on this call is. I moved // this up here so that I can set the privatized region before the switch. Process* process = smpi_process_remote(proc); - int my_proc_id = proc->getPid(); if(smpi_privatize_global_variables == SMPI_PRIVATIZE_MMAP){ /* Now using the segment index of this process */ process->set_privatized_region(smpi_init_global_memory_segment_process()); /* Done at the process's creation */ - SMPI_switch_data_segment(my_proc_id); + SMPI_switch_data_segment(proc); } process->set_data(argc, argv);