Changeset 1152 for XIOS/dev/dev_olga/src/client.cpp
- Timestamp:
- 06/02/17 16:56:46 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_olga/src/client.cpp
r1148 r1152 41 41 if (initialized) is_MPI_Initialized=true ; 42 42 else is_MPI_Initialized=false ; 43 int rank ; 43 44 44 45 // don't use OASIS … … 90 91 { 91 92 if (hashAll[i] == hashString(CXios::xiosCodeId)) 92 // || (hashAll[i] == hashString(CXios::xiosCodeIdPrm))93 // || (hashAll[i] == hashString(CXios::xiosCodeIdSnd)))94 93 { 95 94 CXios::setUsingServer(); … … 98 97 } 99 98 100 myColor=colors[hashClient] ; 99 // myColor=colors[hashClient]; 100 myColor=leaders[hashClient] ; 101 101 MPI_Comm_split(CXios::globalComm,myColor,rank_,&intraComm) ; 102 103 if (CXios::usingServer2) 104 MPI_Allgather(&hashClient, 1, MPI_LONG, hashAll, 1, MPI_LONG, CXios::globalComm) ; 102 105 103 106 if (CXios::usingServer) … … 111 114 <<" intraCommRank :"<<intraCommRank<<" clientLeader "<< serverLeader<<endl ; 112 115 MPI_Intercomm_create(intraComm, 0, CXios::globalComm, serverLeader, 0, &interComm) ; 113 rank_ = intraCommRank;116 //rank_ = intraCommRank; 114 117 } 115 118 else … … 150 153 { 151 154 MPI_Status status ; 152 MPI_Comm_rank(intraComm,&rank _) ;155 MPI_Comm_rank(intraComm,&rank) ; 153 156 154 157 oasis_get_intercomm(interComm,CXios::xiosCodeId) ; 155 if (rank _==0) MPI_Recv(&serverLeader,1, MPI_INT, 0, 0, interComm, &status) ;158 if (rank==0) MPI_Recv(&serverLeader,1, MPI_INT, 0, 0, interComm, &status) ; 156 159 MPI_Bcast(&serverLeader,1,MPI_INT,0,intraComm) ; 157 160
Note: See TracChangeset
for help on using the changeset viewer.