Ignore:
Timestamp:
04/08/16 15:00:15 (8 years ago)
Author:
mhnguyen
Message:

Improvements for dht

+) Implement adaptive hierarchy for dht, level of hierarchy depends on number of processes
+) Remove some redundant codes

Test
+) On Curie
+) All tests are correct

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/io/netCdfInterface_impl.hpp

    r686 r833  
    3232    { 
    3333      StdStringStream sstr; 
     34      StdString varName; 
    3435      sstr << "Error when calling function ncGetAttType(ncid, varId, attrName.c_str(), data)" << std::endl; 
    3536      sstr << nc_strerror(status) << std::endl; 
    36       sstr << "Unable to read attribute " << attrName << " given the location id: " << ncid << " and the variable id: " << varId << std::endl; 
     37      inqVarName(ncid, varId, varName); 
     38      sstr << "Unable to read attribute " << attrName << " given the location id: " << ncid << " and the variable whose id: " << varId << " and name: " << varName << std::endl; 
    3739      throw CNetCdfException(sstr.str()); 
    3840    } 
     
    5961    { 
    6062      StdStringStream sstr; 
     63      StdString varName; 
    6164      sstr << "Error when calling function ncPutAttType(ncid, varId, attrName.c_str(), numVal, data)" << std::endl; 
    6265      sstr << nc_strerror(status) << std::endl; 
    63       sstr << "Unable to set attribute " << attrName << " given the location id: " << ncid << " and the variable id: " << varId 
     66      inqVarName(ncid, varId, varName); 
     67      sstr << "Unable to set attribute " << attrName << " given the location id: " << ncid << " and the variable whose id: " << varId << " and name: " << varName << std::endl 
    6468           << " with " << numVal << " elements." << std::endl; 
    6569      throw CNetCdfException(sstr.str()); 
     
    8589    { 
    8690      StdStringStream sstr; 
     91      StdString varName; 
    8792      sstr << "Error when calling function ncGetVaraType(ncid, varId, start, count, data)" << std::endl; 
    8893      sstr << nc_strerror(status) << std::endl; 
    89       sstr << "Unable to read data given the location id: " << ncid << " and the variable id: " << varId << std::endl; 
     94      inqVarName(ncid, varId, varName); 
     95      sstr << "Unable to read data given the location id: " << ncid << " and the variable whose id: " << varId << " and name: " << varName << std::endl; 
    9096      throw CNetCdfException(sstr.str()); 
    9197    } 
     
    110116    { 
    111117      StdStringStream sstr; 
     118      StdString varName; 
    112119      sstr << "Error when calling function ncPutVaraType(ncid, varId, start, count, data)" << std::endl; 
    113120      sstr << nc_strerror(status) << std::endl; 
    114       sstr << "Unable to write data given the location id: " << ncid << " and the variable id: " << varId << std::endl; 
     121      inqVarName(ncid, varId, varName); 
     122      sstr << "Unable to write data given the location id: " << ncid << " and the variable whose id: " << varId << " and name: " << varName << std::endl; 
    115123      throw CNetCdfException(sstr.str()); 
    116124    } 
Note: See TracChangeset for help on using the changeset viewer.