From 0f3d77ed7509e837b80a5ee1fa9f3548ef278704 Mon Sep 17 00:00:00 2001
From: sjplimp <sjplimp@f3b2605a-c512-4ea7-a41b-209d697bcdaa>
Date: Fri, 28 Aug 2015 23:35:43 +0000
Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13950
 f3b2605a-c512-4ea7-a41b-209d697bcdaa

---
 lib/h5md/Makefile        | 5 ++++-
 lib/h5md/include/ch5md.h | 1 +
 lib/h5md/src/ch5md.c     | 9 +++++++++
 3 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/lib/h5md/Makefile b/lib/h5md/Makefile
index 9680387ab9..c0666ae6ac 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 7710f0f065..351e337ed4 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 19c7c02a8f..ec1095a2d1 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)
 {
 
-- 
GitLab