Changeset 1638 for XIOS/trunk/src/node


Ignore:
Timestamp:
01/22/19 16:15:03 (6 years ago)
Author:
yushan
Message:

dev on ADA

Location:
XIOS/trunk/src/node
Files:
12 edited

Legend:

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

    r1637 r1638  
    130130     \return the number of indexes written by each server 
    131131   */ 
    132    int CAxis::getNumberWrittenIndexes(MPI_Comm writtenCom) 
     132   int CAxis::getNumberWrittenIndexes(ep_lib::MPI_Comm writtenCom) 
    133133   TRY 
    134134   { 
    135135     int writtenSize; 
    136      MPI_Comm_size(writtenCom, &writtenSize); 
     136     ep_lib::MPI_Comm_size(writtenCom, &writtenSize); 
    137137     return numberWrittenIndexes_[writtenSize]; 
    138138   } 
     
    143143     \return the total number of indexes written by the servers 
    144144   */ 
    145    int CAxis::getTotalNumberWrittenIndexes(MPI_Comm writtenCom) 
     145   int CAxis::getTotalNumberWrittenIndexes(ep_lib::MPI_Comm writtenCom) 
    146146   TRY 
    147147   { 
    148148     int writtenSize; 
    149      MPI_Comm_size(writtenCom, &writtenSize); 
     149     ep_lib::MPI_Comm_size(writtenCom, &writtenSize); 
    150150     return totalNumberWrittenIndexes_[writtenSize]; 
    151151   } 
     
    156156     \return the offset of indexes written by each server 
    157157   */ 
    158    int CAxis::getOffsetWrittenIndexes(MPI_Comm writtenCom) 
     158   int CAxis::getOffsetWrittenIndexes(ep_lib::MPI_Comm writtenCom) 
    159159   TRY 
    160160   { 
    161161     int writtenSize; 
    162      MPI_Comm_size(writtenCom, &writtenSize); 
     162     ep_lib::MPI_Comm_size(writtenCom, &writtenSize); 
    163163     return offsetWrittenIndexes_[writtenSize]; 
    164164   } 
    165165   CATCH_DUMP_ATTR 
    166166 
    167    CArray<int, 1>& CAxis::getCompressedIndexToWriteOnServer(MPI_Comm writtenCom) 
     167   CArray<int, 1>& CAxis::getCompressedIndexToWriteOnServer(ep_lib::MPI_Comm writtenCom) 
    168168   TRY 
    169169   { 
    170170     int writtenSize; 
    171      MPI_Comm_size(writtenCom, &writtenSize); 
     171     ep_lib::MPI_Comm_size(writtenCom, &writtenSize); 
    172172     return compressedIndexToWriteOnServer[writtenSize]; 
    173173   } 
     
    768768  CATCH_DUMP_ATTR 
    769769 
    770   void CAxis::computeWrittenCompressedIndex(MPI_Comm writtenComm) 
     770  void CAxis::computeWrittenCompressedIndex(ep_lib::MPI_Comm writtenComm) 
    771771  TRY 
    772772  { 
    773773    int writtenCommSize; 
    774     MPI_Comm_size(writtenComm, &writtenCommSize); 
     774    ep_lib::MPI_Comm_size(writtenComm, &writtenCommSize); 
    775775    if (compressedIndexToWriteOnServer.find(writtenCommSize) != compressedIndexToWriteOnServer.end()) 
    776776      return; 
     
    850850      { 
    851851              
    852         MPI_Allreduce(&numberWrittenIndexes_[writtenCommSize], &totalNumberWrittenIndexes_[writtenCommSize], 1, MPI_INT, MPI_SUM, writtenComm); 
    853         MPI_Scan(&numberWrittenIndexes_[writtenCommSize], &offsetWrittenIndexes_[writtenCommSize], 1, MPI_INT, MPI_SUM, writtenComm); 
     852        ep_lib::MPI_Allreduce(&numberWrittenIndexes_[writtenCommSize], &totalNumberWrittenIndexes_[writtenCommSize], 1, EP_INT, EP_SUM, writtenComm); 
     853        ep_lib::MPI_Scan(&numberWrittenIndexes_[writtenCommSize], &offsetWrittenIndexes_[writtenCommSize], 1, EP_INT, EP_SUM, writtenComm); 
    854854        offsetWrittenIndexes_[writtenCommSize] -= numberWrittenIndexes_[writtenCommSize]; 
    855855      } 
  • XIOS/trunk/src/node/axis.hpp

    r1637 r1638  
    6868         const std::set<StdString> & getRelFiles(void) const; 
    6969 
    70          int getNumberWrittenIndexes(MPI_Comm writtenCom); 
    71          int getTotalNumberWrittenIndexes(MPI_Comm writtenCom); 
    72          int getOffsetWrittenIndexes(MPI_Comm writtenCom); 
    73          CArray<int, 1>& getCompressedIndexToWriteOnServer(MPI_Comm writtenCom); 
     70         int getNumberWrittenIndexes(ep_lib::MPI_Comm writtenCom); 
     71         int getTotalNumberWrittenIndexes(ep_lib::MPI_Comm writtenCom); 
     72         int getOffsetWrittenIndexes(ep_lib::MPI_Comm writtenCom); 
     73         CArray<int, 1>& getCompressedIndexToWriteOnServer(ep_lib::MPI_Comm writtenCom); 
    7474 
    7575         std::map<int, StdSize> getAttributesBufferSize(CContextClient* client, const std::vector<int>& globalDim, int orderPositionInGrid, 
     
    113113 
    114114         void computeWrittenIndex(); 
    115          void computeWrittenCompressedIndex(MPI_Comm); 
     115         void computeWrittenCompressedIndex(ep_lib::MPI_Comm); 
    116116         bool hasTransformation(); 
    117117         void solveInheritanceTransformation(); 
  • XIOS/trunk/src/node/context.cpp

    r1622 r1638  
    265265 
    266266   //! Initialize client side 
    267    void CContext::initClient(MPI_Comm intraComm, MPI_Comm interComm, CContext* cxtServer /*= 0*/) 
     267   void CContext::initClient(ep_lib::MPI_Comm intraComm, ep_lib::MPI_Comm interComm, CContext* cxtServer /*= 0*/) 
    268268   TRY 
    269269   { 
    270270 
    271271     hasClient = true; 
    272      MPI_Comm intraCommServer, interCommServer; 
     272     ep_lib::MPI_Comm intraCommServer, interCommServer; 
    273273      
    274274 
     
    284284       else 
    285285       { 
    286          MPI_Comm_dup(intraComm, &intraCommServer); 
     286         ep_lib::MPI_Comm_dup(intraComm, &intraCommServer); 
    287287         comms.push_back(intraCommServer); 
    288          MPI_Comm_dup(interComm, &interCommServer); 
     288         ep_lib::MPI_Comm_dup(interComm, &interCommServer); 
    289289         comms.push_back(interCommServer); 
    290290       } 
     
    309309     { 
    310310       clientPrimServer.push_back(new CContextClient(this, intraComm, interComm)); 
    311        MPI_Comm_dup(intraComm, &intraCommServer); 
     311       ep_lib::MPI_Comm_dup(intraComm, &intraCommServer); 
    312312       comms.push_back(intraCommServer); 
    313        MPI_Comm_dup(interComm, &interCommServer); 
     313       ep_lib::MPI_Comm_dup(interComm, &interCommServer); 
    314314       comms.push_back(interCommServer); 
    315315       serverPrimServer.push_back(new CContextServer(this, intraCommServer, interCommServer)); 
     
    383383   CATCH_DUMP_ATTR 
    384384 
    385    void CContext::initServer(MPI_Comm intraComm, MPI_Comm interComm, CContext* cxtClient /*= 0*/) 
     385   void CContext::initServer(ep_lib::MPI_Comm intraComm, ep_lib::MPI_Comm interComm, CContext* cxtClient /*= 0*/) 
    386386   TRY 
    387387   { 
     
    402402     registryOut->setPath(contextRegistryId) ; 
    403403 
    404      MPI_Comm intraCommClient, interCommClient; 
     404     ep_lib::MPI_Comm intraCommClient, interCommClient; 
    405405     if (cxtClient) // Attached mode 
    406406     { 
     
    410410     else 
    411411     { 
    412        MPI_Comm_dup(intraComm, &intraCommClient); 
     412       ep_lib::MPI_Comm_dup(intraComm, &intraCommClient); 
    413413       comms.push_back(intraCommClient); 
    414        MPI_Comm_dup(interComm, &interCommClient); 
     414       ep_lib::MPI_Comm_dup(interComm, &interCommClient); 
    415415       comms.push_back(interCommClient); 
    416416     } 
     
    502502 
    503503         //! Free internally allocated communicators 
    504          for (std::list<MPI_Comm>::iterator it = comms.begin(); it != comms.end(); ++it) 
    505            MPI_Comm_free(&(*it)); 
     504         for (std::list<ep_lib::MPI_Comm>::iterator it = comms.begin(); it != comms.end(); ++it) 
     505           ep_lib::MPI_Comm_free(&(*it)); 
    506506         comms.clear(); 
    507507 
     
    544544 
    545545         //! Free internally allocated communicators 
    546          for (std::list<MPI_Comm>::iterator it = comms.begin(); it != comms.end(); ++it) 
    547            MPI_Comm_free(&(*it)); 
     546         for (std::list<ep_lib::MPI_Comm>::iterator it = comms.begin(); it != comms.end(); ++it) 
     547           ep_lib::MPI_Comm_free(&(*it)); 
    548548         comms.clear(); 
    549549 
     
    560560   TRY 
    561561   { 
    562      for (std::list<MPI_Comm>::iterator it = comms.begin(); it != comms.end(); ++it) 
    563        MPI_Comm_free(&(*it)); 
     562     for (std::list<ep_lib::MPI_Comm>::iterator it = comms.begin(); it != comms.end(); ++it) 
     563       ep_lib::MPI_Comm_free(&(*it)); 
    564564     comms.clear(); 
    565565   } 
  • XIOS/trunk/src/node/context.hpp

    r1622 r1638  
    8888      public : 
    8989         // Initialize server or client 
    90          void initClient(MPI_Comm intraComm, MPI_Comm interComm, CContext* cxtServer = 0); 
    91          void initServer(MPI_Comm intraComm, MPI_Comm interComm, CContext* cxtClient = 0); 
     90         void initClient(ep_lib::MPI_Comm intraComm, ep_lib::MPI_Comm interComm, CContext* cxtServer = 0); 
     91         void initServer(ep_lib::MPI_Comm intraComm, ep_lib::MPI_Comm interComm, CContext* cxtClient = 0); 
    9292         bool isInitialized(void); 
    9393 
     
    263263         StdString idServer_; 
    264264         CGarbageCollector garbageCollector; 
    265          std::list<MPI_Comm> comms; //!< Communicators allocated internally 
     265         std::list<ep_lib::MPI_Comm> comms; //!< Communicators allocated internally 
    266266 
    267267      public: // Some function maybe removed in the near future 
  • XIOS/trunk/src/node/domain.cpp

    r1637 r1638  
    9999     \return the number of indexes written by each server 
    100100   */ 
    101    int CDomain::getNumberWrittenIndexes(MPI_Comm writtenCom) 
     101   int CDomain::getNumberWrittenIndexes(ep_lib::MPI_Comm writtenCom) 
    102102   TRY 
    103103   { 
    104104     int writtenSize; 
    105      MPI_Comm_size(writtenCom, &writtenSize); 
     105     ep_lib::MPI_Comm_size(writtenCom, &writtenSize); 
    106106     return numberWrittenIndexes_[writtenSize]; 
    107107   } 
     
    112112     \return the total number of indexes written by the servers 
    113113   */ 
    114    int CDomain::getTotalNumberWrittenIndexes(MPI_Comm writtenCom) 
     114   int CDomain::getTotalNumberWrittenIndexes(ep_lib::MPI_Comm writtenCom) 
    115115   TRY 
    116116   { 
    117117     int writtenSize; 
    118      MPI_Comm_size(writtenCom, &writtenSize); 
     118     ep_lib::MPI_Comm_size(writtenCom, &writtenSize); 
    119119     return totalNumberWrittenIndexes_[writtenSize]; 
    120120   } 
     
    125125     \return the offset of indexes written by each server 
    126126   */ 
    127    int CDomain::getOffsetWrittenIndexes(MPI_Comm writtenCom) 
     127   int CDomain::getOffsetWrittenIndexes(ep_lib::MPI_Comm writtenCom) 
    128128   TRY 
    129129   { 
    130130     int writtenSize; 
    131      MPI_Comm_size(writtenCom, &writtenSize); 
     131     ep_lib::MPI_Comm_size(writtenCom, &writtenSize); 
    132132     return offsetWrittenIndexes_[writtenSize]; 
    133133   } 
    134134   CATCH_DUMP_ATTR 
    135135 
    136    CArray<int, 1>& CDomain::getCompressedIndexToWriteOnServer(MPI_Comm writtenCom) 
     136   CArray<int, 1>& CDomain::getCompressedIndexToWriteOnServer(ep_lib::MPI_Comm writtenCom) 
    137137   TRY 
    138138   { 
    139139     int writtenSize; 
    140      MPI_Comm_size(writtenCom, &writtenSize); 
     140     ep_lib::MPI_Comm_size(writtenCom, &writtenSize); 
    141141     return compressedIndexToWriteOnServer[writtenSize]; 
    142142   } 
     
    690690     int v ; 
    691691     v=ibegin ; 
    692      MPI_Allgather(&v,1,MPI_INT,ibegin_g,1,MPI_INT,client->intraComm) ; 
     692     ep_lib::MPI_Allgather(&v,1,EP_INT,ibegin_g,1,EP_INT,client->intraComm) ; 
    693693     v=jbegin ; 
    694      MPI_Allgather(&v,1,MPI_INT,jbegin_g,1,MPI_INT,client->intraComm) ; 
     694     ep_lib::MPI_Allgather(&v,1,EP_INT,jbegin_g,1,EP_INT,client->intraComm) ; 
    695695     v=ni ; 
    696      MPI_Allgather(&v,1,MPI_INT,ni_g,1,MPI_INT,client->intraComm) ; 
     696     ep_lib::MPI_Allgather(&v,1,EP_INT,ni_g,1,EP_INT,client->intraComm) ; 
    697697     v=nj ; 
    698      MPI_Allgather(&v,1,MPI_INT,nj_g,1,MPI_INT,client->intraComm) ; 
    699  
    700      MPI_Allgatherv(lon.dataFirst(),ni,MPI_DOUBLE,lon_g.dataFirst(),ni_g, ibegin_g,MPI_DOUBLE,client->intraComm) ; 
    701      MPI_Allgatherv(lat.dataFirst(),nj,MPI_DOUBLE,lat_g.dataFirst(),nj_g, jbegin_g,MPI_DOUBLE,client->intraComm) ; 
     698     ep_lib::MPI_Allgather(&v,1,EP_INT,nj_g,1,EP_INT,client->intraComm) ; 
     699 
     700     ep_lib::MPI_Allgatherv(lon.dataFirst(),ni,EP_DOUBLE,lon_g.dataFirst(),ni_g, ibegin_g,EP_DOUBLE,client->intraComm) ; 
     701     ep_lib::MPI_Allgatherv(lat.dataFirst(),nj,EP_DOUBLE,lat_g.dataFirst(),nj_g, jbegin_g,EP_DOUBLE,client->intraComm) ; 
    702702 
    703703      delete[] ibegin_g ; 
     
    19321932          displs[0] = 0; 
    19331933          int localCount = connectedServerRank_[nbServer].size() ; 
    1934           MPI_Gather(&localCount, 1, MPI_INT, &counts[0], 1, MPI_INT, 0, client->intraComm) ; 
     1934          ep_lib::MPI_Gather(&localCount, 1, EP_INT, &counts[0], 1, EP_INT, 0, client->intraComm) ; 
    19351935          for (int i = 0; i < clientSize-1; ++i) 
    19361936          { 
     
    19381938          } 
    19391939          std::vector<int> allConnectedServers(displs[clientSize-1]+counts[clientSize-1]); 
    1940           MPI_Gatherv(&(connectedServerRank_[nbServer])[0], localCount, MPI_INT, &allConnectedServers[0], &counts[0], &displs[0], MPI_INT, 0, client->intraComm); 
     1940          ep_lib::MPI_Gatherv(&(connectedServerRank_[nbServer])[0], localCount, EP_INT, &allConnectedServers[0], &counts[0], &displs[0], EP_INT, 0, client->intraComm); 
    19411941 
    19421942          if ((allConnectedServers.size() != nbServer) && (rank == 0)) 
     
    20032003   CATCH_DUMP_ATTR 
    20042004 
    2005   void CDomain::computeWrittenCompressedIndex(MPI_Comm writtenComm) 
     2005  void CDomain::computeWrittenCompressedIndex(ep_lib::MPI_Comm writtenComm) 
    20062006  TRY 
    20072007  { 
    20082008    int writtenCommSize; 
    2009     MPI_Comm_size(writtenComm, &writtenCommSize); 
     2009    ep_lib::MPI_Comm_size(writtenComm, &writtenCommSize); 
    20102010    if (compressedIndexToWriteOnServer.find(writtenCommSize) != compressedIndexToWriteOnServer.end()) 
    20112011      return; 
     
    20642064      { 
    20652065              
    2066         MPI_Allreduce(&numberWrittenIndexes_[writtenCommSize], &totalNumberWrittenIndexes_[writtenCommSize], 1, MPI_INT, MPI_SUM, writtenComm); 
    2067         MPI_Scan(&numberWrittenIndexes_[writtenCommSize], &offsetWrittenIndexes_[writtenCommSize], 1, MPI_INT, MPI_SUM, writtenComm); 
     2066        ep_lib::MPI_Allreduce(&numberWrittenIndexes_[writtenCommSize], &totalNumberWrittenIndexes_[writtenCommSize], 1, EP_INT, EP_SUM, writtenComm); 
     2067        ep_lib::MPI_Scan(&numberWrittenIndexes_[writtenCommSize], &offsetWrittenIndexes_[writtenCommSize], 1, EP_INT, EP_SUM, writtenComm); 
    20682068        offsetWrittenIndexes_[writtenCommSize] -= numberWrittenIndexes_[writtenCommSize]; 
    20692069      } 
  • XIOS/trunk/src/node/domain.hpp

    r1637 r1638  
    9494         bool isWrittenCompressed(const StdString& filename) const; 
    9595          
    96          int getNumberWrittenIndexes(MPI_Comm writtenCom); 
    97          int getTotalNumberWrittenIndexes(MPI_Comm writtenCom); 
    98          int getOffsetWrittenIndexes(MPI_Comm writtenCom); 
    99          CArray<int,1>& getCompressedIndexToWriteOnServer(MPI_Comm writtenCom); 
     96         int getNumberWrittenIndexes(ep_lib::MPI_Comm writtenCom); 
     97         int getTotalNumberWrittenIndexes(ep_lib::MPI_Comm writtenCom); 
     98         int getOffsetWrittenIndexes(ep_lib::MPI_Comm writtenCom); 
     99         CArray<int,1>& getCompressedIndexToWriteOnServer(ep_lib::MPI_Comm writtenCom); 
    100100 
    101101         std::map<int, StdSize> getAttributesBufferSize(CContextClient* client, bool bufferForWriting = false); 
     
    116116          
    117117         void computeWrittenIndex(); 
    118          void computeWrittenCompressedIndex(MPI_Comm); 
     118         void computeWrittenCompressedIndex(ep_lib::MPI_Comm); 
    119119 
    120120         void AllgatherRectilinearLonLat(CArray<double,1>& lon, CArray<double,1>& lat, 
  • XIOS/trunk/src/node/field.cpp

    r1637 r1638  
    531531    if (!nstepMaxRead) 
    532532    { 
     533       #ifdef _usingMPI 
    533534       MPI_Allreduce(MPI_IN_PLACE, &nstepMax, 1, MPI_INT, MPI_MAX, context->server->intraComm); 
     535       #elif _usingEP 
     536       ep_lib::MPI_Allreduce(&nstepMax, &nstepMax, 1, EP_INT, EP_MAX, context->server->intraComm); 
     537       #endif 
    534538       nstepMaxRead = true; 
    535539    } 
  • XIOS/trunk/src/node/file.cpp

    r1622 r1638  
    2525   CFile::CFile(void) 
    2626      : CObjectTemplate<CFile>(), CFileAttributes() 
    27       , vFieldGroup(), data_out(), enabledFields(), fileComm(MPI_COMM_NULL) 
     27      , vFieldGroup(), data_out(), enabledFields(), fileComm(EP_COMM_NULL) 
    2828      , isOpen(false), read_client(0), checkRead(false), allZoneEmpty(false) 
    2929   { 
     
    3434   CFile::CFile(const StdString & id) 
    3535      : CObjectTemplate<CFile>(id), CFileAttributes() 
    36       , vFieldGroup(), data_out(), enabledFields(), fileComm(MPI_COMM_NULL) 
     36      , vFieldGroup(), data_out(), enabledFields(), fileComm(EP_COMM_NULL) 
    3737      , isOpen(false), read_client(0), checkRead(false), allZoneEmpty(false) 
    3838    { 
     
    307307 
    308308      int color = allZoneEmpty ? 0 : 1; 
    309       MPI_Comm_split(server->intraComm, color, server->intraCommRank, &fileComm); 
    310       if (allZoneEmpty) MPI_Comm_free(&fileComm); 
     309      ep_lib::MPI_Comm_split(server->intraComm, color, server->intraCommRank, &fileComm); 
     310      if (allZoneEmpty) ep_lib::MPI_Comm_free(&fileComm); 
    311311    } 
    312312    CATCH_DUMP_ATTR 
     
    554554         { 
    555555            int commSize, commRank; 
    556             MPI_Comm_size(fileComm, &commSize); 
    557             MPI_Comm_rank(fileComm, &commRank); 
     556            ep_lib::MPI_Comm_size(fileComm, &commSize); 
     557            ep_lib::MPI_Comm_rank(fileComm, &commRank); 
    558558 
    559559            if (server->intraCommSize > 1) 
     
    634634    CContext* context = CContext::getCurrent(); 
    635635    CContextServer* server = context->server; 
    636     MPI_Comm readComm = this->fileComm; 
     636    ep_lib::MPI_Comm readComm = this->fileComm; 
    637637 
    638638    if (!allZoneEmpty) 
     
    677677      { 
    678678        int commSize, commRank; 
    679         MPI_Comm_size(readComm, &commSize); 
    680         MPI_Comm_rank(readComm, &commRank); 
     679        ep_lib::MPI_Comm_size(readComm, &commSize); 
     680        ep_lib::MPI_Comm_rank(readComm, &commRank); 
    681681 
    682682        if (server->intraCommSize > 1) 
     
    722722        isOpen = false; 
    723723       } 
    724       if (fileComm != MPI_COMM_NULL) MPI_Comm_free(&fileComm); 
     724      if (fileComm != EP_COMM_NULL) ep_lib::MPI_Comm_free(&fileComm); 
    725725   } 
    726726   CATCH_DUMP_ATTR 
  • XIOS/trunk/src/node/file.hpp

    r1622 r1638  
    175175         int nbAxis, nbDomains; 
    176176         bool isOpen;          
    177          MPI_Comm fileComm; 
     177         ep_lib::MPI_Comm fileComm; 
    178178 
    179179      private: 
  • XIOS/trunk/src/node/grid.cpp

    r1637 r1638  
    661661        { 
    662662          CContextServer* server = CContext::getCurrent()->server;       
    663           MPI_Allreduce(&numberWrittenIndexes_, &totalNumberWrittenIndexes_, 1, MPI_INT, MPI_SUM, server->intraComm); 
    664           MPI_Scan(&numberWrittenIndexes_, &offsetWrittenIndexes_, 1, MPI_INT, MPI_SUM, server->intraComm); 
     663          ep_lib::MPI_Allreduce(&numberWrittenIndexes_, &totalNumberWrittenIndexes_, 1, EP_INT, EP_SUM, server->intraComm); 
     664          ep_lib::MPI_Scan(&numberWrittenIndexes_, &offsetWrittenIndexes_, 1, EP_INT, EP_SUM, server->intraComm); 
    665665          offsetWrittenIndexes_ -= numberWrittenIndexes_; 
    666666        } 
     
    856856         displs[0] = 0; 
    857857         int localCount = connectedServerRank_[receiverSize].size() ; 
    858          MPI_Gather(&localCount, 1, MPI_INT, &counts[0], 1, MPI_INT, 0, client->intraComm) ; 
     858         ep_lib::MPI_Gather(&localCount, 1, EP_INT, &counts[0], 1, EP_INT, 0, client->intraComm) ; 
    859859         for (int i = 0; i < client->clientSize-1; ++i) 
    860860         { 
     
    862862         } 
    863863         std::vector<int> allConnectedServers(displs[client->clientSize-1]+counts[client->clientSize-1]); 
    864          MPI_Gatherv(&(connectedServerRank_[receiverSize])[0], localCount, MPI_INT, &allConnectedServers[0], &counts[0], &displs[0], MPI_INT, 0, client->intraComm); 
     864         ep_lib::MPI_Gatherv(&(connectedServerRank_[receiverSize])[0], localCount, EP_INT, &allConnectedServers[0], &counts[0], &displs[0], EP_INT, 0, client->intraComm); 
    865865 
    866866         if ((allConnectedServers.size() != receiverSize) && (client->clientRank == 0)) 
  • XIOS/trunk/src/node/mesh.cpp

    r1542 r1638  
    414414 * \param [in] bounds_lat Array of boundary latitudes. Its size depends on the element type. 
    415415 */ 
    416   void CMesh::createMeshEpsilon(const MPI_Comm& comm, 
     416  void CMesh::createMeshEpsilon(const ep_lib::MPI_Comm& comm, 
    417417                                const CArray<double, 1>& lonvalue, const CArray<double, 1>& latvalue, 
    418418                                const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat) 
     
    421421    int nvertex = (bounds_lon.numElements() == 0) ? 1 : bounds_lon.rows(); 
    422422    int mpiRank, mpiSize; 
    423     MPI_Comm_rank(comm, &mpiRank); 
    424     MPI_Comm_size(comm, &mpiSize); 
     423    ep_lib::MPI_Comm_rank(comm, &mpiRank); 
     424    ep_lib::MPI_Comm_size(comm, &mpiSize); 
    425425    double prec = 1e-11;  // used in calculations of edge_lon/lat 
    426426 
     
    460460      unsigned long nbEdgesOnProc = nbEdges_; 
    461461      unsigned long nbEdgesAccum; 
    462       MPI_Scan(&nbEdgesOnProc, &nbEdgesAccum, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 
     462      ep_lib::MPI_Scan(&nbEdgesOnProc, &nbEdgesAccum, 1, EP_UNSIGNED_LONG, EP_SUM, comm); 
    463463      nbEdgesAccum -= nbEdges_; 
    464464 
     
    590590         unsigned long nodeCount = nodeIdx2Idx.size(); 
    591591         unsigned long nodeStart, nbNodes; 
    592          MPI_Scan(&nodeCount, &nodeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 
     592         ep_lib::MPI_Scan(&nodeCount, &nodeStart, 1, EP_UNSIGNED_LONG, EP_SUM, comm); 
    593593         int nNodes = nodeStart; 
    594          MPI_Bcast(&nNodes, 1, MPI_UNSIGNED_LONG, mpiSize-1, comm); 
     594         ep_lib::MPI_Bcast(&nNodes, 1, EP_UNSIGNED_LONG, mpiSize-1, comm); 
    595595         nbNodesGlo = nNodes; 
    596596 
     
    683683      unsigned long nbFacesOnProc = nbFaces_; 
    684684      unsigned long nbFacesAccum; 
    685       MPI_Scan(&nbFacesOnProc, &nbFacesAccum, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 
     685      ep_lib::MPI_Scan(&nbFacesOnProc, &nbFacesAccum, 1, EP_UNSIGNED_LONG, EP_SUM, comm); 
    686686      nbFacesAccum -= nbFaces_; 
    687687 
     
    807807 
    808808        unsigned long edgeStart, nbEdges; 
    809         MPI_Scan(&edgeCount, &edgeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 
     809        ep_lib::MPI_Scan(&edgeCount, &edgeStart, 1, EP_UNSIGNED_LONG, EP_SUM, comm); 
    810810        int nEdges = edgeStart; 
    811         MPI_Bcast(&nEdges, 1, MPI_UNSIGNED_LONG, mpiSize-1, comm); 
     811        ep_lib::MPI_Bcast(&nEdges, 1, EP_UNSIGNED_LONG, mpiSize-1, comm); 
    812812        nbEdgesGlo = nEdges; 
    813813 
     
    10281028        unsigned long edgeCount = edgeIdx2Idx.size(); 
    10291029        unsigned long edgeStart, nbEdges; 
    1030         MPI_Scan(&edgeCount, &edgeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 
     1030        ep_lib::MPI_Scan(&edgeCount, &edgeStart, 1, EP_UNSIGNED_LONG, EP_SUM, comm); 
    10311031        int nEdges = edgeStart; 
    1032         MPI_Bcast(&nEdges, 1, MPI_UNSIGNED_LONG, mpiSize-1, comm); 
     1032        ep_lib::MPI_Bcast(&nEdges, 1, EP_UNSIGNED_LONG, mpiSize-1, comm); 
    10331033        nbEdgesGlo = nEdges; 
    10341034 
     
    12981298        unsigned long nodeCount = nodeIdx2Idx.size(); 
    12991299        unsigned long nodeStart, nbNodes; 
    1300         MPI_Scan(&nodeCount, &nodeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 
     1300        ep_lib::MPI_Scan(&nodeCount, &nodeStart, 1, EP_UNSIGNED_LONG, EP_SUM, comm); 
    13011301        int nNodes = nodeStart; 
    1302         MPI_Bcast(&nNodes, 1, MPI_UNSIGNED_LONG, mpiSize-1, comm); 
     1302        ep_lib::MPI_Bcast(&nNodes, 1, EP_UNSIGNED_LONG, mpiSize-1, comm); 
    13031303        nbNodesGlo = nNodes; 
    13041304 
     
    14181418        unsigned long edgeCount = edgeIdx2Idx.size(); 
    14191419        unsigned long edgeStart, nbEdges; 
    1420         MPI_Scan(&edgeCount, &edgeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 
     1420        ep_lib::MPI_Scan(&edgeCount, &edgeStart, 1, EP_UNSIGNED_LONG, EP_SUM, comm); 
    14211421        int nEdges = edgeStart; 
    1422         MPI_Bcast(&nEdges, 1, MPI_UNSIGNED_LONG, mpiSize-1, comm); 
     1422        ep_lib::MPI_Bcast(&nEdges, 1, EP_UNSIGNED_LONG, mpiSize-1, comm); 
    14231423        nbEdgesGlo = nEdges; 
    14241424 
     
    16141614   */ 
    16151615 
    1616   void CMesh::getGloNghbFacesNodeType(const MPI_Comm& comm, const CArray<int, 1>& face_idx, 
     1616  void CMesh::getGloNghbFacesNodeType(const ep_lib::MPI_Comm& comm, const CArray<int, 1>& face_idx, 
    16171617                               const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat, 
    16181618                               CArray<int, 2>& nghbFaces) 
     
    16231623 
    16241624    int mpiRank, mpiSize; 
    1625     MPI_Comm_rank(comm, &mpiRank); 
    1626     MPI_Comm_size(comm, &mpiSize); 
     1625    ep_lib::MPI_Comm_rank(comm, &mpiRank); 
     1626    ep_lib::MPI_Comm_size(comm, &mpiSize); 
    16271627 
    16281628    // (1) Generating unique node indexes 
     
    17701770   */ 
    17711771 
    1772   void CMesh::getGloNghbFacesEdgeType(const MPI_Comm& comm, const CArray<int, 1>& face_idx, 
     1772  void CMesh::getGloNghbFacesEdgeType(const ep_lib::MPI_Comm& comm, const CArray<int, 1>& face_idx, 
    17731773                               const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat, 
    17741774                               CArray<int, 2>& nghbFaces) 
     
    17791779 
    17801780    int mpiRank, mpiSize; 
    1781     MPI_Comm_rank(comm, &mpiRank); 
    1782     MPI_Comm_size(comm, &mpiSize); 
     1781    ep_lib::MPI_Comm_rank(comm, &mpiRank); 
     1782    ep_lib::MPI_Comm_size(comm, &mpiSize); 
    17831783 
    17841784    // (1) Generating unique node indexes 
     
    19511951   */ 
    19521952 
    1953   void CMesh::getGlobalNghbFaces(const int nghbType, const MPI_Comm& comm, 
     1953  void CMesh::getGlobalNghbFaces(const int nghbType, const ep_lib::MPI_Comm& comm, 
    19541954                                 const CArray<int, 1>& face_idx, 
    19551955                                 const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat, 
  • XIOS/trunk/src/node/mesh.hpp

    r1542 r1638  
    6060                      const CArray<double, 2>&, const CArray<double, 2>& ); 
    6161                         
    62       void createMeshEpsilon(const MPI_Comm&, 
     62      void createMeshEpsilon(const ep_lib::MPI_Comm&, 
    6363                             const CArray<double, 1>&, const CArray<double, 1>&, 
    6464                             const CArray<double, 2>&, const CArray<double, 2>& ); 
    6565 
    66       void getGlobalNghbFaces(const int, const MPI_Comm&, const CArray<int, 1>&, 
     66      void getGlobalNghbFaces(const int, const ep_lib::MPI_Comm&, const CArray<int, 1>&, 
    6767                              const CArray<double, 2>&, const CArray<double, 2>&, 
    6868                              CArray<int, 2>&); 
     
    8787      CClientClientDHTSizet* pNodeGlobalIndex;                    // pointer to a map <nodeHash, nodeIdxGlo> 
    8888      CClientClientDHTSizet* pEdgeGlobalIndex;                    // pointer to a map <edgeHash, edgeIdxGlo> 
    89       void getGloNghbFacesNodeType(const MPI_Comm&, const CArray<int, 1>&, const CArray<double, 2>&, const CArray<double, 2>&, CArray<int, 2>&); 
    90       void getGloNghbFacesEdgeType(const MPI_Comm&, const CArray<int, 1>&, const CArray<double, 2>&, const CArray<double, 2>&, CArray<int, 2>&); 
     89      void getGloNghbFacesNodeType(const ep_lib::MPI_Comm&, const CArray<int, 1>&, const CArray<double, 2>&, const CArray<double, 2>&, CArray<int, 2>&); 
     90      void getGloNghbFacesEdgeType(const ep_lib::MPI_Comm&, const CArray<int, 1>&, const CArray<double, 2>&, const CArray<double, 2>&, CArray<int, 2>&); 
    9191      void getLocNghbFacesNodeType(const CArray<int, 1>&, const CArray<double, 2>&, const CArray<double, 2>&, CArray<int, 2>&, CArray<int, 1>&); 
    9292      void getLocNghbFacesEdgeType(const CArray<int, 1>&, const CArray<double, 2>&, const CArray<double, 2>&, CArray<int, 2>&, CArray<int, 1>&); 
Note: See TracChangeset for help on using the changeset viewer.