From: Anthony Geay Date: Wed, 4 Nov 2020 21:01:53 +0000 (+0100) Subject: Fix little bug X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3288335d8ff09e722aecc28202bfce6ba3dd6149;p=tools%2Fmedcoupling.git Fix little bug --- diff --git a/src/ParaMEDMEM/ParaUMesh.cxx b/src/ParaMEDMEM/ParaUMesh.cxx index 555e09eb0..19e2f1405 100644 --- a/src/ParaMEDMEM/ParaUMesh.cxx +++ b/src/ParaMEDMEM/ParaUMesh.cxx @@ -159,7 +159,7 @@ MCAuto ParaUMesh::getCellIdsLyingOnNodesFalse(const DataArrayId mcIdType nbOfNodeIdsLoc(globalNodeIds->getNumberOfTuples()); ci.allGather(&nbOfNodeIdsLoc,1,MPI_ID_TYPE,nbOfElems.get(),1,MPI_ID_TYPE,comm); // loop to avoid to all procs to have all the nodes per proc - int nbOfCollectiveCalls = size;// this parameter controls the memory peak + int nbOfCollectiveCalls = 1;// this parameter controls the memory peak std::vector< MCAuto > tabs(size); for(int subDiv = 0 ; subDiv < nbOfCollectiveCalls ; ++subDiv) { @@ -169,7 +169,7 @@ MCAuto ParaUMesh::getCellIdsLyingOnNodesFalse(const DataArrayId std::unique_ptr nbOfElemsInt( CommInterface::ToIntArray(nbOfElemsSp,size) ); std::unique_ptr offsetsIn( CommInterface::ComputeOffset(nbOfElemsInt,size) ); mcIdType startGlobalNodeIds,endGlobalNodeIds; - DataArray::GetSlice(0,globalNodeIds->getNumberOfTuples(),1,subDiv,size,startGlobalNodeIds,endGlobalNodeIds); + DataArray::GetSlice(0,globalNodeIds->getNumberOfTuples(),1,subDiv,nbOfCollectiveCalls,startGlobalNodeIds,endGlobalNodeIds); ci.allGatherV(globalNodeIds->begin()+startGlobalNodeIds,FromIdType(endGlobalNodeIds-startGlobalNodeIds),MPI_ID_TYPE,allGlobalNodeIds.get(),nbOfElemsInt.get(),offsetsIn.get(),MPI_ID_TYPE,comm); mcIdType offset(0); for(int curRk = 0 ; curRk < size ; ++curRk)