From 8993d1fcb339dcfbc25e6af789ba501bed6d953c Mon Sep 17 00:00:00 2001 From: "Peter W. Draper" <p.w.draper@durham.ac.uk> Date: Wed, 29 Apr 2015 13:14:06 +0100 Subject: [PATCH] Add test for type of HDF5, serial or parallel. Defines the macro HAVE_PARALLEL_HDF5 and the automake conditional HAVEPARALLELHDF5 if HDF5 is parallel. Former-commit-id: 2ad24c19fade194da91336e59347b96cc69d76ed --- configure.ac | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 0745d1f84b..2c2443405b 100644 --- a/configure.ac +++ b/configure.ac @@ -212,9 +212,23 @@ AC_CHECK_LIB([z],[gzopen],[ ],[]) -# Check for HDF5. +# Check for HDF5. Need to differentiate between parallel and serial. AX_LIB_HDF5 +# Need to ask the HDF5 compiler about its configuration, -showconfig should +# have yes/no +have_parallel_hdf5="no" +if test "$with_hdf5" = "yes"; then + AC_MSG_CHECKING([for HDF5 parallel support]) + parallel=`$H5CC -showconfig | grep "Parallel HDF5:" | awk '{print $3}'` + if test "$parallel" = "yes"; then + have_parallel_hdf5="yes" + AC_DEFINE([HAVE_PARALLEL_HDF5],1,[HDF5 library supports parallel access]) + fi + AC_MSG_RESULT($parallel) +fi +AM_CONDITIONAL([HAVEPARALLELHDF5],[test "$have_parallel_hdf5" = "yes"]) + # Check for setaffinity. AC_CHECK_FUNC( pthread_setaffinity_np , AC_DEFINE([HAVE_SETAFFINITY],[true], [Defined if pthread_setaffinity_np exists.]) ) @@ -256,6 +270,7 @@ AC_MSG_RESULT([ flags: $CFLAGS MPI enabled: $enable_mpi HDF5 enabled: $with_hdf5 + parallel: $have_parallel_hdf5 OpenMP enabled: $enable_openmp Metis enabled: $with_metis ]) -- GitLab