Changeset 655 for XIOS/trunk/src/client.cpp
- Timestamp:
- 07/24/15 16:40:07 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/client.cpp
r597 r655 17 17 MPI_Comm CClient::intraComm ; 18 18 MPI_Comm CClient::interComm ; 19 std::list<MPI_Comm> CClient::contextInterComms; 19 20 int CClient::serverLeader ; 20 21 bool CClient::is_MPI_Initialized ; … … 128 129 { 129 130 if (!is_MPI_Initialized) oasis_init(codeId) ; 130 oasis_get_localcomm(intraComm) ; 131 } 132 else MPI_Comm_dup(localComm,&intraComm) ; 131 oasis_get_localcomm(localComm) ; 132 } 133 MPI_Comm_dup(localComm,&intraComm) ; 134 133 135 CTimer::get("XIOS").resume() ; 134 136 CTimer::get("XIOS init").resume() ; … … 191 193 192 194 context->initClient(contextComm,contextInterComm) ; 195 196 contextInterComms.push_back(contextInterComm); 197 MPI_Comm_free(&inter); 193 198 } 194 199 else … … 206 211 // Finally, we should return current context to context client 207 212 CContext::setCurrent(id); 208 // context->initServer(contextComm,contextInterComm) ; 213 214 contextInterComms.push_back(contextInterComm); 209 215 } 210 216 } … … 223 229 } 224 230 225 CTimer::get("XIOS finalize").suspend() ; 226 CTimer::get("XIOS").suspend() ; 231 for (std::list<MPI_Comm>::iterator it = contextInterComms.begin(); it != contextInterComms.end(); it++) 232 MPI_Comm_free(&(*it)); 233 MPI_Comm_free(&interComm); 234 MPI_Comm_free(&intraComm); 235 236 CTimer::get("XIOS finalize").suspend() ; 237 CTimer::get("XIOS").suspend() ; 227 238 228 239 if (!is_MPI_Initialized)
Note: See TracChangeset
for help on using the changeset viewer.