Ignore:
Timestamp:
11/02/15 11:46:25 (9 years ago)
Author:
mhnguyen
Message:

Implementing the reading of attributes of an axis from a file

+) 3d grid can be read directly from a file
+) Clean some redundant codes
+) Add new attribute declaration that allows to output only desired attributes

Test
+) On Curie
+) test_remap passes and result is correct

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/context.cpp

    r773 r775  
    313313     registryOut=new CRegistry(intraComm) ; 
    314314     registryOut->setPath(getId()) ; 
    315   
     315 
    316316     MPI_Comm intraCommClient, interCommClient; 
    317317     if (cxtClient) // Attached mode 
     
    362362          if (server->intraCommRank==0) CXios::globalRegistry->mergeRegistry(*registryOut) ; 
    363363        } 
    364          
     364 
    365365        for (std::list<MPI_Comm>::iterator it = comms.begin(); it != comms.end(); ++it) 
    366366          MPI_Comm_free(&(*it)); 
     
    439439     for (unsigned int i = 0; i < this->enabledFiles.size(); i++) 
    440440     (void)this->enabledFiles[i]->getEnabledFields(); 
     441   } 
     442 
     443   void CContext::findAllEnabledFieldsInReadModeFiles(void) 
     444   { 
     445     for (unsigned int i = 0; i < this->enabledReadModeFiles.size(); ++i) 
     446     (void)this->enabledReadModeFiles[i]->getEnabledFields(); 
     447   } 
     448 
     449   void CContext::readAttributesOfEnabledFieldsInReadModeFiles() 
     450   { 
     451      for (unsigned int i = 0; i < this->enabledReadModeFiles.size(); ++i) 
     452        (void)this->enabledReadModeFiles[i]->readAttributesOfEnabledFieldsInReadMode(); 
    441453   } 
    442454 
     
    785797      // Find all enabled fields of each file 
    786798      this->findAllEnabledFields(); 
    787  
     799      this->findAllEnabledFieldsInReadModeFiles(); 
     800 
     801     if (hasClient && !hasServer) 
     802     { 
     803      // Try to read attributes of fields in file then fill in corresponding grid (or domain, axis) 
     804      this->readAttributesOfEnabledFieldsInReadModeFiles(); 
     805     } 
    788806      // Search and rebuild all reference object of enabled fields 
    789807      this->solveAllRefOfEnabledFields(false); 
     
    10531071      if (hasClient) 
    10541072      { 
    1055         checkPrefetchingOfEnabledReadModeFiles(); 
     1073        //checkPrefetchingOfEnabledReadModeFiles(); 
    10561074        garbageCollector.invalidate(calendar->getCurrentDate()); 
    10571075      } 
Note: See TracChangeset for help on using the changeset viewer.