Ignore:
Timestamp:
10/09/14 12:28:25 (10 years ago)
Author:
mhnguyen
Message:

Making a minor change of info output

+) Use a more beautiful format for name of info output file
+) Do a same thing to error file

Test
+) On curie
+) Passed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/client.cpp

    r493 r497  
    249249       std::filebuf* fb = m_infoStream.rdbuf(); 
    250250       StdStringStream fileNameClient; 
    251        fileNameClient << fileName <<"_client_" << getRank() << ".out"; 
     251       int numDigit = 0; 
     252       int size = 0; 
     253       MPI_Comm_size(CXios::globalComm, &size); 
     254       while (size) 
     255       { 
     256         size /= 10; 
     257         ++numDigit; 
     258       } 
     259 
     260       fileNameClient << fileName <<"_client_" << std::setfill('0') << std::setw(numDigit) << getRank() << ".out"; 
    252261       fb->open(fileNameClient.str().c_str(), std::ios::out); 
    253262       if (!fb->is_open()) 
Note: See TracChangeset for help on using the changeset viewer.