Ignore:
Timestamp:
10/06/15 17:17:11 (7 years ago)
Author:
mhnguyen
Message:

Templated version of distributed hashed table

+) Implement DHT in more generic way to work with different type of information
+) Some old codes of DHT are kept to be a reference (they will be deleted soon)

Test
+) On local, mode attached, 8 processes
+) test_remap passes and result is correct

File:
1 edited

Legend:

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

    r720 r721  
    1818#include "grid_transformation.hpp" 
    1919#include "grid_generate.hpp" 
    20 #include "client_client_dht.hpp" 
    2120 
    2221namespace xios { 
     
    396395                                                            clientDistribution_->isDataDistributed()); 
    397396 
    398      CClientClientDHT clientDht(serverDistributionDescription.getGlobalIndexRange(), 
    399                                 client->intraComm, 
    400                                 clientDistribution_->isDataDistributed()); 
    401      clientDht.computeServerIndexMapping(clientDistribution_->getGlobalIndex()); 
    402      const std::map<int, std::vector<size_t> >& globalIndexOnServer0 = clientDht.getGlobalIndexOnServer(); 
    403  
    404      std::map<int, std::vector<size_t> >::const_iterator itbTmp, itTmp, iteTmp; 
    405      itbTmp = globalIndexOnServer0.begin(); iteTmp = globalIndexOnServer0.end(); 
    406      for (itTmp = itbTmp; itTmp != iteTmp; ++itTmp) 
    407      { 
    408        const std::vector<size_t>& tmpVec = itTmp->second; info << "tmpVec0. Rank " << itTmp->first << ". Size = " << tmpVec.size() << ". "  ; 
    409        for (int i = 0; i < tmpVec.size(); ++i) info << tmpVec[i] << " "; 
    410        info << std::endl; 
    411      } 
    412 // 
    413397     clientServerMap_->computeServerIndexMapping(clientDistribution_->getGlobalIndex()); 
    414398     const std::map<int, std::vector<size_t> >& globalIndexOnServer = clientServerMap_->getGlobalIndexOnServer(); 
    415  
    416      itbTmp = globalIndexOnServer.begin(); iteTmp = globalIndexOnServer.end(); 
    417      for (itTmp = itbTmp; itTmp != iteTmp; ++itTmp) 
    418      { 
    419        const std::vector<size_t>& tmpVec = itTmp->second; info << "tmpVec1. Rank " << itTmp->first << ". Size = " << tmpVec.size() << ". "  ; 
    420        for (int i = 0; i < tmpVec.size(); ++i) info << tmpVec[i] << " "; 
    421        info << std::endl; 
    422      } 
    423399 
    424400     const std::vector<size_t>& globalIndexSendToServer = clientDistribution_->getGlobalDataIndexSendToServer(); 
Note: See TracChangeset for help on using the changeset viewer.