Ignore:
Timestamp:
09/22/16 10:59:00 (8 years ago)
Author:
mhnguyen
Message:

Correcting a bug of inverse axis on distributed axis

+) The global index of axis source is now updated correctly

Test
+) On Curie
+) Correct

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/transformation/axis_algorithm_inverse.cpp

    r933 r936  
    137137  } 
    138138 
    139  
    140139  boost::unordered_map<int, std::vector<size_t> >::const_iterator itbIndex = globalSrcIndexSendToProc.begin(), itIndex, 
    141140                                                                  iteIndex = globalSrcIndexSendToProc.end(); 
     
    249248 
    250249 
     250  size_t nGloAxisDest = axisDest_->n_glo.getValue() - 1; 
    251251  for (std::map<int,int>::const_iterator itSend = sendRankSizeMap.begin(); itSend != sendRankSizeMap.end(); ++itSend) 
    252252  { 
     
    259259    { 
    260260      size_t globalIndex = *(recvIndex+idx); 
    261       int localIndex = globalIndex - axisDest_->begin; 
     261      int localIndex = ((nGloAxisDest-globalIndex) - axisDest_->begin); 
    262262      axisDest_->value(localIndex) = *(recvValue + idx); 
    263263    } 
Note: See TracChangeset for help on using the changeset viewer.