Changeset 1784 for XIOS/dev/dev_ym/XIOS_COUPLING/src/node/domain.cpp
- Timestamp:
- 12/12/19 18:15:14 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/node/domain.cpp
r1761 r1784 302 302 // For now the assumption is that secondary server pools consist of the same number of procs. 303 303 // CHANGE the line below if the assumption changes. 304 CContextClient* client = (0 != context->clientPrimServer.size()) ? context->clientPrimServer[0] : context->client; 305 int rankClient = c lient->clientRank;304 305 int rankClient = context->intraCommRank_; 306 306 int rankOnDomain = rankClient%nbLocalDomain; 307 307 … … 680 680 // For now the assumption is that secondary server pools consist of the same number of procs. 681 681 // CHANGE the line below if the assumption changes. 682 CContextClient* client = (0 != context->clientPrimServer.size()) ? context->clientPrimServer[0] : context->client;682 int clientSize = context->intraCommSize_ ; 683 683 lon_g.resize(ni_glo) ; 684 684 lat_g.resize(nj_glo) ; 685 685 686 686 687 int* ibegin_g = new int[client ->clientSize] ;688 int* jbegin_g = new int[client ->clientSize] ;689 int* ni_g = new int[client ->clientSize] ;690 int* nj_g = new int[client ->clientSize] ;687 int* ibegin_g = new int[clientSize] ; 688 int* jbegin_g = new int[clientSize] ; 689 int* ni_g = new int[clientSize] ; 690 int* nj_g = new int[clientSize] ; 691 691 int v ; 692 692 v=ibegin ; 693 MPI_Allgather(&v,1,MPI_INT,ibegin_g,1,MPI_INT,c lient->intraComm) ;693 MPI_Allgather(&v,1,MPI_INT,ibegin_g,1,MPI_INT,context->intraComm_) ; 694 694 v=jbegin ; 695 MPI_Allgather(&v,1,MPI_INT,jbegin_g,1,MPI_INT,c lient->intraComm) ;695 MPI_Allgather(&v,1,MPI_INT,jbegin_g,1,MPI_INT,context->intraComm_) ; 696 696 v=ni ; 697 MPI_Allgather(&v,1,MPI_INT,ni_g,1,MPI_INT,c lient->intraComm) ;697 MPI_Allgather(&v,1,MPI_INT,ni_g,1,MPI_INT,context->intraComm_) ; 698 698 v=nj ; 699 MPI_Allgather(&v,1,MPI_INT,nj_g,1,MPI_INT,c lient->intraComm) ;700 701 MPI_Allgatherv(lon.dataFirst(),ni,MPI_DOUBLE,lon_g.dataFirst(),ni_g, ibegin_g,MPI_DOUBLE,c lient->intraComm) ;702 MPI_Allgatherv(lat.dataFirst(),nj,MPI_DOUBLE,lat_g.dataFirst(),nj_g, jbegin_g,MPI_DOUBLE,c lient->intraComm) ;699 MPI_Allgather(&v,1,MPI_INT,nj_g,1,MPI_INT,context->intraComm_) ; 700 701 MPI_Allgatherv(lon.dataFirst(),ni,MPI_DOUBLE,lon_g.dataFirst(),ni_g, ibegin_g,MPI_DOUBLE,context->intraComm_) ; 702 MPI_Allgatherv(lat.dataFirst(),nj,MPI_DOUBLE,lat_g.dataFirst(),nj_g, jbegin_g,MPI_DOUBLE,context->intraComm_) ; 703 703 704 704 delete[] ibegin_g ; … … 1831 1831 { 1832 1832 CContext* context=CContext::getCurrent() ; 1833 1834 // This line should be changed soon. 1835 int nbSrvPools = (context->hasServer) ? (context->hasClient ? context->clientPrimServer.size() : 0) : 1; 1836 1837 nbSenders.clear(); 1838 connectedServerRank_.clear(); 1839 1840 for (int p = 0; p < nbSrvPools; ++p) 1833 set<int> listNbServer ; 1834 1835 for (auto client : clients) 1841 1836 { 1842 CContextClient* client = (0 != context->clientPrimServer.size()) ? context->clientPrimServer[p] : context->client; 1837 1843 1838 int nbServer = client->serverSize; 1844 1839 int nbClient = client->clientSize; 1845 1840 int rank = client->clientRank; 1846 1841 bool doComputeGlobalIndexServer = true; 1847 1848 if (connectedServerRank_.find(nbServer) == connectedServerRank_.end()) 1849 { 1842 1843 if (listNbServer.find(nbServer)==listNbServer.end()) 1844 { 1845 listNbServer.insert(nbServer) ; 1846 1847 if (connectedServerRank_.find(nbServer) != connectedServerRank_.end()) 1848 { 1849 nbSenders.erase(nbServer); 1850 connectedServerRank_.erase(nbServer); 1851 } 1850 1852 1851 1853 if (indSrv_.find(nbServer) == indSrv_.end())
Note: See TracChangeset
for help on using the changeset viewer.