Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rescue cleanups lost with commit 8914cdf67bb2cdd7b64e6eeef5b06c29b24c3c96.
[simgrid.git] / src / smpi / internals / smpi_process.cpp
index 4ec37ca..e090be0 100644 (file)
@@ -52,6 +52,10 @@ Process::Process(ActorPtr actor, msg_bar_t finalization_barrier)
 
 Process::~Process()
 {
+  if (comm_self_ != MPI_COMM_NULL)
+    simgrid::smpi::Comm::destroy(comm_self_);
+  if (comm_intra_ != MPI_COMM_NULL)
+    simgrid::smpi::Comm::destroy(comm_intra_);
   xbt_os_timer_free(timer_);
   xbt_mutex_destroy(mailboxes_mutex_);
 }
@@ -77,7 +81,7 @@ void Process::set_data(int* argc, char*** argv)
   argv_ = argv;
   // set the process attached to the mailbox
   mailbox_small_->setReceiver(process_);
-  XBT_DEBUG("<%lu> New process in the game: %p", process_->getPid(), process_.get());
+  XBT_DEBUG("<%lu> SMPI process has been initialized: %p", process_->getPid(), process_.get());
 }
 
 /** @brief Prepares the current process for termination. */