From 5d53d42c8a1176b424a1b6a4d38d6633a6bfa1e3 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <matthieu.schaller@durham.ac.uk>
Date: Mon, 5 Oct 2015 12:16:19 +0200
Subject: [PATCH] Be less pedantic about checking data types when reading HDF5
 files.

---
 src/parallel_io.c | 3 +--
 src/serial_io.c   | 3 +--
 src/single_io.c   | 2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/parallel_io.c b/src/parallel_io.c
index 1d6188e80d..2f6b9402cc 100644
--- a/src/parallel_io.c
+++ b/src/parallel_io.c
@@ -131,8 +131,7 @@ void readArrayBackEnd(hid_t grp, char* name, enum DATA_TYPE type, int N,
   /* Read HDF5 dataspace in temporary buffer */
   /* Dirty version that happens to work for vectors but should be improved */
   /* Using HDF5 dataspaces would be better */
-  h_err = H5Dread(h_data, hdf5Type(type), h_memspace, h_filespace, h_plist_id,
-                  temp);
+  h_err = H5Dread(h_data, h_type, h_memspace, h_filespace, h_plist_id, temp);
   if (h_err < 0) {
     error("Error while reading data array '%s'.", name);
   }
diff --git a/src/serial_io.c b/src/serial_io.c
index 501ecd3d56..f77adeff24 100644
--- a/src/serial_io.c
+++ b/src/serial_io.c
@@ -134,8 +134,7 @@ void readArrayBackEnd(hid_t grp, char* name, enum DATA_TYPE type, int N,
   /* Read HDF5 dataspace in temporary buffer */
   /* Dirty version that happens to work for vectors but should be improved */
   /* Using HDF5 dataspaces would be better */
-  h_err = H5Dread(h_data, hdf5Type(type), h_memspace, h_filespace, H5P_DEFAULT,
-                  temp);
+  h_err = H5Dread(h_data, h_type, h_memspace, h_filespace, H5P_DEFAULT, temp);
   if (h_err < 0) {
     error("Error while reading data array '%s'.", name);
   }
diff --git a/src/single_io.c b/src/single_io.c
index 29f6f1ec8a..2dc2ed3e40 100644
--- a/src/single_io.c
+++ b/src/single_io.c
@@ -111,7 +111,7 @@ void readArrayBackEnd(hid_t grp, char* name, enum DATA_TYPE type, int N,
   /* Read HDF5 dataspace in temporary buffer */
   /* Dirty version that happens to work for vectors but should be improved */
   /* Using HDF5 dataspaces would be better */
-  h_err = H5Dread(h_data, hdf5Type(type), H5S_ALL, H5S_ALL, H5P_DEFAULT, temp);
+  h_err = H5Dread(h_data, h_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, temp);
   if (h_err < 0) {
     error("Error while reading data array '%s'.", name);
   }
-- 
GitLab