aboutsummaryrefslogtreecommitdiff
path: root/Carpet/Carpet/src/Recompose.cc
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2008-10-23 11:58:46 +0200
committerErik Schnetter <schnetter@cct.lsu.edu>2008-10-23 11:58:46 +0200
commit5c0e648843970328321907af4fdc9975b04a8a7e (patch)
treeb4fc0f7286db5ce766191bdd48825760aba38678 /Carpet/Carpet/src/Recompose.cc
parent3be7da787d9d608d1fedf678ed06f457808f8dc8 (diff)
Carpet: Flush stdout and stderr after outputting grid statistics
Diffstat (limited to 'Carpet/Carpet/src/Recompose.cc')
-rw-r--r--Carpet/Carpet/src/Recompose.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/Carpet/Carpet/src/Recompose.cc b/Carpet/Carpet/src/Recompose.cc
index 62e6c6e43..958a5d058 100644
--- a/Carpet/Carpet/src/Recompose.cc
+++ b/Carpet/Carpet/src/Recompose.cc
@@ -1,6 +1,7 @@
#include <algorithm>
#include <cassert>
#include <cmath>
+#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
@@ -861,6 +862,12 @@ namespace Carpet {
double (num_active_array_points / 1000000),
double (num_total_array_points / 1000000),
double (num_total_array_points / num_active_array_points * 100 - 100));
+
+ // After this, we will begin to allocate memory for the grid
+ // structure. If we run out of memory, ensure that this output
+ // still makes it to disk.
+ fflush (stdout);
+ fflush (stderr);
}