Changeset 1545 for XIOS/dev/branch_openmp/src/server.cpp
- Timestamp:
- 06/18/18 20:32:55 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/src/server.cpp
r1533 r1545 39 39 * \fn void CServer::initialize(void) 40 40 * Creates intraComm for each possible type of servers (classical, primary or secondary). 41 * (For now the assumption is that there is one proc per secondary server pool.)42 41 * Creates interComm and stores them into the following lists: 43 42 * classical server -- interCommLeft … … 111 110 else 112 111 { 112 if (CXios::nbPoolsServer2 == 0) CXios::nbPoolsServer2 = reqNbProc; 113 113 int firstSndSrvRank = srvRanks.size()*(100.-CXios::ratioServer2)/100. ; 114 114 int poolLeader = firstSndSrvRank; 115 115 //*********** (1) Comment out the line below to set one process per pool 116 //sndServerGlobalRanks.push_back(srvRanks[poolLeader]);116 sndServerGlobalRanks.push_back(srvRanks[poolLeader]); 117 117 int nbPools = CXios::nbPoolsServer2; 118 118 if ( nbPools > reqNbProc || nbPools < 1) … … 140 140 } 141 141 //*********** (2) Comment out the two lines below to set one process per pool 142 //if (poolLeader < srvRanks.size())143 //sndServerGlobalRanks.push_back(srvRanks[poolLeader]);142 if (poolLeader < srvRanks.size()) 143 sndServerGlobalRanks.push_back(srvRanks[poolLeader]); 144 144 //*********** (3) Uncomment the line below to set one process per pool 145 sndServerGlobalRanks.push_back(srvRanks[i]);145 // sndServerGlobalRanks.push_back(srvRanks[i]); 146 146 } 147 147 else … … 189 189 MPI_Comm_size(intraComm,&intraCommSize) ; 190 190 MPI_Comm_rank(intraComm,&intraCommRank) ; 191 192 MPI_Intercomm_create(intraComm, 0, CXios::globalComm, clientLeader, 0, &newComm) ; 191 193 #pragma omp critical (_output) 192 194 { … … 195 197 } 196 198 197 MPI_Intercomm_create(intraComm, 0, CXios::globalComm, clientLeader, 0, &newComm) ;199 198 200 interCommLeft.push_back(newComm) ; 199 201 } … … 213 215 MPI_Comm_size(intraComm, &intraCommSize) ; 214 216 MPI_Comm_rank(intraComm, &intraCommRank) ; 217 218 MPI_Intercomm_create(intraComm, 0, CXios::globalComm, clientLeader, 0, &newComm) ; 215 219 #pragma omp critical (_output) 216 220 { … … 218 222 <<" intraCommRank :"<<intraCommRank<<" clientLeader "<< clientLeader<<endl ; 219 223 } 220 MPI_Intercomm_create(intraComm, 0, CXios::globalComm, clientLeader, 0, &newComm) ; 224 221 225 interCommLeft.push_back(newComm) ; 222 226 } … … 228 232 MPI_Comm_size(intraComm, &intraCommSize) ; 229 233 MPI_Comm_rank(intraComm, &intraCommRank) ; 234 235 MPI_Intercomm_create(intraComm, 0, CXios::globalComm, sndServerGlobalRanks[i], 1, &newComm) ; 230 236 #pragma omp critical (_output) 231 237 { … … 233 239 <<" intraCommRank :"<<intraCommRank<<" clientLeader "<< sndServerGlobalRanks[i]<<endl ; 234 240 } 235 MPI_Intercomm_create(intraComm, 0, CXios::globalComm, sndServerGlobalRanks[i], 1, &newComm) ; 241 236 242 interCommRight.push_back(newComm) ; 237 243 } … … 244 250 MPI_Comm_size(intraComm, &intraCommSize) ; 245 251 MPI_Comm_rank(intraComm, &intraCommRank) ; 252 253 MPI_Intercomm_create(intraComm, 0, CXios::globalComm, clientLeader, 1, &newComm) ; 246 254 #pragma omp critical (_output) 247 255 { … … 250 258 } 251 259 252 MPI_Intercomm_create(intraComm, 0, CXios::globalComm, clientLeader, 1, &newComm) ;253 260 interCommLeft.push_back(newComm) ; 254 261 } … … 654 661 if (flag==true) 655 662 { 656 int my_count;657 663 counts.push_back(0); 658 664 MPI_Get_count(&status,MPI_CHAR,&(counts.back())) ; 659 665 buffers.push_back(new char[counts.back()]) ; 660 //requests.push_back(request);661 //MPI_Irecv((void*)(buffers.back()),counts.back(),MPI_CHAR,root,2,intraComm,&(requests.back())) ;662 666 MPI_Irecv((void*)(buffers.back()),counts.back(),MPI_CHAR,root,2,intraComm,&request) ; 663 667 requests.push_back(request); … … 817 821 if (!fb->is_open()) 818 822 ERROR("void CServer::openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb)", 819 << std::endl << "Can not open <" << fileNameClient << "> file to write the server log(s).");823 << std::endl << "Can not open <" << fileNameClient.str() << "> file to write the server log(s)."); 820 824 } 821 825
Note: See TracChangeset
for help on using the changeset viewer.