Changeset 1079 for XIOS/dev/branch_yushan/src/client.cpp
- Timestamp:
- 03/17/17 18:02:20 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan/src/client.cpp
r1074 r1079 38 38 // localComm doesn't given 39 39 40 printf("check : localComm == MPI_COMM_NULL = %d\n", localComm == MPI_COMM_NULL);41 42 40 if (localComm == MPI_COMM_NULL) 43 41 { … … 69 67 MPI_Comm_rank(CXios::globalComm,&rank); 70 68 71 printf("client init : codeId = %s, xiosCodeId = %s, rank = %d(%d), size = %d\n", codeId, CXios::xiosCodeId, rank, omp_get_thread_num(), size);69 printf("client init : rank = %d, size = %d\n", rank, size); 72 70 73 71 … … 107 105 if (CXios::usingServer) 108 106 { 109 int clientLeader=leaders[hashClient] ;107 //int clientLeader=leaders[hashClient] ; 110 108 serverLeader=leaders[hashServer] ; 111 109 … … 116 114 { 117 115 info(50)<<"intercommCreate::client "<<rank<<" intraCommSize : "<<intraCommSize 118 <<" intraCommRank :"<<intraCommRank<<" serverLeader "<< serverLeader<<endl ; 116 <<" intraCommRank :"<<intraCommRank<<" serverLeader "<< serverLeader 117 <<" globalComm : "<< &(CXios::globalComm) << endl ; 119 118 } 120 119 121 120 MPI_Intercomm_create(intraComm,0,CXios::globalComm,serverLeader,0,&interComm) ; 121 122 int interCommSize, interCommRank ; 123 MPI_Comm_size(interComm,&interCommSize) ; 124 MPI_Comm_rank(interComm,&interCommRank) ; 125 126 #pragma omp critical(_output) 127 { 128 info(50)<<" interCommRank :"<<interCommRank 129 <<" interCommSize : "<< interCommSize << endl ; 130 } 131 122 132 123 133 } … … 176 186 void CClient::registerContext(const string& id,MPI_Comm contextComm) 177 187 { 188 //info(50) << "Client "<<getRank() << " start registerContext using info output" << endl; 189 printf("Client %d start registerContext\n", getRank()); 190 //printf("Client start registerContext\n"); 191 178 192 CContext::setCurrent(id) ; 179 CContext* context=CContext::create(id); 193 printf("Client %d CContext::setCurrent OK\n", getRank()); 194 CContext* context = CContext::create(id); 195 printf("Client %d context=CContext::create(%s) OK\n", getRank(), id); 196 180 197 StdString idServer(id); 181 198 idServer += "_server"; 182 199 183 if (!CXios::isServer) 200 if (!CXios::isServer) // server mode 184 201 { 185 202 int size,rank,globalRank ; … … 211 228 212 229 MPI_Intercomm_create(contextComm,0,CXios::globalComm,serverLeader,10+globalRank,&contextInterComm) ; 213 //info(10)<<"Register new Context : "<<id<<endl ; 230 231 #pragma omp critical (_output) 232 info(10)<<"Register new Context : "<<id<<endl ; 214 233 215 234 … … 217 236 MPI_Intercomm_merge(contextInterComm,0,&inter) ; 218 237 MPI_Barrier(inter) ; 238 239 #pragma omp critical (_output) 240 printf("Client %d : MPI_Intercomm_merge OK \n", getRank()) ; 219 241 220 242 221 243 context->initClient(contextComm,contextInterComm) ; 244 #pragma omp critical (_output) 245 printf("Client %d : context->initClient(contextComm,contextInterComm) OK \n", getRank()) ; 222 246 223 247 … … 225 249 MPI_Comm_free(&inter); 226 250 } 227 else 251 else // attached mode 228 252 { 229 253 MPI_Comm contextInterComm ;
Note: See TracChangeset
for help on using the changeset viewer.