diff options
author | Thomas Radke <tradke@aei.mpg.de> | 2006-05-11 17:29:00 +0000 |
---|---|---|
committer | Thomas Radke <tradke@aei.mpg.de> | 2006-05-11 17:29:00 +0000 |
commit | 8fde50d19e7344be32fb9fa631ca83107cbb3d1f (patch) | |
tree | 63ce45e10b7f4316b44d82934d94310bf3851339 /Carpet | |
parent | 6127a588053510d8daeb2625fb85bb185b8d9f4e (diff) |
CarpetIOHDF5: fix the HDF5 library version test when determining the datatype for H5Sselect_hyperslab() arguments
This patch lets you compile CarpetIOHDF5 also with HDF5-1.8.x (and future
versions).
darcs-hash:20060511172957-776a0-acbc1bd6b8d92223c0b52a43babf394c0ab9b0f4.gz
Diffstat (limited to 'Carpet')
-rw-r--r-- | Carpet/CarpetIOHDF5/src/Input.cc | 10 | ||||
-rw-r--r-- | Carpet/CarpetIOHDF5/src/Output.cc | 10 |
2 files changed, 14 insertions, 6 deletions
diff --git a/Carpet/CarpetIOHDF5/src/Input.cc b/Carpet/CarpetIOHDF5/src/Input.cc index 6495eb276..73ed60c07 100644 --- a/Carpet/CarpetIOHDF5/src/Input.cc +++ b/Carpet/CarpetIOHDF5/src/Input.cc @@ -870,10 +870,14 @@ static int ReadVar (const cGH* const cctkGH, bboxes_read.at(Carpet::map) |= overlap; // calculate hyperslab selection parameters -#if (H5_VERS_MAJOR == 1 && H5_VERS_MINOR >= 6 && H5_VERS_RELEASE >= 4) - hsize_t memorigin[dim], fileorigin[dim]; -#else + + // before HDF5-1.6.4 the H5Sselect_hyperslab() function expected + // the 'start' argument to be of type 'hssize_t' +#if (H5_VERS_MAJOR == 1 && \ + (H5_VERS_MINOR < 6 || (H5_VERS_MINOR == 6 && H5_VERS_RELEASE < 4))) hssize_t memorigin[dim], fileorigin[dim]; +#else + hsize_t memorigin[dim], fileorigin[dim]; #endif hsize_t memdims[dim], count[dim]; for (int i = 0; i < patch->rank; i++) { diff --git a/Carpet/CarpetIOHDF5/src/Output.cc b/Carpet/CarpetIOHDF5/src/Output.cc index 3562f2a4e..2268ce2a8 100644 --- a/Carpet/CarpetIOHDF5/src/Output.cc +++ b/Carpet/CarpetIOHDF5/src/Output.cc @@ -189,10 +189,14 @@ int WriteVarUnchunked (const cGH* const cctkGH, } } else { hsize_t overlapshape[dim]; -#if (H5_VERS_MAJOR == 1 && H5_VERS_MINOR == 6 && H5_VERS_RELEASE >= 4) - hsize_t overlaporigin[dim]; -#else + + // before HDF5-1.6.4 the H5Sselect_hyperslab() function expected + // the 'start' argument to be of type 'hssize_t' +#if (H5_VERS_MAJOR == 1 && \ + (H5_VERS_MINOR < 6 || (H5_VERS_MINOR == 6 && H5_VERS_RELEASE < 4))) hssize_t overlaporigin[dim]; +#else + hsize_t overlaporigin[dim]; #endif for (int d = 0; d < group.dim; ++d) { overlaporigin[group.dim-1-d] = |