Changeset 510


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

Implementing buffer-size automatic detection in mode connected server-client (client is also server)

+) Rearrange some functions to make sure they work in both cases: connected and seperated
+) Make some cleans of code

Test
+) On Curie
+) Both modes, all tests pass

Location:
XIOS/trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/interface/c/icdata.cpp

    r509 r510  
    9292     CTimer::get("XIOS close definition").resume() ; 
    9393     CContext* context = CContext::getCurrent() ; 
    94 //     context->setClientServerBuffer(); 
    9594     context->closeDefinition() ; 
    9695     CTimer::get("XIOS close definition").suspend() ; 
  • XIOS/trunk/src/node/context.cpp

    r509 r510  
    337337   void CContext::closeDefinition(void) 
    338338   { 
    339      if (hasClient && !hasServer) 
     339     if (hasClient) 
    340340     { 
    341341       // After xml is parsed, there are some more works with post processing 
    342342       postProcessing(); 
    343  
     343// 
    344344       setClientServerBuffer(); 
     345     } 
     346 
     347     if (hasClient && !hasServer) 
     348     { 
     349       // After xml is parsed, there are some more works with post processing 
     350//       postProcessing(); 
     351 
     352//       setClientServerBuffer(); 
    345353 
    346354      // Send all attributes of current context to server 
     
    368376 
    369377    // There are some processings that should be done after all of above. For example: check mask or index 
    370     if (hasClient && !hasServer) 
     378//    if (hasClient && !hasServer) 
     379    if (hasClient) 
    371380    { 
    372381      this->solveAllRefOfEnabledFields(true); 
    373382      this->buildAllExpressionOfEnabledFields(); 
    374383    } 
     384 
     385 
    375386 
    376387//      if (hasClient) 
     
    482493      const vector<CFile*> allFiles=CFile::getAll() ; 
    483494 
    484      if (hasClient && !hasServer) 
    485       for (unsigned int i = 0; i < allFiles.size(); i++) 
    486          allFiles[i]->solveFieldRefInheritance(apply); 
     495     //if (hasClient && !hasServer) 
     496      if (hasClient) 
     497        for (unsigned int i = 0; i < allFiles.size(); i++) 
     498          allFiles[i]->solveFieldRefInheritance(apply); 
    487499   } 
    488500 
     
    686698     if (isPostProcessed) return; 
    687699 
    688      this->solveCalendar(); 
    689  
    690700     // Solve calendar for both side: client and server 
    691701      this->solveCalendar(); 
  • XIOS/trunk/src/node/field.cpp

    r509 r510  
    401401     { 
    402402        areAllReferenceSolved = true; 
    403         if (!context->hasServer) 
     403        if (context->hasClient) 
    404404        { 
    405405          solveRefInheritance(true); 
  • XIOS/trunk/src/node/grid.cpp

    r509 r510  
    177177       if (this->withAxis) retVal *= this->axis->size.getValue(); 
    178178       retVal *= sizeof(double); 
     179       retVal *= 1.2; // Secure factor 
    179180       ret.insert(make_pair(it->first, retVal)); 
    180181     } 
  • XIOS/trunk/src/test/test_xios_interface.f90

    r501 r510  
    1414  TYPE(xios_time)      :: dtime 
    1515  TYPE(xios_context) :: ctx_hdl 
    16   INTEGER,PARAMETER :: ni_glo=100 
    17   INTEGER,PARAMETER :: nj_glo=100 
     16  INTEGER,PARAMETER :: ni_glo=10 
     17  INTEGER,PARAMETER :: nj_glo=10 
    1818  INTEGER,PARAMETER :: llm=5 
    1919  DOUBLE PRECISION  :: lval(llm)=1 
     
    219219 
    220220!!! Fin de la definition du contexte SRF 
    221  
    222   CALL xios_close_context_definition() 
    223  
    224  
    225221!------------------------------------------------------------------------------- 
    226222! 
     
    228224! 
    229225!------------------------------------------------------------------------------- 
    230  
    231  !! Be sure in the correct context 
    232   CALL xios_get_handle("surface",ctx_hdl) 
    233   CALL xios_set_current_context(ctx_hdl) 
    234226 
    235227  !! Try getting some variable values 
     
    299291    print*, "New value of ", var_id, " is : ", var_val_bool 
    300292  end if 
     293! 
     294!!!! Fin de la definition du contexte SRF 
     295  CALL xios_close_context_definition() 
    301296 
    302297!#################################################################################### 
Note: See TracChangeset for help on using the changeset viewer.