[cig-commits] [commit] master: Fixed bug with multiple node HDF5 output (5f22998)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Mon Sep 15 10:52:34 PDT 2014
Repository : https://github.com/geodynamics/vc
On branch : master
Link : https://github.com/geodynamics/vc/compare/290787dea3d3c04f5299b765cd20263898a787a5...5f229988c0a5e4aeea24d768568f934a3f30e13a
>---------------------------------------------------------------
commit 5f229988c0a5e4aeea24d768568f934a3f30e13a
Author: Eric Heien <eheien at Blast-ThickNeck.local>
Date: Mon Sep 15 10:52:26 2014 -0700
Fixed bug with multiple node HDF5 output
>---------------------------------------------------------------
5f229988c0a5e4aeea24d768568f934a3f30e13a
src/io/EventOutput.cpp | 2 +-
src/io/HDF5Data.cpp | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/io/EventOutput.cpp b/src/io/EventOutput.cpp
index 1f3d20a..4d4da02 100644
--- a/src/io/EventOutput.cpp
+++ b/src/io/EventOutput.cpp
@@ -80,7 +80,7 @@ void EventOutput::init(SimFramework *_sim) {
SimRequest EventOutput::run(SimFramework *_sim) {
VCSimulation *sim = static_cast<VCSimulation *>(_sim);
- if (sim->getEventOutfileType() == "hdf5") {
+ if (sim->getEventOutfileType() == "hdf5" && sim->isRootNode()) {
#ifdef HDF5_FOUND
h5_data->writeEvent(sim->getCurrentEvent());
#endif
diff --git a/src/io/HDF5Data.cpp b/src/io/HDF5Data.cpp
index 1f382cd..0a9fe6e 100644
--- a/src/io/HDF5Data.cpp
+++ b/src/io/HDF5Data.cpp
@@ -364,6 +364,7 @@ HDF5DataWriter::HDF5DataWriter(const std::string &hdf5_file_name) : HDF5Data() {
#ifdef MPI_C_FOUND
#ifdef H5_HAVE_PARALLEL
+ // No need to synchronize since only the root node outputs the results
//H5Pset_fapl_mpio(plist_id, MPI_COMM_WORLD, MPI_INFO_NULL);
#endif
#endif
More information about the CIG-COMMITS
mailing list