Changeset 1336


Ignore:
Timestamp:
11/20/17 16:29:55 (3 years ago)
Author:
oabramkina
Message:

Changes in case of different number of processes per secondary-server pool.

No incorrect behaviour had been found in the previous versions; this commit is just to play safe.

Location:
XIOS/dev/XIOS_DEV_CMIP6/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/client_server_mapping.hpp

    r1158 r1336  
    3434 
    3535    // Only need global index on client to calculate mapping (supposed client has info of distribution) 
    36     virtual void computeServerIndexMapping(const CArray<size_t,1>& globalIndexOnClient) = 0; 
     36    virtual void computeServerIndexMapping(const CArray<size_t,1>& globalIndexOnClient, int nbServer) = 0; 
    3737 
    3838    static std::map<int,int> computeConnectedClients(int nbServer, int nbClient, 
  • XIOS/dev/XIOS_DEV_CMIP6/src/client_server_mapping_distributed.cpp

    r1054 r1336  
    3535   Compute mapping global index of server which client sends to. 
    3636   \param [in] globalIndexOnClient global index client has 
     37   \param [in] nbServer size of server's intracomm 
    3738*/ 
    38 void CClientServerMappingDistributed::computeServerIndexMapping(const CArray<size_t,1>& globalIndexOnClient) 
     39void CClientServerMappingDistributed::computeServerIndexMapping(const CArray<size_t,1>& globalIndexOnClient, int nbServer) 
    3940{ 
    40   CContext* context=CContext::getCurrent() ; 
    41 //  CContextClient* client=context->client ; 
    42   // For now the assumption is that secondary server pools consist of the same number of procs. 
    43   // CHANGE the line below if the assumption changes. 
    44   CContextClient* client = (0 != context->clientPrimServer.size()) ? context->clientPrimServer[0] : context->client; 
    45   int nbServer=client->serverSize; 
    4641 
    4742  ccDHT_->computeIndexInfoMapping(globalIndexOnClient); 
  • XIOS/dev/XIOS_DEV_CMIP6/src/client_server_mapping_distributed.hpp

    r835 r1336  
    3838                                    bool isDataDistributed = true); 
    3939 
    40     virtual void computeServerIndexMapping(const CArray<size_t,1>& globalIndexOnClientSendToServer); 
     40    virtual void computeServerIndexMapping(const CArray<size_t,1>& globalIndexOnClientSendToServer, int nbServer); 
    4141 
    4242    /** Default destructor */ 
  • XIOS/dev/XIOS_DEV_CMIP6/src/node/axis.cpp

    r1330 r1336  
    603603      // Find out the connection between client and server side 
    604604      CClientServerMapping* clientServerMap = new CClientServerMappingDistributed(serverDescription.getGlobalIndexRange(), client->intraComm); 
    605       clientServerMap->computeServerIndexMapping(globalIndex); 
     605      clientServerMap->computeServerIndexMapping(globalIndex, nbServer); 
    606606      CClientServerMapping::GlobalIndexMap& globalIndexAxisOnServer = clientServerMap->getGlobalIndexOnServer();       
    607607 
  • XIOS/dev/XIOS_DEV_CMIP6/src/node/domain.cpp

    r1330 r1336  
    18441844      CClientServerMapping* clientServerMap = new CClientServerMappingDistributed(serverDescription.getGlobalIndexRange(), 
    18451845                                                                                  client->intraComm); 
    1846       clientServerMap->computeServerIndexMapping(globalIndexDomain); 
     1846      clientServerMap->computeServerIndexMapping(globalIndexDomain, nbServer); 
    18471847      CClientServerMapping::GlobalIndexMap& globalIndexDomainOnServer = clientServerMap->getGlobalIndexOnServer(); 
    18481848 
  • XIOS/dev/XIOS_DEV_CMIP6/src/transformation/domain_algorithm_interpolate.cpp

    r1317 r1336  
    564564  } 
    565565 
    566   domainIndexClientClientMapping.computeServerIndexMapping(globalIndexInterp); 
     566  domainIndexClientClientMapping.computeServerIndexMapping(globalIndexInterp, client->serverSize); 
    567567  const CClientServerMapping::GlobalIndexMap& globalIndexInterpSendToClient = domainIndexClientClientMapping.getGlobalIndexOnServer(); 
    568568 
Note: See TracChangeset for help on using the changeset viewer.