Ignore:
Timestamp:
07/07/17 18:17:49 (7 years ago)
Author:
oabramkina
Message:

Two server levels: merging trunk r1200 (except for non-contiguous zoom) into dev. Tested on Curie. Todo: non-contiguous zoom.

File:
1 edited

Legend:

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

    r1173 r1201  
    24632463    } 
    24642464     
     2465    i_index.resize(nbIndGlob); 
     2466    j_index.resize(nbIndGlob); 
     2467 
    24652468    globalLocalIndexMap_.rehash(std::ceil(nbIndGlob/globalLocalIndexMap_.max_load_factor())); 
    2466     i_index.resize(nbIndGlob); 
    2467     j_index.resize(nbIndGlob);     
    24682469    nbIndGlob = 0; 
    24692470    for (i = 0; i < nbReceived; ++i) 
     
    24732474      { 
    24742475         index = tmp(ind); 
    2475          if (0 == globalLocalIndexMap_.count(index)) 
    2476          { 
    2477            i_index(nbIndGlob) = index % ni_glo; 
    2478            j_index(nbIndGlob) = index / ni_glo; 
    2479            globalLocalIndexMap_[index] = nbIndGlob;   
    2480            ++nbIndGlob; 
    2481          }  
     2476         i_index(nbIndGlob) = index % ni_glo; 
     2477         j_index(nbIndGlob) = index / ni_glo; 
     2478         globalLocalIndexMap_[index] = nbIndGlob;   
     2479         ++nbIndGlob; 
    24822480      }  
    24832481    }  
    2484  
    2485     i_index.resizeAndPreserve(nbIndGlob); 
    2486     j_index.resizeAndPreserve(nbIndGlob); 
    24872482  } 
    24882483 
     
    26352630  void CDomain::recvMask(std::map<int, CBufferIn*>& rankBuffers) 
    26362631  { 
    2637     int nbReceived = rankBuffers.size(), i, ind, index, lInd; 
     2632    int nbReceived = rankBuffers.size(), i, ind, index; 
    26382633    if (nbReceived != recvClientRanks_.size()) 
    2639       ERROR("void CDomain::recvMask(std::map<int, CBufferIn*>& rankBuffers)", 
     2634      ERROR("void CDomain::recvArea(std::map<int, CBufferIn*>& rankBuffers)", 
    26402635           << "The number of sending clients is not correct." 
    26412636           << "Expected number: " << recvClientRanks_.size() << " but received " << nbReceived); 
     
    26552650    } 
    26562651   
    2657     if (nbMaskInd != globalLocalIndexMap_.size()) 
    2658       info (0) << "If the domain " << this->getDomainOutputName() <<" does not have overlapped region between processes." 
    2659                << "Something shouble be wrong with mask index "<< std::endl; 
    2660  
    2661     nbMaskInd = globalLocalIndexMap_.size(); 
    26622652    mask_1d.resize(nbMaskInd); 
    2663      
     2653    nbMaskInd = 0; 
    26642654    for (i = 0; i < nbReceived; ++i) 
    26652655    { 
    2666       CArray<int,1>& tmpInd = indGlob_[recvClientRanks_[i]]; 
    26672656      CArray<bool,1>& tmp = recvMaskValue[i]; 
    26682657      for (ind = 0; ind < tmp.numElements(); ++ind) 
    26692658      { 
    2670         lInd = globalLocalIndexMap_[size_t(tmpInd(ind))]; 
    2671         mask_1d(lInd) = tmp(ind); 
     2659        mask_1d(nbMaskInd) = tmp(ind);       
     2660        ++nbMaskInd; 
    26722661      } 
    26732662    }     
     
    27282717     
    27292718      if (nbLonInd != globalLocalIndexMap_.size()) 
    2730         info (0) << "If the domain " << this->getDomainOutputName() <<" does not have overlapped region between processes." 
    2731                  << "Something shouble be wrong with longitude index "<< std::endl; 
    2732  
    2733       nbLonInd = globalLocalIndexMap_.size(); 
     2719        info (0) << "Something wrong with longitude index "<< std::endl; 
     2720 
    27342721      lonvalue.resize(nbLonInd); 
    27352722      if (hasBounds) 
     
    28122799     
    28132800      if (nbLatInd != globalLocalIndexMap_.size()) 
    2814         info (0) << "If the domain " << this->getDomainOutputName() <<" does not have overlapped region between processes." 
    2815                 << "Something shouble be wrong with latitude index "<< std::endl; 
    2816  
    2817       nbLatInd = globalLocalIndexMap_.size(); 
     2801        info (0) << "Something wrong with latitude index "<< std::endl; 
     2802 
    28182803      latvalue.resize(nbLatInd); 
    28192804      if (hasBounds) 
     
    28852870    } 
    28862871 
     2872    int nbAreaInd = 0; 
     2873    for (i = 0; i < nbReceived; ++i) 
     2874    {       
     2875      nbAreaInd += recvAreaValue[i].numElements(); 
     2876    } 
     2877   
     2878    if (nbAreaInd != globalLocalIndexMap_.size()) 
     2879      info (0) << "Something wrong with latitude index "<< std::endl; 
     2880 
    28872881    if (hasArea) 
    28882882    { 
    2889       int nbAreaInd = 0; 
    2890       for (i = 0; i < nbReceived; ++i) 
    2891       {       
    2892         nbAreaInd += recvAreaValue[i].numElements(); 
    2893       } 
    2894  
    2895       if (nbAreaInd != globalLocalIndexMap_.size()) 
    2896         info (0) << "If the domain " << this->getDomainOutputName() <<" does not have overlapped region between processes." 
    2897                  << "Something shouble be wrong with area index "<< std::endl; 
    2898  
    2899       nbAreaInd = globalLocalIndexMap_.size(); 
    29002883      areavalue.resize(nbAreaInd); 
    29012884      nbAreaInd = 0;       
     
    30052988      { 
    30062989         lInd = globalLocalIndexMap_[size_t(tmpInd(ind))]; 
    3007          dataIIndex(lInd) = (-1 == dataIIndex(lInd)) ? tmpI(ind) : dataIIndex(lInd); // Only fill in dataIndex if there is no data 
    3008          dataJIndex(lInd) = (-1 == dataJIndex(lInd)) ? tmpJ(ind) : dataJIndex(lInd);          
     2990         dataIIndex(lInd) = tmpI(ind); 
     2991         dataJIndex(lInd) = tmpJ(ind);          
    30092992      }  
    30102993    } 
Note: See TracChangeset for help on using the changeset viewer.