Commit 5203f2b6 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Removed entirely the type-check when reading in data.

parent ea95db49
......@@ -207,12 +207,6 @@ void readArray(hid_t grp, struct io_props props, size_t N, long long N_total,
const hid_t h_data = H5Dopen2(grp, props.name, H5P_DEFAULT);
if (h_data < 0) error("Error while opening data space '%s'.", props.name);
/* Check data type */
const hid_t h_type = H5Dget_type(h_data);
if (h_type < 0) error("Unable to retrieve data type from the file");
/* if (!H5Tequal(h_type, hdf5_type(type))) */
/* error("Non-matching types between the code and the file"); */
/* Create property list for collective dataset read. */
const hid_t h_plist_id = H5Pcreate(H5P_DATASET_XFER);
H5Pset_dxpl_mpio(h_plist_id, H5FD_MPIO_COLLECTIVE);
......@@ -254,7 +248,6 @@ void readArray(hid_t grp, struct io_props props, size_t N, long long N_total,
/* Close everything */
H5Pclose(h_plist_id);
H5Tclose(h_type);
H5Dclose(h_data);
}
......
......@@ -104,12 +104,6 @@ void readArray(hid_t grp, const struct io_props props, size_t N,
const hid_t h_data = H5Dopen(grp, props.name, H5P_DEFAULT);
if (h_data < 0) error("Error while opening data space '%s'.", props.name);
/* Check data type */
const hid_t h_type = H5Dget_type(h_data);
if (h_type < 0) error("Unable to retrieve data type from the file");
/* if (!H5Tequal(h_type, hdf5_type(type))) */
/* error("Non-matching types between the code and the file"); */
/* Allocate temporary buffer */
void* temp = malloc(num_elements * typeSize);
if (temp == NULL) error("Unable to allocate memory for temporary buffer");
......@@ -189,7 +183,6 @@ void readArray(hid_t grp, const struct io_props props, size_t N,
free(temp);
H5Sclose(h_filespace);
H5Sclose(h_memspace);
H5Tclose(h_type);
H5Dclose(h_data);
}
......
......@@ -106,12 +106,6 @@ void readArray(hid_t h_grp, const struct io_props prop, size_t N,
error("Error while opening data space '%s'.", prop.name);
}
/* Check data type */
const hid_t h_type = H5Dget_type(h_data);
if (h_type < 0) error("Unable to retrieve data type from the file");
// if (!H5Tequal(h_type, hdf5_type(type)))
// error("Non-matching types between the code and the file");
/* Allocate temporary buffer */
void* temp = malloc(num_elements * typeSize);
if (temp == NULL) error("Unable to allocate memory for temporary buffer");
......@@ -165,7 +159,6 @@ void readArray(hid_t h_grp, const struct io_props prop, size_t N,
/* Free and close everything */
free(temp);
H5Tclose(h_type);
H5Dclose(h_data);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment