Ignore:
Timestamp:
12/12/17 14:09:06 (7 years ago)
Author:
oabramkina
Message:

Fixing a bug in buffer evaluation: previously axis attributes were not evaluated correctly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/node/grid.cpp

    r1353 r1371  
    111111     // The grid indexes require a similar size as the actual data 
    112112     std::map<int, StdSize> dataSizes = getDataBufferSize(client, "", bufferForWriting); 
    113      // for (size_t i = 0; i < dataSizes.size(); ++i) 
    114      // { 
    115        std::map<int, StdSize>::iterator it, itE = dataSizes.end(); 
    116        for (it = dataSizes.begin(); it != itE; ++it) 
    117        { 
    118          it->second += 2 * sizeof(bool); 
    119          if (it->second > attributesSizes[it->first]) 
    120            attributesSizes[it->first] = it->second; 
    121        } 
    122      // } 
    123  
     113     std::map<int, StdSize>::iterator it, itE = dataSizes.end(); 
     114     for (it = dataSizes.begin(); it != itE; ++it) 
     115     { 
     116       it->second += 2 * sizeof(bool); 
     117       if (it->second > attributesSizes[it->first]) 
     118         attributesSizes[it->first] = it->second; 
     119     } 
    124120      
    125121     // Account for the axis attributes 
     
    127123     for (size_t i = 0; i < axisList.size(); ++i) 
    128124     { 
    129        std::map<int, StdSize> axisAttBuffSize = axisList[i]->getAttributesBufferSize(client);        
     125       std::map<int, StdSize> axisAttBuffSize = axisList[i]->getAttributesBufferSize(client, getGlobalDimension(),axisPositionInGrid_[i]); 
    130126       for (it = axisAttBuffSize.begin(), itE = axisAttBuffSize.end(); it != itE; ++it) 
    131127       { 
     128         it->second += 2 * sizeof(bool); 
    132129         if (it->second > attributesSizes[it->first]) 
    133130           attributesSizes[it->first] = it->second; 
     
    142139       for (it = domAttBuffSize.begin(), itE = domAttBuffSize.end(); it != itE; ++it) 
    143140       { 
     141         it->second += 2 * sizeof(bool); 
    144142         if (it->second > attributesSizes[it->first]) 
    145143           attributesSizes[it->first] = it->second; 
Note: See TracChangeset for help on using the changeset viewer.