Ignore:
Timestamp:
06/18/18 20:32:55 (6 years ago)
Author:
yushan
Message:

branch_openmp merged with trunk r1544

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/src/node/domain.cpp

    r1491 r1545  
    6868   } 
    6969 
    70  
    7170   std::map<StdString, ETranformationType> *CDomain::transformationMapList_ptr = 0; 
    7271 
     
    163162     } 
    164163 
    165      boost::unordered_map<int, vector<size_t> >::const_iterator itIndexEnd = indSrv_[client->serverSize].end(); 
     164     std::unordered_map<int, vector<size_t> >::const_iterator itIndexEnd = indSrv_[client->serverSize].end(); 
    166165     // std::map<int, std::vector<int> >::const_iterator itWrittenIndexEnd = indWrittenSrv_.end(); 
    167166     for (size_t k = 0; k < connectedServerRank_[client->serverSize].size(); ++k) 
    168167     { 
    169168       int rank = connectedServerRank_[client->serverSize][k]; 
    170        boost::unordered_map<int, std::vector<size_t> >::const_iterator it = indSrv_[client->serverSize].find(rank); 
     169       std::unordered_map<int, std::vector<size_t> >::const_iterator it = indSrv_[client->serverSize].find(rank); 
    171170       size_t idxCount = (it != itIndexEnd) ? it->second.size() : 0; 
    172171 
     
    15101509         ERROR("CDomain::checkBounds(void)", 
    15111510               << "Since 'bounds_lat_2d' is defined, 'latvalue_2d' must be defined too." << std::endl); 
    1512        
     1511 
    15131512       // In case of reading UGRID bounds values are not required 
    15141513       hasBounds = (!bounds_lat_1d.isEmpty() || !bounds_lat_2d.isEmpty() ); 
     
    18141813             int iend = ibegin + ni -1; 
    18151814             int jend = jbegin + nj -1; 
    1816              zoom_ibegin = global_zoom_ibegin > ibegin ? global_zoom_ibegin : ibegin; 
     1815             zoom_ibegin = global_zoom_ibegin > ibegin ? global_zoom_ibegin.getValue() : ibegin; 
    18171816             int zoom_iend  = global_zoom_iend < iend ? zoom_iend : iend ; 
    18181817             zoom_ni     = zoom_iend-zoom_ibegin+1 ; 
    18191818 
    1820              zoom_jbegin = global_zoom_jbegin > jbegin ? global_zoom_jbegin : jbegin ; 
     1819             zoom_jbegin = global_zoom_jbegin > jbegin ? global_zoom_jbegin.getValue() : jbegin ; 
    18211820             int zoom_jend   = global_zoom_jend < jend ? zoom_jend : jend; 
    18221821             zoom_nj     = zoom_jend-zoom_jbegin+1; 
     
    18511850           CServerDistributionDescription serverDescription(nGlobDomain, nbServer); 
    18521851           std::vector<int> serverZeroIndex; 
    1853            if (isUnstructed_) serverZeroIndex = serverDescription.computeServerGlobalIndexInRange(std::make_pair<size_t,size_t>(indexBegin, indexEnd), 0); 
    1854            else serverZeroIndex = serverDescription.computeServerGlobalIndexInRange(std::make_pair<size_t,size_t>(indexBegin, indexEnd), 1); 
     1852           if (isUnstructed_) serverZeroIndex = serverDescription.computeServerGlobalIndexInRange(std::make_pair<size_t&,size_t&>(indexBegin, indexEnd), 0); 
     1853           else serverZeroIndex = serverDescription.computeServerGlobalIndexInRange(std::make_pair<size_t&,size_t&>(indexBegin, indexEnd), 1); 
    18551854 
    18561855           std::list<int> serverZeroIndexLeader; 
     
    19091908 
    19101909      size_t nbWritten = 0, indGlo;       
    1911       boost::unordered_map<size_t,size_t>::const_iterator itb = globalLocalIndexMap_.begin(), 
     1910      std::unordered_map<size_t,size_t>::const_iterator itb = globalLocalIndexMap_.begin(), 
    19121911                                                          ite = globalLocalIndexMap_.end(), it;           
    19131912      CArray<size_t,1>::const_iterator itSrvb = writtenGlobalIndex.begin(), 
     
    19411940        } 
    19421941      } 
    1943        
    1944       // if (isCompressible()) 
    1945       // { 
    1946       //   nbWritten = 0; 
    1947       //   boost::unordered_map<size_t,size_t> localGlobalIndexMap; 
    1948       //   for (itSrv = itSrvb; itSrv != itSrve; ++itSrv) 
    1949       //   { 
    1950       //     indGlo = *itSrv; 
    1951       //     if (ite != globalLocalIndexMap_.find(indGlo)) 
    1952       //     { 
    1953       //       localGlobalIndexMap[localIndexToWriteOnServer(nbWritten)] = indGlo; 
    1954       //       ++nbWritten; 
    1955       //     }                  
    1956       //   } 
    1957  
    1958       //   nbWritten = 0; 
    1959       //   for (int idx = 0; idx < data_i_index.numElements(); ++idx) 
    1960       //   { 
    1961       //     if (localGlobalIndexMap.end() != localGlobalIndexMap.find(data_i_index(idx))) 
    1962       //     { 
    1963       //       ++nbWritten; 
    1964       //     } 
    1965       //   } 
    1966  
    1967       //   compressedIndexToWriteOnServer.resize(nbWritten); 
    1968       //   nbWritten = 0; 
    1969       //   for (int idx = 0; idx < data_i_index.numElements(); ++idx) 
    1970       //   { 
    1971       //     if (localGlobalIndexMap.end() != localGlobalIndexMap.find(data_i_index(idx))) 
    1972       //     { 
    1973       //       compressedIndexToWriteOnServer(nbWritten) = localGlobalIndexMap[data_i_index(idx)]; 
    1974       //       ++nbWritten; 
    1975       //     } 
    1976       //   } 
    1977  
    1978       //   numberWrittenIndexes_ = nbWritten; 
    1979       //   if (isDistributed()) 
    1980       //   {             
    1981       //     ep_lib::MPI_Allreduce(&numberWrittenIndexes_, &totalNumberWrittenIndexes_, 1, MPI_INT, MPI_SUM, server->intraComm); 
    1982       //     ep_lib::MPI_Scan(&numberWrittenIndexes_, &offsetWrittenIndexes_, 1, MPI_INT, MPI_SUM, server->intraComm); 
    1983       //     offsetWrittenIndexes_ -= numberWrittenIndexes_; 
    1984       //   } 
    1985       //   else 
    1986       //     totalNumberWrittenIndexes_ = numberWrittenIndexes_; 
    1987       // }       
    19881942   } 
    19891943 
     
    20091963      const CArray<size_t,1>& writtenGlobalIndex  = srvDist.getGlobalIndex(); 
    20101964 
    2011       boost::unordered_map<size_t,size_t>::const_iterator itb = globalLocalIndexMap_.begin(), 
     1965      std::unordered_map<size_t,size_t>::const_iterator itb = globalLocalIndexMap_.begin(), 
    20121966                                                          ite = globalLocalIndexMap_.end(), it;    
    20131967      CArray<size_t,1>::const_iterator itSrvb = writtenGlobalIndex.begin(), 
    20141968                                       itSrve = writtenGlobalIndex.end(), itSrv; 
    2015       boost::unordered_map<size_t,size_t> localGlobalIndexMap; 
     1969      std::unordered_map<size_t,size_t> localGlobalIndexMap; 
    20161970      for (itSrv = itSrvb; itSrv != itSrve; ++itSrv) 
    20171971      { 
     
    20892043      list<CArray<int,1> > list_indZoom, list_writtenInd, list_indGlob; 
    20902044 
    2091       boost::unordered_map<int, vector<size_t> >::const_iterator itIndex, iteIndex; 
     2045      std::unordered_map<int, vector<size_t> >::const_iterator itIndex, iteIndex; 
    20922046      iteIndex = indSrv_[serverSize].end(); 
    20932047      for (int k = 0; k < connectedServerRank_[serverSize].size(); ++k) 
     
    21902144      list<CArray<bool,1> > list_mask; 
    21912145 
    2192       boost::unordered_map<int, vector<size_t> >::const_iterator it, iteMap; 
     2146      std::unordered_map<int, vector<size_t> >::const_iterator it, iteMap; 
    21932147      iteMap = indSrv_[serverSize].end(); 
    21942148      for (int k = 0; k < connectedServerRank_[serverSize].size(); ++k) 
     
    22372191      list<CArray<double,1> > list_area; 
    22382192 
    2239       boost::unordered_map<int, vector<size_t> >::const_iterator it, iteMap; 
     2193      std::unordered_map<int, vector<size_t> >::const_iterator it, iteMap; 
    22402194      iteMap = indSrv_[serverSize].end(); 
    22412195      for (int k = 0; k < connectedServerRank_[serverSize].size(); ++k) 
     
    22882242      list<CArray<double,2> > list_boundslon, list_boundslat; 
    22892243 
    2290       boost::unordered_map<int, vector<size_t> >::const_iterator it, iteMap; 
     2244      std::unordered_map<int, vector<size_t> >::const_iterator it, iteMap; 
    22912245      iteMap = indSrv_[serverSize].end(); 
    22922246      for (int k = 0; k < connectedServerRank_[serverSize].size(); ++k) 
     
    24052359      } 
    24062360 
    2407       boost::unordered_map<int, vector<size_t> >::const_iterator it, iteMap; 
     2361      std::unordered_map<int, vector<size_t> >::const_iterator it, iteMap; 
    24082362      iteMap = indSrv_[serverSize].end(); 
    24092363      for (int k = 0; k < connectedServerRank_[serverSize].size(); ++k) 
     
    26072561    int zoom_jend_glob = global_zoom_jbegin + global_zoom_nj - 1; 
    26082562 
    2609     zoom_ibegin.setValue(global_zoom_ibegin > ibegin ? global_zoom_ibegin : ibegin); 
     2563    zoom_ibegin.setValue(global_zoom_ibegin > ibegin ? global_zoom_ibegin.getValue() : ibegin); 
    26102564    int zoom_iend = zoom_iend_glob < iend ? zoom_iend_glob : iend ; 
    26112565    zoom_ni.setValue(zoom_iend-zoom_ibegin+1); 
    26122566 
    2613     zoom_jbegin.setValue(global_zoom_jbegin > jbegin ? global_zoom_jbegin : jbegin); 
     2567    zoom_jbegin.setValue(global_zoom_jbegin > jbegin ? global_zoom_jbegin.getValue() : jbegin); 
    26142568    int zoom_jend = zoom_jend_glob < jend ? zoom_jend_glob : jend ; 
    26152569    zoom_nj.setValue(zoom_jend-zoom_jbegin+1); 
     
    26702624   
    26712625    if (nbMaskInd != globalLocalIndexMap_.size()) 
    2672       info (0) << "If the domain " << this->getDomainOutputName() <<" does not have overlapped region between processes." 
    2673                << "Something must be wrong with mask index "<< std::endl; 
     2626      info (0) << "If domain " << this->getDomainOutputName() <<" does not have overlapped regions between processes " 
     2627               << "something must be wrong with mask index "<< std::endl; 
    26742628 
    26752629    nbMaskInd = globalLocalIndexMap_.size(); 
     
    27462700     
    27472701      if (nbLonInd != globalLocalIndexMap_.size()) 
    2748         info (0) << "If the domain " << this->getDomainOutputName() <<" does not have overlapped region between processes." 
    2749                  << "Something must be wrong with longitude index "<< std::endl; 
     2702        info (0) << "If domain " << this->getDomainOutputName() <<" does not have overlapped regions between processes " 
     2703                 << "something must be wrong with longitude index "<< std::endl; 
    27502704 
    27512705      nbLonInd = globalLocalIndexMap_.size(); 
     
    28302784     
    28312785      if (nbLatInd != globalLocalIndexMap_.size()) 
    2832         info (0) << "If the domain " << this->getDomainOutputName() <<" does not have overlapped region between processes." 
    2833                 << "Something must be wrong with latitude index "<< std::endl; 
     2786        info (0) << "If domain " << this->getDomainOutputName() <<" does not have overlapped regions between processes " 
     2787                << "something must be wrong with latitude index "<< std::endl; 
    28342788 
    28352789      nbLatInd = globalLocalIndexMap_.size(); 
     
    29122866 
    29132867      if (nbAreaInd != globalLocalIndexMap_.size()) 
    2914         info (0) << "If the domain " << this->getDomainOutputName() <<" does not have overlapped region between processes." 
    2915                  << "Something must be wrong with area index "<< std::endl; 
     2868        info (0) << "If domain " << this->getDomainOutputName() <<" does not have overlapped regions between processes " 
     2869                 << "something must be wrong with area index "<< std::endl; 
    29162870 
    29172871      nbAreaInd = globalLocalIndexMap_.size(); 
Note: See TracChangeset for help on using the changeset viewer.