Changeset 499
- Timestamp:
- 10/09/14 12:28:27 (10 years ago)
- Location:
- XIOS/trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/client.cpp
r497 r499 258 258 } 259 259 260 fileNameClient << fileName << "_client_" << std::setfill('0') << std::setw(numDigit) << getRank() << ".out";260 fileNameClient << fileName << "_" << std::setfill('0') << std::setw(numDigit) << getRank() << ".out"; 261 261 fb->open(fileNameClient.str().c_str(), std::ios::out); 262 262 if (!fb->is_open()) … … 265 265 266 266 info.write2File(fb); 267 report.write2File(fb); 267 268 } 268 269 … … 271 272 { 272 273 info.write2StdOut(); 274 report.write2StdOut(); 273 275 } 274 276 -
XIOS/trunk/src/cxios.cpp
r497 r499 15 15 string CXios::rootFile="./iodef.xml" ; 16 16 string CXios::xiosCodeId="xios.x" ; 17 string CXios:: infoFile="./info_output";18 string CXios:: errorFile="./error_output";17 string CXios::clientFile="./xios_client"; 18 string CXios::serverFile="./xios_server"; 19 19 20 20 bool CXios::isClient ; … … 28 28 double CXios::defaultBufferServerFactorSize=2 ; 29 29 bool CXios::printInfo2File; 30 bool CXios::isServerSide; 30 31 31 32 … … 52 53 CClient::initialize(codeId,localComm,returnComm) ; 53 54 54 if (usingServer) isServer =false;55 else isServer =true;55 if (usingServer) isServerSide = isServer=false; 56 else isServerSide = isServer=true; 56 57 57 58 if (printInfo2File) 58 CClient::openInfoStream( infoFile);59 CClient::openInfoStream(clientFile); 59 60 else 60 61 CClient::openInfoStream(); … … 76 77 { 77 78 initialize(); 79 78 80 isClient=true; 79 81 isServer=false ; 82 83 isServerSide = true; 80 84 81 85 // Initialize all aspects MPI … … 83 87 84 88 if (printInfo2File) 85 CServer::openInfoStream( infoFile);89 CServer::openInfoStream(serverFile); 86 90 else 87 91 CServer::openInfoStream(); -
XIOS/trunk/src/cxios.hpp
r497 r499 13 13 static string rootFile ; 14 14 static string xiosCodeId ; 15 static string infoFile;16 static string errorFile;15 static string clientFile; 16 static string serverFile; 17 17 18 18 static void initialize(void) ; … … 44 44 45 45 public: 46 47 46 //! Setting xios to use server mode 47 static void setUsingServer(); 48 48 49 //! Setting xios NOT to use server mode 50 static void setNotUsingServer(); 49 //! Setting xios NOT to use server mode 50 static void setNotUsingServer(); 51 52 //! A silly variable to detect whether one process is in client or server side. Should be removed on refactoring code 53 static bool isServerSide; 51 54 52 55 } ; -
XIOS/trunk/src/exception.cpp
r497 r499 34 34 #else 35 35 { 36 int numDigit = 0; 37 int size = 0; 38 MPI_Comm_size(CXios::globalComm, &size); 39 while (size) 40 { 41 size /= 10; 42 ++numDigit; 43 } 44 36 45 StdOFStream fileStream; 37 46 StdStringStream fileNameErr; 38 47 std::streambuf* psbuf; 39 if (CXios::isClient) fileNameErr<< CXios::errorFile <<"_client_" << CClient::getRank() << ".err"; 40 else fileNameErr<< CXios::errorFile <<"_server_" << CServer::getRank() << ".err"; 48 if (CXios::isServerSide) 49 fileNameErr << CXios::serverFile << "_" << std::setfill('0') 50 << std::setw(numDigit) << CServer::getRank() << ".err"; 51 else 52 fileNameErr << CXios::clientFile << "_" << std::setfill('0') 53 << std::setw(numDigit) << CClient::getRank() << ".err"; 54 41 55 42 56 fileStream.open(fileNameErr.str().c_str(), std::ofstream::out); -
XIOS/trunk/src/server.cpp
r497 r499 425 425 } 426 426 427 fileNameServer << fileName <<"_ server_" << std::setfill('0') << std::setw(numDigit) << getRank() << ".out";427 fileNameServer << fileName <<"_" << std::setfill('0') << std::setw(numDigit) << getRank() << ".out"; 428 428 fb->open(fileNameServer.str().c_str(), std::ios::out); 429 429 if (!fb->is_open()) … … 432 432 433 433 info.write2File(fb); 434 report.write2File(fb); 434 435 } 435 436 … … 438 439 { 439 440 info.write2StdOut(); 441 report.write2StdOut(); 440 442 } 441 443
Note: See TracChangeset
for help on using the changeset viewer.