From: abn Date: Wed, 13 Dec 2023 21:08:10 +0000 (+0100) Subject: [OverlapDEC] Fixing ODEC work algo sharing 1 X-Git-Tag: V9_13_0a1~28 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=11fb093f3bbc6261f7a1ec02dc1a83255c13d185;p=tools%2Fmedcoupling.git [OverlapDEC] Fixing ODEC work algo sharing 1 --- diff --git a/src/ParaMEDMEM/OverlapElementLocator.cxx b/src/ParaMEDMEM/OverlapElementLocator.cxx index 1192ad9ea..4d85fddd2 100644 --- a/src/ParaMEDMEM/OverlapElementLocator.cxx +++ b/src/ParaMEDMEM/OverlapElementLocator.cxx @@ -344,6 +344,8 @@ namespace MEDCoupling _procs_to_send_mesh.push_back(Proc_SrcOrTgt(i,false)); } } + // Sort to avoid deadlocks!! + std::sort(_procs_to_send_mesh.begin(), _procs_to_send_mesh.end()); #ifdef DEC_DEBUG std::stringstream scout; scout << "(" << _group.myRank() << ") PROC TO SEND list is: "; @@ -362,37 +364,35 @@ namespace MEDCoupling { int myProcId=_group.myRank(); //starting to receive every procs whose id is lower than myProcId. - std::vector toDoListForFetchRemaining; + std::vector firstRcv, secondRcv; for (const ProcCouple& pc: _to_do_list) { if(pc.first == pc.second) continue; // no xchg needed if(pc.first==myProcId) { - if(pc.second