Bug#644134: libhdf5 cannot open files after NetCDF's nc_close has been called

Enrico Zini enrico at debian.org
Mon Oct 3 07:39:54 UTC 2011


Package: libhdf5-serial-dev
Version: 1.8.4-patch1-3
Severity: serious

Hello,

[I'm not quite sure if this should be filed against netcdf instead, or
against both, I'll leave it up to you]

quite simply, after you close a NetCDF file you can't open HDF5 files
anymore. This is a short test case that consistently reproduces the
issue for me:

  // Build with:
  // g++ -o test-nch5 test-nch5.cc -lnetcdf_c++ -lnetcdf -lhdf5_cpp  -lhdf5
  
  // See http://hdf-forum.184993.n3.nabble.com/nc-close-causes-problems-for-H5Fopen-td1019191.html
  
  #include <H5Cpp.h>
  #include <netcdfcpp.h>
  
  int main(int argc, const char* argv[])
  {
      try {
          NcFile nc("test-nch5-data.nc", NcFile::Replace);
	  // Comment out the next line to be able to open the file
          nc.close();
  
          H5::H5File h5("test-nch5-data.h5", H5F_ACC_TRUNC);
      } catch (H5::FileIException& e) {
          e.printError(stderr);
          return 1;
      }
  
      return 0;
  }

The problem also shows when existing files are opened read only. The
test case has a link to an hdf-forum post about this same problem, but
had no answers as far as I can see.

I am the author of a software that has to deal both with NetCDF and with
HDF5 files, and this is quite a killer :(


Ciao,

Enrico

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libhdf5-serial-dev depends on:
ii  libhdf5-serial-1.8.4        1.8.4-patch1-3  
ii  libjpeg8-dev [libjpeg-dev]  8c-2            
ii  zlib1g-dev                  1:1.2.3.4.dfsg-3

libhdf5-serial-dev recommends no packages.

Versions of packages libhdf5-serial-dev suggests:
pn  libhdf5-doc  <none>

-- no debconf information





More information about the Pkg-grass-devel mailing list