diff options
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] = |