Changeset 1638 for XIOS/trunk/src/cxios.cpp
- Timestamp:
- 01/22/19 16:15:03 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/cxios.cpp
r1622 r1638 26 26 bool CXios::isClient ; 27 27 bool CXios::isServer ; 28 MPI_Comm CXios::globalComm ;28 ep_lib::MPI_Comm CXios::globalComm ; 29 29 bool CXios::usingOasis ; 30 30 bool CXios::usingServer = false; … … 90 90 91 91 checkEventSync = getin<bool>("check_event_sync", checkEventSync); 92 92 #ifdef _usingMPI 93 93 globalComm=MPI_COMM_WORLD ; 94 #elif _usingEP 95 ep_lib::MPI_Comm *ep_comm; 96 ep_lib::MPI_Info info; 97 ep_lib::MPI_Comm_create_endpoints(EP_COMM_WORLD->mpi_comm, 1, info, ep_comm); 98 ep_lib::passage = ep_comm; 99 globalComm=ep_lib::passage[0] ; 100 #endif 94 101 } 95 102 … … 100 107 \param [in/out] returnComm communicator corresponding to group of client with same codeId 101 108 */ 102 void CXios::initClientSide(const string& codeId, MPI_Comm& localComm,MPI_Comm& returnComm)109 void CXios::initClientSide(const string& codeId, ep_lib::MPI_Comm& localComm, ep_lib::MPI_Comm& returnComm) 103 110 TRY 104 111 { 112 isClient = true; 113 isServer = false; 114 105 115 initialize() ; 106 116 107 isClient = true;108 117 109 118 CClient::initialize(codeId,localComm,returnComm) ; 110 119 if (CClient::getRank()==0) globalRegistry = new CRegistry(returnComm) ; 120 111 121 112 122 // If there are no server processes then we are in attached mode … … 167 177 void CXios::initServerSide(void) 168 178 { 179 isClient = false; 180 isServer = true; 181 169 182 initServer(); 170 183 isClient = false; 171 184 isServer = true; 172 173 185 // Initialize all aspects MPI 174 186 CServer::initialize(); … … 223 235 int firstPoolGlobalRank = secondaryServerGlobalRanks[0]; 224 236 int rankGlobal; 225 MPI_Comm_rank(globalComm, &rankGlobal);237 ep_lib::MPI_Comm_rank(globalComm, &rankGlobal); 226 238 227 239 // Merge registries defined on each pools … … 235 247 globalRegistrySndServers.mergeRegistry(*globalRegistry) ; 236 248 int registrySize = globalRegistrySndServers.size(); 237 MPI_Send(®istrySize,1,MPI_LONG,firstPoolGlobalRank,15,CXios::globalComm) ;249 ep_lib::MPI_Send(®istrySize,1,EP_LONG,firstPoolGlobalRank,15,CXios::globalComm) ; 238 250 CBufferOut buffer(registrySize) ; 239 251 globalRegistrySndServers.toBuffer(buffer) ; 240 MPI_Send(buffer.start(),registrySize,MPI_CHAR,firstPoolGlobalRank,15,CXios::globalComm) ;252 ep_lib::MPI_Send(buffer.start(),registrySize,EP_CHAR,firstPoolGlobalRank,15,CXios::globalComm) ; 241 253 } 242 254 } … … 245 257 if (rankGlobal == firstPoolGlobalRank) 246 258 { 247 MPI_Status status;259 ep_lib::MPI_Status status; 248 260 char* recvBuff; 249 261 … … 254 266 int rank = secondaryServerGlobalRanks[i]; 255 267 int registrySize = 0; 256 MPI_Recv(®istrySize, 1, MPI_LONG, rank, 15, CXios::globalComm, &status);268 ep_lib::MPI_Recv(®istrySize, 1, EP_LONG, rank, 15, CXios::globalComm, &status); 257 269 recvBuff = new char[registrySize]; 258 MPI_Recv(recvBuff, registrySize, MPI_CHAR, rank, 15, CXios::globalComm, &status);270 ep_lib::MPI_Recv(recvBuff, registrySize, EP_CHAR, rank, 15, CXios::globalComm, &status); 259 271 CBufferIn buffer(recvBuff, registrySize) ; 260 272 CRegistry recvRegistry;
Note: See TracChangeset
for help on using the changeset viewer.