Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't add handles to the lookup for the sake of just removing them immediately...
[simgrid.git] / src / smpi / mpi / smpi_win.cpp
index bc35012..297dd07 100644 (file)
@@ -78,7 +78,7 @@ Win::~Win(){
   if(allocated_ !=0)
     xbt_free(base_);
 
-  F2C::free_f(this->c2f());
+  F2C::free_f(this->f2c_id());
   cleanup_attr<Win>();
 }
 
@@ -128,6 +128,11 @@ int Win::rank() const
   return rank_;
 }
 
+MPI_Comm Win::comm() const
+{
+  return comm_;
+}
+
 MPI_Aint Win::size() const
 {
   return size_;
@@ -520,8 +525,7 @@ int Win::post(MPI_Group group, int /*assert*/)
 }
 
 int Win::complete(){
-  if(opened_==0)
-    xbt_die("Complete called on already opened MPI_Win");
+  xbt_assert(opened_ != 0, "Complete called on already opened MPI_Win");
 
   XBT_DEBUG("Entering MPI_Win_Complete");
   int i             = 0;