From 05dee395307a9f33c6174cc18c7ee99a0fea9a40 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <matthieu.schaller@durham.ac.uk>
Date: Thu, 28 Jan 2016 17:00:04 +0000
Subject: [PATCH] Print library information in the HDF5 as well

---
 src/common_io.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/common_io.c b/src/common_io.c
index 6ed22a5820..4646c133f4 100644
--- a/src/common_io.c
+++ b/src/common_io.c
@@ -360,7 +360,15 @@ void writeCodeDescription(hid_t h_file) {
   writeAttribute_s(h_grpcode, "Compiler Version", compiler_version());
   writeAttribute_s(h_grpcode, "Git Branch", git_branch());
   writeAttribute_s(h_grpcode, "Git Revision", git_revision());
-
+  writeAttribute_s(h_grpcode, "HDF5 library version", hdf5_version());
+#ifdef WITH_MPI
+  writeAttribute_s(h_grpcode, "MPI library", mpi_version());
+#ifdef HAVE_METIS
+  writeAttribute_s(h_grpcode,"METIS library version", metis_version());
+#endif  
+#else
+  writeAttribute_s(h_grpcode, "MPI library", "Non-MPI version of SWIFT");
+#endif
   H5Gclose(h_grpcode);
 }
 
-- 
GitLab