Ignore:
Timestamp:
01/23/19 10:31:44 (5 years ago)
Author:
yushan
Message:

dev on ADA. add flag switch _usingEP/_usingMPI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/src/dht_auto_indexing.cpp

    r1328 r1642  
    88 */ 
    99#include "dht_auto_indexing.hpp" 
    10 using namespace ep_lib; 
    1110 
    1211namespace xios 
     
    2322 
    2423  CDHTAutoIndexing::CDHTAutoIndexing(const CArray<size_t,1>& hashValue, 
    25                                      const MPI_Comm& clientIntraComm) 
     24                                     const ep_lib::MPI_Comm& clientIntraComm) 
    2625    : CClientClientDHTTemplate<size_t>(clientIntraComm) 
    2726  { 
     
    2928    nbIndexOnProc_ = hashValue.size(); 
    3029    size_t nbIndexAccum; 
    31     MPI_Scan(&nbIndexOnProc_, &nbIndexAccum, 1, MPI_UNSIGNED_LONG, MPI_SUM, clientIntraComm); 
     30    ep_lib::MPI_Scan(&nbIndexOnProc_, &nbIndexAccum, 1, EP_UNSIGNED_LONG, EP_SUM, clientIntraComm); 
    3231 
    3332    // Broadcasting the total number of indexes 
    3433    int rank, size; 
    35     MPI_Comm_rank(clientIntraComm, &rank); 
    36     MPI_Comm_size(clientIntraComm, &size); 
     34    ep_lib::MPI_Comm_rank(clientIntraComm, &rank); 
     35    ep_lib::MPI_Comm_size(clientIntraComm, &size); 
    3736    if (rank == (size-1)) nbIndexesGlobal_ = nbIndexAccum; 
    38     MPI_Bcast(&nbIndexesGlobal_, 1, MPI_UNSIGNED_LONG, size-1, clientIntraComm); 
     37    ep_lib::MPI_Bcast(&nbIndexesGlobal_, 1, EP_UNSIGNED_LONG, size-1, clientIntraComm); 
    3938 
    4039    CArray<size_t,1>::const_iterator itbIdx = hashValue.begin(), itIdx, 
     
    5958  */ 
    6059  CDHTAutoIndexing::CDHTAutoIndexing(Index2VectorInfoTypeMap& hashInitMap, 
    61                                      const MPI_Comm& clientIntraComm) 
     60                                     const ep_lib::MPI_Comm& clientIntraComm) 
    6261    : CClientClientDHTTemplate<size_t>(clientIntraComm) 
    6362  { 
     
    6564    nbIndexOnProc_ = hashInitMap.size(); 
    6665    size_t nbIndexAccum; 
    67     MPI_Scan(&nbIndexOnProc_, &nbIndexAccum, 1, MPI_UNSIGNED_LONG, MPI_SUM, clientIntraComm); 
     66    ep_lib::MPI_Scan(&nbIndexOnProc_, &nbIndexAccum, 1, EP_UNSIGNED_LONG, EP_SUM, clientIntraComm); 
    6867 
    6968    int rank, size; 
    70     MPI_Comm_rank(clientIntraComm, &rank); 
    71     MPI_Comm_size(clientIntraComm, &size); 
     69    ep_lib::MPI_Comm_rank(clientIntraComm, &rank); 
     70    ep_lib::MPI_Comm_size(clientIntraComm, &size); 
    7271    if (rank == (size-1)) nbIndexesGlobal_ = nbIndexAccum; 
    73     MPI_Bcast(&nbIndexesGlobal_, 1, MPI_UNSIGNED_LONG, size-1, clientIntraComm); 
     72    ep_lib::MPI_Bcast(&nbIndexesGlobal_, 1, EP_UNSIGNED_LONG, size-1, clientIntraComm); 
    7473 
    7574    Index2VectorInfoTypeMap::iterator itbIdx = hashInitMap.begin(), itIdx, 
Note: See TracChangeset for help on using the changeset viewer.