- Timestamp:
- 09/29/21 09:44:59 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/client.cpp
r2209 r2238 90 90 91 91 size_t* hashAll = new size_t[commSize] ; 92 MPI_Allgather(&hashClient,1,MPI_ UNSIGNED_LONG,hashAll,1,MPI_LONG,globalComm) ;92 MPI_Allgather(&hashClient,1,MPI_SIZE_T,hashAll,1,MPI_SIZE_T,globalComm) ; 93 93 94 94 int color=0 ; 95 set<size_t> listHash ;96 for(int i=0 ; i<=comm Rank; i++)97 if (listHash.count(hashAll[i])==0) 95 map<size_t,int> listHash ; 96 for(int i=0 ; i<=commSize ; i++) 97 if (listHash.count(hashAll[i])==0) 98 98 { 99 listHash .insert(hashAll[i]);99 listHash[hashAll[i]]=color ; 100 100 color=color+1 ; 101 101 } 102 color=listHash[hashClient] ; 102 103 delete[] hashAll ; 103 104 … … 428 429 int type=CServicesManager::CLIENT ; 429 430 string name = CXios::getContextsManager()->getServerContextName(getPoolRessource()->getId(), id, 0, type, id) ; 430 while (!CXios::getContextsManager()->hasContext(name, contextComm) ) 431 { 432 CXios::getDaemonsManager()->eventLoop() ; 431 double time ; 432 double lastTime=0 ; 433 double latency=1e-2 ; 434 bool out=false ; 435 while (!out) 436 { 437 time=MPI_Wtime() ; 438 if (time-lastTime > latency) 439 { 440 out=CXios::getContextsManager()->hasContext(name, contextComm); 441 lastTime=time ; 442 } 443 if (!out) CXios::getDaemonsManager()->eventLoop() ; 433 444 } 434 445
Note: See TracChangeset
for help on using the changeset viewer.