Changeset 1566 for XIOS/trunk/src/node


Ignore:
Timestamp:
08/06/18 17:41:50 (6 years ago)
Author:
oabramkina
Message:

Bugfix for masked distributed axis.

Previously mask wasn't working at all, an exception was thrown.

File:
1 edited

Legend:

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

    r1561 r1566  
    792792          const int begin = serverIndexBegin[*itRank][orderPositionInGrid]; 
    793793          const int ni    = serverDimensionSizes[*itRank][orderPositionInGrid]; 
    794           const int end   = begin + ni - 1;           
    795794 
    796795          msgs.push_back(CMessage()); 
    797796          CMessage& msg = msgs.back(); 
    798797          msg << this->getId(); 
    799           msg << ni << begin << end;           
     798          msg << ni << begin; 
    800799          msg << isCompressible_;                     
    801800 
     
    826825  void CAxis::recvDistributionAttribute(CBufferIn& buffer) 
    827826  { 
    828     int ni_srv, begin_srv, end_srv; 
    829     buffer >> ni_srv >> begin_srv >> end_srv;     
     827    int ni_srv, begin_srv; 
     828    buffer >> ni_srv >> begin_srv; 
    830829    buffer >> isCompressible_;             
    831830 
     
    11381137    globalLocalIndexMap_.rehash(std::ceil(index.numElements()/globalLocalIndexMap_.max_load_factor())); 
    11391138    nbIndexGlob = 0; 
     1139    int nbIndLoc = 0; 
    11401140    for (idx = 0; idx < nbReceived; ++idx) 
    11411141    { 
     
    11441144      { 
    11451145         gloInd = tmp(ind); 
     1146         nbIndLoc = (gloInd % n_glo)-begin; 
    11461147         if (0 == globalLocalIndexMap_.count(gloInd)) 
    11471148         { 
    1148            index(nbIndexGlob) = gloInd % n_glo;            
    1149            globalLocalIndexMap_[gloInd] = nbIndexGlob;   
     1149           index(nbIndLoc) = gloInd % n_glo; 
     1150           globalLocalIndexMap_[gloInd] = nbIndLoc; 
    11501151           ++nbIndexGlob; 
    11511152         }  
Note: See TracChangeset for help on using the changeset viewer.