Ignore:
Timestamp:
01/10/17 14:36:29 (7 years ago)
Author:
oabramkina
Message:

Intermeadiate version for merging with new server functionalities.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_olga/src/cxios.cpp

    r983 r1021  
    1616  string CXios::rootFile="./iodef.xml" ; 
    1717  string CXios::xiosCodeId="xios.x" ; 
    18   string CXios::xiosCodeIdPrm="xios.x.1" ; 
    19   string CXios::xiosCodeIdSnd="xios.x.2" ; 
     18//  string CXios::xiosCodeIdPrm="xios.x.1" ; 
     19//  string CXios::xiosCodeIdSnd="xios.x.2" ; 
    2020  string CXios::clientFile="./xios_client"; 
    2121  string CXios::serverFile="./xios_server"; 
    22   string CXios::serverPrimFile="./xios_server1"; 
    23   string CXios::serverScndFile="./xios_server2"; 
     22  string CXios::serverPrmFile="./xios_server1"; 
     23  string CXios::serverSndFile="./xios_server2"; 
    2424 
    2525  bool CXios::isClient ; 
    2626  bool CXios::isServer ; 
    27   int CXios::serverLevel = 0 ; 
     27//  int CXios::serverLevel = 0 ; 
    2828  MPI_Comm CXios::globalComm ; 
    2929  bool CXios::usingOasis ; 
    3030  bool CXios::usingServer = false; 
     31  bool CXios::usingServer2 = false; 
     32  int CXios::ratioServer2 = 50; 
    3133  double CXios::bufferSizeFactor = 1.0; 
    3234  const double CXios::defaultBufferSizeFactor = 1.0; 
     
    5254    usingOasis=getin<bool>("using_oasis",false) ; 
    5355    usingServer=getin<bool>("using_server",false) ; 
     56    usingServer2=getin<bool>("using_server2",false) ; 
     57    ratioServer2=getin<int>("ratio_server2",50); 
    5458    info.setLevel(getin<int>("info_level",0)) ; 
    5559    report.setLevel(getin<int>("info_level",50)); 
     
    135139  { 
    136140    initServer(); 
    137     if (serverLvl == 1) 
     141 
     142//    if (serverLvl == 1) 
     143//      isClient = true; 
     144//    else 
     145//      isClient = false; 
     146// 
     147//    isServer = true; 
     148//    serverLevel = serverLvl; 
     149 
     150 
     151 
     152    // Initialize all aspects MPI 
     153    CServer::initialize(); 
     154    isServer = true; 
     155    if (CServer::serverLevel == 1) 
    138156      isClient = true; 
    139157    else 
    140158      isClient = false; 
    141159 
    142     isServer = true; 
    143     serverLevel = serverLvl; 
    144  
    145     // Initialize all aspects MPI 
    146     CServer::initialize(); 
    147160    if (CServer::getRank()==0) globalRegistry = new CRegistry(CServer::intraComm) ; 
    148161     
    149162    if (printLogs2Files) 
    150163    { 
    151       if (CXios::serverLevel == 0) 
     164      if (CServer::serverLevel == 0) 
     165//      if (CXios::serverLevel == 0) 
    152166      { 
    153167        CServer::openInfoStream(serverFile); 
    154168        CServer::openErrorStream(serverFile); 
    155169      } 
    156       else if (CXios::serverLevel == 1) 
     170      else if (CServer::serverLevel == 1) 
     171//      else if (CXios::serverLevel == 1) 
    157172      { 
    158         CServer::openInfoStream(serverPrimFile); 
    159         CServer::openErrorStream(serverPrimFile); 
     173        CServer::openInfoStream(serverPrmFile); 
     174        CServer::openErrorStream(serverPrmFile); 
    160175      } 
    161176      else 
    162177      { 
    163         CServer::openInfoStream(serverScndFile); 
    164         CServer::openErrorStream(serverScndFile); 
     178        CServer::openInfoStream(serverSndFile); 
     179        CServer::openErrorStream(serverSndFile); 
    165180      } 
    166181    } 
     
    197212  } 
    198213 
    199   //! Set using secondary server 
    200 //  void CXios::setUsingSecondaryServer() 
    201 //  { 
    202 //    usingSecondaryServer = true; 
    203 //  } 
    204  
    205214  //! Unset using server 
    206215  void CXios::setNotUsingServer() 
Note: See TracChangeset for help on using the changeset viewer.