Changeset 1316 for XIOS/dev


Ignore:
Timestamp:
10/25/17 19:07:41 (7 years ago)
Author:
ymipsl
Message:

Modify registry configuration. The name of the context added automatically to the key will the same for client than for servers.

YM

Location:
XIOS/dev/XIOS_DEV_CMIP6/src/node
Files:
2 edited

Legend:

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

    r1255 r1316  
    251251     hasClient = true; 
    252252     MPI_Comm intraCommServer, interCommServer; 
     253      
    253254 
    254255     if (CServer::serverLevel != 1) 
     
    268269         comms.push_back(interCommServer); 
    269270       } 
     271/* for registry take the id of client context */ 
     272/* for servers, supress the _server_ from id  */ 
     273       string contextRegistryId=getId() ; 
     274       size_t pos=contextRegistryId.find("_server_") ; 
     275       if (pos!=std::string::npos)  contextRegistryId=contextRegistryId.substr(0,pos) ; 
     276 
    270277       registryIn=new CRegistry(intraComm); 
    271        registryIn->setPath(getId()) ; 
     278       registryIn->setPath(contextRegistryId) ; 
    272279       if (client->clientRank==0) registryIn->fromFile("xios_registry.bin") ; 
    273280       registryIn->bcastRegistry() ; 
    274281       registryOut=new CRegistry(intraComm) ; 
    275        registryOut->setPath(getId()) ; 
     282        
     283       registryOut->setPath(contextRegistryId) ; 
    276284 
    277285       server = new CContextServer(this, intraCommServer, interCommServer); 
     
    350358     server = new CContextServer(this,intraComm,interComm); 
    351359 
     360/* for registry take the id of client context */ 
     361/* for servers, supress the _server_ from id  */ 
     362     string contextRegistryId=getId() ; 
     363     size_t pos=contextRegistryId.find("_server_") ; 
     364     if (pos!=std::string::npos)  contextRegistryId=contextRegistryId.substr(0,pos) ; 
     365        
    352366     registryIn=new CRegistry(intraComm); 
    353      registryIn->setPath(getId()) ; 
     367     registryIn->setPath(contextRegistryId) ; 
    354368     if (server->intraCommRank==0) registryIn->fromFile("xios_registry.bin") ; 
    355369     registryIn->bcastRegistry() ; 
    356370     registryOut=new CRegistry(intraComm) ; 
    357      registryOut->setPath(getId()) ; 
     371     registryOut->setPath(contextRegistryId) ; 
    358372 
    359373     MPI_Comm intraCommClient, interCommClient; 
  • XIOS/dev/XIOS_DEV_CMIP6/src/node/file.cpp

    r1294 r1316  
    218218      if (!split_freq.isEmpty()) 
    219219      { 
    220         StdString keySuffix("CContext_"+CContext::getCurrent()->getId()+"::CFile_"+getFileOutputName()+"::") ;  
     220        StdString keySuffix("CFile::"+getFileOutputName()+"::") ;  
    221221        if (context->registryIn->foundKey(keySuffix+"splitStart") && context->registryIn->foundKey(keySuffix+"splitEnd")) 
    222222        { 
     
    494494           oss << lastPart ; 
    495495 
    496            StdString keySuffix("CContext_"+CContext::getCurrent()->getId()+"::CFile_"+getFileOutputName()+"::") ;  
     496           StdString keySuffix("CFile::"+getFileOutputName()+"::") ;  
    497497           context->registryOut->setKey(keySuffix+"splitStart", lastSplit); 
    498498           context->registryOut->setKey(keySuffix+"splitEnd",   splitEnd); 
Note: See TracChangeset for help on using the changeset viewer.