HDF.PInvoke icon indicating copy to clipboard operation
HDF.PInvoke copied to clipboard

H5Pset_mdc_image_configTest1 is failing.

Open gheber opened this issue 8 years ago • 2 comments

Assert.IsTrue(H5P.set_mdc_image_config(fapl, config_ptr) >= 0); fails. Why?

gheber avatar Jul 07 '17 13:07 gheber

The native version of this test runs just fine:

#include "hdf5.h"
 
#include <assert.h>
 
void main()
{
  hid_t fapl;
  H5AC_cache_image_config_t conf;
 
  fapl = H5Pcreate(H5P_FILE_ACCESS);
  assert(fapl >= 0);
 
  assert(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) >= 0);
 
  conf.version = H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION;
  conf.entry_ageout = -1;
 
  assert(H5Pset_mdc_image_config(fapl, &conf) >= 0);
 
  assert(H5Pclose(fapl) >= 0);
 
  return;
}

gheber avatar Apr 26 '18 18:04 gheber

The error stack of the HDF.PInvoke version reads:

  #000: D:\build\HDF5\1.10.2\hdf5-1.10.2\src\H5Pfapl.c line 1662 in H5Pset_mdc_image_config(): invalid metadata cache image configuration
    major: Invalid arguments to routine
    minor: Bad value
  #001: D:\build\HDF5\1.10.2\hdf5-1.10.2\src\H5AC.c line 2592 in H5AC_validate_cache_image_config(): error(s) in new cache image config
    major: Object cache
    minor: Bad value
  #002: D:\build\HDF5\1.10.2\hdf5-1.10.2\src\H5Cimage.c line 1730 in H5C_validate_cache_image_config(): unexpected value in entry_ageout field
    major: Object cache
    minor: Bad value
Failed                UnitTests.H5PTest.H5Pset_mdc_image_configTest1

gheber avatar Apr 26 '18 18:04 gheber