Ignore:
Timestamp:
08/08/17 20:21:43 (5 years ago)
Author:
mhnguyen
Message:

Correcting a minor bug on detecting server reading level

+) Reading server level should be 1 (for now). In the future, maybe level-2 server can be used
+) Correct nbReadSenders with the right ContextClient?

Test
+) On Curie
+) Work with toy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/node/context.cpp

    r1237 r1239  
    558558        sendEnabledFieldsInFiles(this->enabledReadModeFiles); 
    559559 
    560       // We have all info of domain, axis and scalar, so send them 
     560      // Then, check whether we have domain_ref, axis_ref or scalar_ref attached to the enabled fields 
     561      // If any, so send them to server 
    561562       sendRefDomainsAxisScalars(this->enabledWriteModeFiles); 
    562563      if (!hasServer) 
    563564        sendRefDomainsAxisScalars(this->enabledReadModeFiles);         
    564565 
    565        // After that, send all grid (if any) 
     566       // Check whether enabled fields have grid_ref, if any, send this info to server 
    566567      sendRefGrid(this->enabledFiles); 
    567568      // This code may be useful in the future when we want to seperate completely read and write 
     
    569570      // if (!hasServer) 
    570571      //   sendRefGrid(this->enabledReadModeFiles); 
     572       
     573      // A grid of enabled fields composed of several components which must be checked then their 
     574      // checked attributes should be sent to server 
     575      sendGridComponentEnabledFieldsInFiles(this->enabledFiles); // This code can be seperated in two (one for reading, another for writing) 
    571576 
    572577       // We have a xml tree on the server side and now, it should be also processed 
    573        sendPostProcessing(); 
     578      sendPostProcessing(); 
    574579        
    575        sendGridEnabledFieldsInFiles(this->enabledWriteModeFiles);        
    576        if (!hasServer) 
     580      // Finally, we send information of grid itself to server  
     581      sendGridEnabledFieldsInFiles(this->enabledWriteModeFiles);        
     582      if (!hasServer) 
    577583        sendGridEnabledFieldsInFiles(this->enabledReadModeFiles);        
    578584     } 
     
    669675      for (unsigned int i = 0; i < this->enabledReadModeFiles.size(); ++i) 
    670676        (void)this->enabledReadModeFiles[i]->readAttributesOfEnabledFieldsInReadMode(); 
     677   } 
     678 
     679   void CContext::sendGridComponentEnabledFieldsInFiles(const std::vector<CFile*>& activeFiles) 
     680   { 
     681     int size = activeFiles.size(); 
     682     for (int i = 0; i < size; ++i) 
     683     {        
     684       activeFiles[i]->sendGridComponentOfEnabledFields(); 
     685     } 
    671686   } 
    672687 
Note: See TracChangeset for help on using the changeset viewer.