Changeset 1233


Ignore:
Timestamp:
08/01/17 17:34:55 (7 years ago)
Author:
oabramkina
Message:

Correcting logfile names on client side in case of oasis. Now files are named according to rank in MPI_WORLD_COMM.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/client.cpp

    r1231 r1233  
    154154          if (rank_==0) MPI_Recv(&serverLeader,1, MPI_INT, 0, 0, interComm, &status) ; 
    155155          MPI_Bcast(&serverLeader,1,MPI_INT,0,intraComm) ; 
    156  
    157156        } 
    158157        else MPI_Comm_dup(intraComm,&interComm) ; 
     
    296295      int numDigit = 0; 
    297296      int size = 0; 
     297      int rank; 
    298298      MPI_Comm_size(CXios::globalComm, &size); 
    299299      while (size) 
     
    303303      } 
    304304 
    305       fileNameClient << fileName << "_" << std::setfill('0') << std::setw(numDigit) << getRank() << ext; 
     305      if (CXios::usingOasis) 
     306      { 
     307        MPI_Comm_rank(CXios::globalComm,&rank); 
     308        fileNameClient << fileName << "_" << std::setfill('0') << std::setw(numDigit) << rank << ext; 
     309      } 
     310      else 
     311        fileNameClient << fileName << "_" << std::setfill('0') << std::setw(numDigit) << getRank() << ext; 
     312 
     313 
    306314      fb->open(fileNameClient.str().c_str(), std::ios::out); 
    307315      if (!fb->is_open()) 
Note: See TracChangeset for help on using the changeset viewer.