diff --git a/src/parallel_io.c b/src/parallel_io.c index 5ac0d7122b17c135dca386f3e9c74123d15676cd..fc7eac53741d338fca56bf19fe3f68b84cd0d611 100644 --- a/src/parallel_io.c +++ b/src/parallel_io.c @@ -247,7 +247,7 @@ void writeArrayBackEnd(hid_t grp, char* fileName, FILE* xmfFile, char* name, } /* Create dataset */ - h_data = H5Dcreate1(grp, name, hdf5Type(type), h_filespace, H5P_DEFAULT); + h_data = H5Dcreate(grp, name, hdf5Type(type), h_filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (h_data < 0) { error("Error while creating dataset '%s'.", name); } @@ -378,7 +378,7 @@ void read_ic_parallel(char* fileName, double dim[3], struct part** parts, /* Open header to read simulation properties */ /* message("Reading runtime parameters..."); */ - h_grp = H5Gopen1(h_file, "/RuntimePars"); + h_grp = H5Gopen(h_file, "/RuntimePars", H5P_DEFAULT); if (h_grp < 0) error("Error while opening runtime parameters\n"); /* Read the relevant information */ @@ -389,7 +389,7 @@ void read_ic_parallel(char* fileName, double dim[3], struct part** parts, /* Open header to read simulation properties */ /* message("Reading file header..."); */ - h_grp = H5Gopen1(h_file, "/Header"); + h_grp = H5Gopen(h_file, "/Header", H5P_DEFAULT); if (h_grp < 0) error("Error while opening file header\n"); /* Read the relevant information and print status */ @@ -423,7 +423,7 @@ void read_ic_parallel(char* fileName, double dim[3], struct part** parts, /* Open SPH particles group */ /* message("Reading particle arrays..."); */ - h_grp = H5Gopen1(h_file, "/PartType0"); + h_grp = H5Gopen(h_file, "/PartType0", H5P_DEFAULT); if (h_grp < 0) error("Error while opening particle group.\n"); /* Read particle fields into the particle structure */ @@ -508,7 +508,7 @@ void write_output_parallel(struct engine* e, struct UnitSystem* us, /* Open header to write simulation properties */ /* message("Writing runtime parameters..."); */ - h_grp = H5Gcreate1(h_file, "/RuntimePars", 0); + h_grp = H5Gcreate(h_file, "/RuntimePars", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (h_grp < 0) error("Error while creating runtime parameters group\n"); /* Write the relevant information */ @@ -519,7 +519,7 @@ void write_output_parallel(struct engine* e, struct UnitSystem* us, /* Open header to write simulation properties */ /* message("Writing file header..."); */ - h_grp = H5Gcreate1(h_file, "/Header", 0); + h_grp = H5Gcreate(h_file, "/Header", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (h_grp < 0) error("Error while creating file header\n"); /* Print the relevant information and print status */ @@ -546,7 +546,7 @@ void write_output_parallel(struct engine* e, struct UnitSystem* us, writeCodeDescription(h_file); /* Print the SPH parameters */ - h_grpsph = H5Gcreate1(h_file, "/SPH", 0); + h_grpsph = H5Gcreate(h_file, "/SPH" ,H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);); if (h_grpsph < 0) error("Error while creating SPH group"); writeSPHflavour(h_grpsph); H5Gclose(h_grpsph); @@ -556,7 +556,7 @@ void write_output_parallel(struct engine* e, struct UnitSystem* us, /* Create SPH particles group */ /* message("Writing particle arrays..."); */ - h_grp = H5Gcreate1(h_file, "/PartType0", 0); + h_grp = H5Gcreate(h_file, "/PartType0", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (h_grp < 0) error("Error while creating particle group.\n"); /* Write particle fields from the particle structure */ diff --git a/src/serial_io.c b/src/serial_io.c index e0d611bb3a8028c3e59bba8494756f8a90e0c111..5325d252504d9e85948c9e7c4a4a937d2c087907 100644 --- a/src/serial_io.c +++ b/src/serial_io.c @@ -97,7 +97,7 @@ void readArrayBackEnd(hid_t grp, char* name, enum DATA_TYPE type, int N, /* fflush(stdout); */ /* Open data space */ - h_data = H5Dopen1(grp, name); + h_data = H5Dopen(grp, name, H5P_DEFAULT); if (h_data < 0) error("Error while opening data space '%s'.", name); /* Check data type */ @@ -203,7 +203,8 @@ void prepareArray(hid_t grp, char* fileName, FILE* xmfFile, char* name, } /* Create dataset */ - h_data = H5Dcreate1(grp, name, hdf5Type(type), h_space, H5P_DEFAULT); + h_data = H5Dcreate(grp, name, hdf5Type(type), h_space, H5P_DEFAULT, H5P_DEFAULT, + H5P_DEFAULT); if (h_data < 0) { error("Error while creating dataspace '%s'.", name); } @@ -408,7 +409,7 @@ void read_ic_serial(char* fileName, double dim[3], struct part** parts, int* N, /* Open header to read simulation properties */ /* message("Reading runtime parameters..."); */ - h_grp = H5Gopen1(h_file, "/RuntimePars"); + h_grp = H5Gopen(h_file, "/RuntimePars", H5P_DEFAULT); if (h_grp < 0) error("Error while opening runtime parameters\n"); /* Read the relevant information */ @@ -419,7 +420,7 @@ void read_ic_serial(char* fileName, double dim[3], struct part** parts, int* N, /* Open header to read simulation properties */ /* message("Reading file header..."); */ - h_grp = H5Gopen1(h_file, "/Header"); + h_grp = H5Gopen(h_file, "/Header", H5P_DEFAULT); if (h_grp < 0) error("Error while opening file header\n"); /* Read the relevant information and print status */ @@ -474,7 +475,7 @@ void read_ic_serial(char* fileName, double dim[3], struct part** parts, int* N, /* Open SPH particles group */ /* message("Reading particle arrays..."); */ - h_grp = H5Gopen1(h_file, "/PartType0"); + h_grp = H5Gopen(h_file, "/PartType0", H5P_DEFAULT); if (h_grp < 0) error("Error while opening particle group on rank %d.\n", mpi_rank); @@ -563,7 +564,7 @@ void write_output_serial(struct engine* e, struct UnitSystem* us, int mpi_rank, /* Open header to write simulation properties */ /* message("Writing runtime parameters..."); */ - h_grp = H5Gcreate1(h_file, "/RuntimePars", 0); + h_grp = H5Gcreate(h_file, "/RuntimePars", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (h_grp < 0) error("Error while creating runtime parameters group\n"); /* Write the relevant information */ @@ -574,7 +575,7 @@ void write_output_serial(struct engine* e, struct UnitSystem* us, int mpi_rank, /* Open header to write simulation properties */ /* message("Writing file header..."); */ - h_grp = H5Gcreate1(h_file, "/Header", 0); + h_grp = H5Gcreate(h_file, "/Header", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (h_grp < 0) error("Error while creating file header\n"); /* Print the relevant information and print status */ @@ -601,7 +602,7 @@ void write_output_serial(struct engine* e, struct UnitSystem* us, int mpi_rank, writeCodeDescription(h_file); /* Print the SPH parameters */ - h_grpsph = H5Gcreate1(h_file, "/SPH", 0); + h_grpsph = H5Gcreate(h_file, "/SPH", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (h_grpsph < 0) error("Error while creating SPH group"); writeSPHflavour(h_grpsph); H5Gclose(h_grpsph); @@ -611,7 +612,7 @@ void write_output_serial(struct engine* e, struct UnitSystem* us, int mpi_rank, /* Create SPH particles group */ /* message("Writing particle arrays..."); */ - h_grp = H5Gcreate1(h_file, "/PartType0", 0); + h_grp = H5Gcreate(h_file, "/PartType0", H5P_DEFAULT); if (h_grp < 0) error("Error while creating particle group.\n"); /* Close particle group */ @@ -633,7 +634,7 @@ void write_output_serial(struct engine* e, struct UnitSystem* us, int mpi_rank, /* Open SPH particles group */ /* message("Reading particle arrays..."); */ - h_grp = H5Gopen1(h_file, "/PartType0"); + h_grp = H5Gopen(h_file, "/PartType0", H5P_DEFAULT); if (h_grp < 0) error("Error while opening particle group on rank %d.\n", mpi_rank);