Ignore:
Timestamp:
11/13/14 15:09:28 (9 years ago)
Author:
mhnguyen
Message:

Seperating database of context on "client" side and "server" side

+) Add one more context in contex client in case of attached mode
+) Do some minor changements to make sure everything fine in case of attached mode
+) Replace buffer group with the new options

Test
+) On Curie
+) Connection mode: Attached and seperated
+) File mode: one and multiple
+) All tests passed

File:
1 edited

Legend:

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

    r506 r511  
    132132        CTimer::get("XIOS").resume() ; 
    133133        CTimer::get("XIOS init").resume() ; 
    134    
    135         if (CXios::usingServer)  
     134 
     135        if (CXios::usingServer) 
    136136        { 
    137137          MPI_Status status ; 
     
    153153    { 
    154154      CContext::setCurrent(id) ; 
    155       CContext* context=CContext::create(id) ; 
     155      CContext* context=CContext::create(id); 
     156      StdString idServer(id); 
     157      idServer += "_server"; 
    156158 
    157159      if (!CXios::isServer) 
     
    169171 
    170172        CMessage msg ; 
    171         msg<<id<<size<<globalRank ; 
     173        msg<<idServer<<size<<globalRank ; 
     174//        msg<<id<<size<<globalRank ; 
    172175 
    173176        int messageSize=msg.size() ; 
     
    192195        MPI_Comm contextInterComm ; 
    193196        MPI_Comm_dup(contextComm,&contextInterComm) ; 
    194         context->initClient(contextComm,contextInterComm) ; 
    195         context->initServer(contextComm,contextInterComm) ; 
     197        CContext* contextServer = CContext::create(idServer); 
     198 
     199        // Firstly, initialize context on client side 
     200        context->initClient(contextComm,contextInterComm, contextServer); 
     201 
     202 
     203        // Secondly, initialize context on server side 
     204        contextServer->initServer(contextComm,contextInterComm); 
     205 
     206        // Finally, we should return current context to context client 
     207        CContext::setCurrent(id); 
     208//        context->initServer(contextComm,contextInterComm) ; 
    196209      } 
    197210    } 
     
    223236      report(0)<< " Performance report : Ratio : "<< CTimer::get("Blocking time").getCumulatedTime()/CTimer::get("XIOS").getCumulatedTime()*100.<<" %"<<endl ; 
    224237      report(0)<< " Performance report : This ratio must be close to zero. Otherwise it may be usefull to increase buffer size or numbers of server"<<endl ; 
    225       report(0)<< " Memory report : Current buffer_size : "<<CXios::bufferSize<<endl ; 
    226       report(0)<< " Memory report : Minimum buffer size required : "<<maxRequestSize*2<<endl ; 
     238//      report(0)<< " Memory report : Current buffer_size : "<<CXios::bufferSize<<endl ; 
     239      report(0)<< " Memory report : Minimum buffer size required : "<<maxRequestSize*2<< " bytes" << endl ; 
    227240      report(0)<< " Memory report : increasing it by a factor will increase performance, depending of the volume of data wrote in file at each time step of the file"<<endl ; 
    228241   } 
Note: See TracChangeset for help on using the changeset viewer.