Changeset 1545 for XIOS/dev/branch_openmp/src/node/domain.cpp
- Timestamp:
- 06/18/18 20:32:55 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/src/node/domain.cpp
r1491 r1545 68 68 } 69 69 70 71 70 std::map<StdString, ETranformationType> *CDomain::transformationMapList_ptr = 0; 72 71 … … 163 162 } 164 163 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(); 166 165 // std::map<int, std::vector<int> >::const_iterator itWrittenIndexEnd = indWrittenSrv_.end(); 167 166 for (size_t k = 0; k < connectedServerRank_[client->serverSize].size(); ++k) 168 167 { 169 168 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); 171 170 size_t idxCount = (it != itIndexEnd) ? it->second.size() : 0; 172 171 … … 1510 1509 ERROR("CDomain::checkBounds(void)", 1511 1510 << "Since 'bounds_lat_2d' is defined, 'latvalue_2d' must be defined too." << std::endl); 1512 1511 1513 1512 // In case of reading UGRID bounds values are not required 1514 1513 hasBounds = (!bounds_lat_1d.isEmpty() || !bounds_lat_2d.isEmpty() ); … … 1814 1813 int iend = ibegin + ni -1; 1815 1814 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; 1817 1816 int zoom_iend = global_zoom_iend < iend ? zoom_iend : iend ; 1818 1817 zoom_ni = zoom_iend-zoom_ibegin+1 ; 1819 1818 1820 zoom_jbegin = global_zoom_jbegin > jbegin ? global_zoom_jbegin : jbegin ;1819 zoom_jbegin = global_zoom_jbegin > jbegin ? global_zoom_jbegin.getValue() : jbegin ; 1821 1820 int zoom_jend = global_zoom_jend < jend ? zoom_jend : jend; 1822 1821 zoom_nj = zoom_jend-zoom_jbegin+1; … … 1851 1850 CServerDistributionDescription serverDescription(nGlobDomain, nbServer); 1852 1851 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); 1855 1854 1856 1855 std::list<int> serverZeroIndexLeader; … … 1909 1908 1910 1909 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(), 1912 1911 ite = globalLocalIndexMap_.end(), it; 1913 1912 CArray<size_t,1>::const_iterator itSrvb = writtenGlobalIndex.begin(), … … 1941 1940 } 1942 1941 } 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 // else1986 // totalNumberWrittenIndexes_ = numberWrittenIndexes_;1987 // }1988 1942 } 1989 1943 … … 2009 1963 const CArray<size_t,1>& writtenGlobalIndex = srvDist.getGlobalIndex(); 2010 1964 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(), 2012 1966 ite = globalLocalIndexMap_.end(), it; 2013 1967 CArray<size_t,1>::const_iterator itSrvb = writtenGlobalIndex.begin(), 2014 1968 itSrve = writtenGlobalIndex.end(), itSrv; 2015 boost::unordered_map<size_t,size_t> localGlobalIndexMap;1969 std::unordered_map<size_t,size_t> localGlobalIndexMap; 2016 1970 for (itSrv = itSrvb; itSrv != itSrve; ++itSrv) 2017 1971 { … … 2089 2043 list<CArray<int,1> > list_indZoom, list_writtenInd, list_indGlob; 2090 2044 2091 boost::unordered_map<int, vector<size_t> >::const_iterator itIndex, iteIndex;2045 std::unordered_map<int, vector<size_t> >::const_iterator itIndex, iteIndex; 2092 2046 iteIndex = indSrv_[serverSize].end(); 2093 2047 for (int k = 0; k < connectedServerRank_[serverSize].size(); ++k) … … 2190 2144 list<CArray<bool,1> > list_mask; 2191 2145 2192 boost::unordered_map<int, vector<size_t> >::const_iterator it, iteMap;2146 std::unordered_map<int, vector<size_t> >::const_iterator it, iteMap; 2193 2147 iteMap = indSrv_[serverSize].end(); 2194 2148 for (int k = 0; k < connectedServerRank_[serverSize].size(); ++k) … … 2237 2191 list<CArray<double,1> > list_area; 2238 2192 2239 boost::unordered_map<int, vector<size_t> >::const_iterator it, iteMap;2193 std::unordered_map<int, vector<size_t> >::const_iterator it, iteMap; 2240 2194 iteMap = indSrv_[serverSize].end(); 2241 2195 for (int k = 0; k < connectedServerRank_[serverSize].size(); ++k) … … 2288 2242 list<CArray<double,2> > list_boundslon, list_boundslat; 2289 2243 2290 boost::unordered_map<int, vector<size_t> >::const_iterator it, iteMap;2244 std::unordered_map<int, vector<size_t> >::const_iterator it, iteMap; 2291 2245 iteMap = indSrv_[serverSize].end(); 2292 2246 for (int k = 0; k < connectedServerRank_[serverSize].size(); ++k) … … 2405 2359 } 2406 2360 2407 boost::unordered_map<int, vector<size_t> >::const_iterator it, iteMap;2361 std::unordered_map<int, vector<size_t> >::const_iterator it, iteMap; 2408 2362 iteMap = indSrv_[serverSize].end(); 2409 2363 for (int k = 0; k < connectedServerRank_[serverSize].size(); ++k) … … 2607 2561 int zoom_jend_glob = global_zoom_jbegin + global_zoom_nj - 1; 2608 2562 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); 2610 2564 int zoom_iend = zoom_iend_glob < iend ? zoom_iend_glob : iend ; 2611 2565 zoom_ni.setValue(zoom_iend-zoom_ibegin+1); 2612 2566 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); 2614 2568 int zoom_jend = zoom_jend_glob < jend ? zoom_jend_glob : jend ; 2615 2569 zoom_nj.setValue(zoom_jend-zoom_jbegin+1); … … 2670 2624 2671 2625 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; 2674 2628 2675 2629 nbMaskInd = globalLocalIndexMap_.size(); … … 2746 2700 2747 2701 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; 2750 2704 2751 2705 nbLonInd = globalLocalIndexMap_.size(); … … 2830 2784 2831 2785 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; 2834 2788 2835 2789 nbLatInd = globalLocalIndexMap_.size(); … … 2912 2866 2913 2867 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; 2916 2870 2917 2871 nbAreaInd = globalLocalIndexMap_.size();
Note: See TracChangeset
for help on using the changeset viewer.