[cig-commits] [commit] master: Zero out HDF5 file id to avoid failure on exit (1472520)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Oct 8 17:06:34 PDT 2014


Repository : https://github.com/geodynamics/vc

On branch  : master
Link       : https://github.com/geodynamics/vc/compare/23464fca3efa2b6ad7ee0ce8f60c225b18b49741...e4325192ad1118379f46ba66899cb98143d09e04

>---------------------------------------------------------------

commit 14725205e7bb0fa053e4a13ad201c9e11c2c5b90
Author: Eric Heien <emheien at ucdavis.edu>
Date:   Wed Oct 8 00:11:25 2014 -0700

    Zero out HDF5 file id to avoid failure on exit


>---------------------------------------------------------------

14725205e7bb0fa053e4a13ad201c9e11c2c5b90
 src/io/EventOutput.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/io/EventOutput.cpp b/src/io/EventOutput.cpp
index fcdb824..61f428e 100644
--- a/src/io/EventOutput.cpp
+++ b/src/io/EventOutput.cpp
@@ -100,6 +100,9 @@ void EventOutput::init(SimFramework *_sim) {
     VCSimulation                *sim = static_cast<VCSimulation *>(_sim);
     BlockList::const_iterator   it;
 
+#ifdef HDF5_FOUND
+    data_file = 0;
+#endif
     sweep_count = 0;
     next_pause_check = sim->itersPerSecond();
 
@@ -190,8 +193,7 @@ void EventOutput::finish(SimFramework *_sim) {
 #ifdef HDF5_FOUND
 
     if (data_file) {
-        herr_t      res;
-        res = H5Fclose(data_file);
+        herr_t res = H5Fclose(data_file);
 
         if (res < 0) exit(-1);
     }



More information about the CIG-COMMITS mailing list