[cig-commits] [commit] master: fix duplicate header output in output/log.txt (40e6110)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Fri Jun 27 17:08:00 PDT 2014


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

On branch  : master
Link       : https://github.com/geodynamics/aspect/compare/0c7df8f291b661b454918aade8690243f987b1e2...40e6110a84f7f695cec2e3c8e5162d39fdab24ce

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

commit 40e6110a84f7f695cec2e3c8e5162d39fdab24ce
Author: Timo Heister <timo.heister at gmail.com>
Date:   Fri Jun 27 20:05:57 2014 -0400

    fix duplicate header output in output/log.txt
    
    We were writing the welcome message from every processor into output/log.txt. Because the file was overwritten unless we are
    resuming from an old computation it was only visible then.


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

40e6110a84f7f695cec2e3c8e5162d39fdab24ce
 source/simulator/core.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/source/simulator/core.cc b/source/simulator/core.cc
index f7ffef9..97af832 100644
--- a/source/simulator/core.cc
+++ b/source/simulator/core.cc
@@ -158,7 +158,8 @@ namespace aspect
 
     // we already printed the header to the screen, so here we just dump it
     // into the logfile.
-    print_aspect_header(log_file_stream);
+    if (Utilities::MPI::this_mpi_process(mpi_communicator) == 0)
+      print_aspect_header(log_file_stream);
 
     computing_timer.enter_section("Initialization");
 



More information about the CIG-COMMITS mailing list