]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
improve handling of HDF5 (patch from Eric Heien)
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 29 Aug 2012 21:14:38 +0000 (21:14 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 29 Aug 2012 21:14:38 +0000 (21:14 +0000)
git-svn-id: https://svn.dealii.org/trunk@26166 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/aclocal.m4
deal.II/configure
deal.II/source/base/data_out_base.cc

index 9211f854bd888202493bc5f68176f94d2751b08c..435f66c2f978c93582415591d5b2db5e3465f555 100644 (file)
@@ -7125,7 +7125,12 @@ AC_ARG_WITH([hdf5],
      with_hdf5="no"
    elif test "$withval" = "yes"; then
      with_hdf5="yes"
+     warn_if_cannot_find_hdf5="yes"
+   elif test -z "$withval"; then
+     with_hdf5="yes"
+     H5CC="$withval"
    else
+     warn_if_cannot_find_hdf5="yes"
      with_hdf5="yes"
      H5CC="$withval"
    fi],
@@ -7158,20 +7163,22 @@ if test "$with_hdf5" = "yes"; then
     AC_MSG_CHECKING([for HDF5 libraries])
     if test ! -x "$H5CC"; then
         AC_MSG_RESULT([no])
-        AC_MSG_WARN(m4_case(m4_normalize([$1]),
-            [serial],  [
+        if test "$warn_if_cannot_find_hdf5" = "yes"; then
+            AC_MSG_WARN(m4_case(m4_normalize([$1]),
+                [serial],  [
 Unable to locate serial HDF5 compilation helper script 'h5cc'.
 Please specify --with-hdf5=<LOCATION> as the full path to h5cc.
 HDF5 support is being disabled (equivalent to --with-hdf5=no).
-],            [parallel],[
+],                [parallel],[
 Unable to locate parallel HDF5 compilation helper script 'h5pcc'.
 Please specify --with-hdf5=<LOCATION> as the full path to h5pcc.
 HDF5 support is being disabled (equivalent to --with-hdf5=no).
-],            [
+],                [
 Unable to locate HDF5 compilation helper scripts 'h5cc' or 'h5pcc'.
 Please specify --with-hdf5=<LOCATION> as the full path to h5cc or h5pcc.
 HDF5 support is being disabled (equivalent to --with-hdf5=no).
 ]))
+        fi
         with_hdf5="no"
     else
         dnl h5cc provides both AM_ and non-AM_ options
index a10253898cc85631de73db0deaf2263d84da297b..389091d1a9384b8a9f99d5bdbf00091527dd580d 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 25932 .
+# From configure.in Revision: 26149 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.68 for deal.II 7.2.pre.
 #
@@ -11816,7 +11816,12 @@ if test "${with_hdf5+set}" = set; then :
      with_hdf5="no"
    elif test "$withval" = "yes"; then
      with_hdf5="yes"
+     warn_if_cannot_find_hdf5="yes"
+   elif test -z "$withval"; then
+     with_hdf5="yes"
+     H5CC="$withval"
    else
+     warn_if_cannot_find_hdf5="yes"
      with_hdf5="yes"
      H5CC="$withval"
    fi
@@ -11891,7 +11896,8 @@ $as_echo_n "checking for HDF5 libraries... " >&6; }
     if test ! -x "$H5CC"; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
+        if test "$warn_if_cannot_find_hdf5" = "yes"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
 Unable to locate HDF5 compilation helper scripts 'h5cc' or 'h5pcc'.
 Please specify --with-hdf5=<LOCATION> as the full path to h5cc or h5pcc.
 HDF5 support is being disabled (equivalent to --with-hdf5=no).
@@ -11901,6 +11907,7 @@ Unable to locate HDF5 compilation helper scripts 'h5cc' or 'h5pcc'.
 Please specify --with-hdf5=<LOCATION> as the full path to h5cc or h5pcc.
 HDF5 support is being disabled (equivalent to --with-hdf5=no).
 " >&2;}
+        fi
         with_hdf5="no"
     else
 
index aba9de9aebb2743cb05d80272fef5b2e8663b1bb..a2c8b1188b0fd9105c6e0319aeb9e1240344dba3 100644 (file)
@@ -5946,9 +5946,17 @@ void DataOutBase::write_hdf5_parallel (const std::vector<Patch<dim,spacedim> > &
     AssertThrow(cell_dataspace >= 0, ExcIO());
     
     // Create the dataset for the nodes and cells
+#if H5Gcreate_vers == 1
+    node_dataset = H5Dcreate(h5_file_id, "nodes", H5T_NATIVE_DOUBLE, node_dataspace, H5P_DEFAULT);
+#else
     node_dataset = H5Dcreate(h5_file_id, "nodes", H5T_NATIVE_DOUBLE, node_dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+#endif
     AssertThrow(node_dataset >= 0, ExcIO());
+#if H5Gcreate_vers == 1
+    cell_dataset = H5Dcreate(h5_file_id, "cells", H5T_NATIVE_UINT, cell_dataspace, H5P_DEFAULT);
+#else
     cell_dataset = H5Dcreate(h5_file_id, "cells", H5T_NATIVE_UINT, cell_dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+#endif
     AssertThrow(cell_dataset >= 0, ExcIO());
     
     // Close the node and cell dataspaces since we're done with them
@@ -6056,7 +6064,11 @@ void DataOutBase::write_hdf5_parallel (const std::vector<Patch<dim,spacedim> > &
         pt_data_dataspace = H5Screate_simple(2, node_ds_dim, NULL);
         AssertThrow(pt_data_dataspace >= 0, ExcIO());
         
+#if H5Gcreate_vers == 1
+        pt_data_dataset = H5Dcreate(h5_file_id, vector_name.c_str(), H5T_NATIVE_DOUBLE, pt_data_dataspace, H5P_DEFAULT);
+#else
         pt_data_dataset = H5Dcreate(h5_file_id, vector_name.c_str(), H5T_NATIVE_DOUBLE, pt_data_dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+#endif
         AssertThrow(pt_data_dataset >= 0, ExcIO());
         
         // Create the data subset we'll use to read from memory

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.