Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add tracing for MPI_Start and MPI_Startall.
[simgrid.git] / src / smpi / mpi / smpi_request.cpp
index 07b5e95..7aa1dfd 100644 (file)
@@ -95,6 +95,10 @@ int Request::detached(){
   return detached_;
 }
 
+MPI_Datatype Request::type(){
+  return old_type_;
+}
+
 size_t Request::size(){
   return size_;
 }
@@ -107,7 +111,10 @@ void Request::unref(MPI_Request* request)
 {
   if((*request) != MPI_REQUEST_NULL){
     (*request)->refcount_--;
-    if((*request)->refcount_<0) xbt_die("wrong refcount");
+    if((*request)->refcount_ < 0) {
+      (*request)->print_request("wrong refcount");
+      xbt_die("Whoops, wrong refcount");
+    }
     if((*request)->refcount_==0){
         Datatype::unref((*request)->old_type_);
         Comm::unref((*request)->comm_);