Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
only test for these on non-root processes
authorAugustin Degomme <augustin.degomme@unibas.ch>
Tue, 10 Apr 2018 18:21:37 +0000 (20:21 +0200)
committerAugustin Degomme <augustin.degomme@unibas.ch>
Tue, 10 Apr 2018 18:21:37 +0000 (20:21 +0200)
src/smpi/bindings/smpi_pmpi_coll.cpp

index 9b9fa96..b4a298c 100644 (file)
@@ -122,7 +122,7 @@ int PMPI_Gatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recv
     retval = MPI_ERR_TYPE;
   } else if (( sendbuf != MPI_IN_PLACE) && (sendcount <0)){
     retval = MPI_ERR_COUNT;
-  } else if (recvcounts == nullptr || displs == nullptr) {
+  } else if ((comm->rank() == root) && (recvcounts == nullptr || displs == nullptr)) {
     retval = MPI_ERR_ARG;
   } else {
     char* sendtmpbuf = static_cast<char*>(sendbuf);