Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Potential crash --
authordegomme <augustin.degomme@unibas.ch>
Wed, 5 Apr 2017 15:04:19 +0000 (17:04 +0200)
committerdegomme <augustin.degomme@unibas.ch>
Wed, 5 Apr 2017 15:31:53 +0000 (17:31 +0200)
src/smpi/smpi_request.cpp

index f1b5a23..f4d5410 100644 (file)
@@ -775,8 +775,10 @@ void Request::finish_wait(MPI_Request* request, MPI_Status * status)
           datatype->unserialize(req->buf_, req->old_buf_, req->real_size_/datatype->size() , req->op_);
         xbt_free(req->buf_);
       }else if(req->flags_ & RECV){//apply op on contiguous buffer for accumulate
-          int n =req->real_size_/datatype->size();
-          req->op_->apply(req->buf_, req->old_buf_, &n, datatype);
+          if(datatype->size()!=0){
+            int n =req->real_size_/datatype->size();
+            req->op_->apply(req->buf_, req->old_buf_, &n, datatype);
+          }
           xbt_free(req->buf_);
       }
     }