diff --git a/lib/h5md/Makefile b/lib/h5md/Makefile index 9680387ab9a70c064f59fef0fe007b16eea8a3aa..c0666ae6acb0f79c0cb8e6da00e5ae85fb94452e 100644 --- a/lib/h5md/Makefile +++ b/lib/h5md/Makefile @@ -1,7 +1,10 @@ EXTRAMAKE=Makefile.lammps.empty CC=h5cc -CFLAGS=-D_DEFAULT_SOURCE -O2 + +# -DH5_NO_DEPRECATED_SYMBOLS is required here to ensure we are using +# the v1.8 API when HDF5 is configured to default to using the v1.6 API. +CFLAGS=-D_DEFAULT_SOURCE -O2 -DH5_NO_DEPRECATED_SYMBOLS -Wall HDF5_PATH=/usr INC=-I include AR=ar diff --git a/lib/h5md/include/ch5md.h b/lib/h5md/include/ch5md.h index 7710f0f065b4bb36c3fb22832cc8ac98795208dc..351e337ed493c113a0a53ece1e94c7f48bffd25a 100644 --- a/lib/h5md/include/ch5md.h +++ b/lib/h5md/include/ch5md.h @@ -57,6 +57,7 @@ h5md_file h5md_create_file (const char *filename, const char *author, const char int h5md_close_file(h5md_file file); hid_t h5md_open_file (const char *filename); h5md_particles_group h5md_create_particles_group(h5md_file file, const char *name); +hid_t h5md_open_particles_group(hid_t particles, const char *name); h5md_element h5md_create_time_data(hid_t loc, const char *name, int rank, int int_dims[], hid_t datatype, h5md_element *link); int h5md_close_element(h5md_element e); h5md_element h5md_create_fixed_data_simple(hid_t loc, const char *name, int rank, int int_dims[], hid_t datatype, void *data); diff --git a/lib/h5md/src/ch5md.c b/lib/h5md/src/ch5md.c index 19c7c02a8fd9ea024c0b151216ac0902400fdf52..ec1095a2d1cb001f83adf2bbcc1cc8f01e26c95e 100644 --- a/lib/h5md/src/ch5md.c +++ b/lib/h5md/src/ch5md.c @@ -137,6 +137,15 @@ h5md_particles_group h5md_create_particles_group(h5md_file file, const char *nam return group; } +hid_t h5md_open_particles_group(hid_t particles, const char *name) +{ + hid_t group; + + group = H5Gopen(particles, name, H5P_DEFAULT); + + return group; +} + h5md_element h5md_create_time_data(hid_t loc, const char *name, int rank, int int_dims[], hid_t datatype, h5md_element *link) {