Changeset 1072 for XIOS/dev/branch_yushan/src/client.cpp
- Timestamp:
- 03/14/17 19:12:25 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan/src/client.cpp
r1070 r1072 39 39 if (!is_MPI_Initialized) 40 40 { 41 MPI_Init(NULL, NULL); 41 //MPI_Init(NULL, NULL); 42 int return_level; 43 MPI_Init_thread(NULL, NULL, 3, &return_level); 44 assert(return_level == 3); 42 45 } 43 46 CTimer::get("XIOS").resume() ; … … 46 49 47 50 unsigned long hashClient=hashString(codeId) ; 48 unsigned long hashServer=hashString(CXios::xiosCodeId) ; 51 unsigned long hashServer; //=hashString(CXios::xiosCodeId) ; 52 hashServer=hashString("xios.x") ; 49 53 unsigned long* hashAll ; 50 54 int size ; … … 96 100 MPI_Comm_size(intraComm,&intraCommSize) ; 97 101 MPI_Comm_rank(intraComm,&intraCommRank) ; 98 info(50)<<"intercommCreate::client "<<rank<<" intraCommSize : "<<intraCommSize 99 <<" intraCommRank :"<<intraCommRank<<" serverLeader "<< serverLeader<<endl ; 102 #pragma omp critical(_output) 103 { 104 info(50)<<"intercommCreate::client "<<rank<<" intraCommSize : "<<intraCommSize 105 <<" intraCommRank :"<<intraCommRank<<" serverLeader "<< serverLeader<<endl ; 106 } 107 100 108 MPI_Intercomm_create(intraComm,0,CXios::globalComm,serverLeader,0,&interComm) ; 109 101 110 } 102 111 else … … 289 298 290 299 fileNameClient << fileName << "_" << std::setfill('0') << std::setw(numDigit) << getRank() << ext; 291 fb->open(fileNameClient.str().c_str(), std::ios::out); 292 if (!fb->is_open()) 293 ERROR("void CClient::openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb)", 294 << std::endl << "Can not open <" << fileNameClient << "> file to write the client log(s)."); 300 printf("getrank() = %d, file name = %s\n", getRank(), fileNameClient.str().c_str()); 301 #pragma omp critical(_output) 302 { 303 fb->open(fileNameClient.str().c_str(), std::ios::out); 304 if (!fb->is_open()) 305 ERROR("void CClient::openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb)", 306 << std::endl << "Can not open <" << fileNameClient << "> file to write the client log(s)."); 307 } 308 295 309 } 296 310
Note: See TracChangeset
for help on using the changeset viewer.