aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@ff385933-4943-42dc-877b-ffc776028de6>2006-01-30 11:50:15 +0000
committertradke <tradke@ff385933-4943-42dc-877b-ffc776028de6>2006-01-30 11:50:15 +0000
commitba4a25580fd0c386136d7844fda7558ea6e2cd50 (patch)
treec3e013953705624233bc89555e12094073fbc905
parent723898eced60be88698722a717774170ce779397 (diff)
Bugfix for periodic checking for NaNs: NaNChecker::action_if_found was ignored
if NaNChecker::out_nanmask was set to "no". git-svn-id: http://svn.cactuscode.org/arrangements/CactusUtils/NaNChecker/trunk@80 ff385933-4943-42dc-877b-ffc776028de6
-rw-r--r--src/NaNCheck.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/NaNCheck.c b/src/NaNCheck.c
index 13814c2..6f339f0 100644
--- a/src/NaNCheck.c
+++ b/src/NaNCheck.c
@@ -181,12 +181,10 @@ void NaNChecker_NaNCheck (CCTK_ARGUMENTS)
#endif
CCTK_TraverseString (check_vars, CheckForNaN, &info, CCTK_GROUP_OR_VAR);
- if (info.NaNmask && info.bitmask)
- {
- sum_handle = CCTK_ReductionHandle ("sum");
- CCTK_ReduceLocalScalar (cctkGH, -1, sum_handle, &info.count, NaNsFound,
- CCTK_VARIABLE_INT);
- }
+
+ sum_handle = CCTK_ReductionHandle ("sum");
+ CCTK_ReduceLocalScalar (cctkGH, -1, sum_handle, &info.count, NaNsFound,
+ CCTK_VARIABLE_INT);
}
@@ -218,16 +216,19 @@ void NaNChecker_TakeAction (CCTK_ARGUMENTS)
}
/* output NaN mask with the 'IOHDF5' I/O method */
- if (CCTK_Equals (verbose, "all"))
+ if (out_NaNmask)
{
- CCTK_INFO ("Write out NaN mask using the 'IOHDF5' I/O method");
- }
- CCTK_OutputVarAsByMethod (cctkGH,
- "NaNChecker::NaNmask{downsample={1 1 1}}",
- "IOHDF5", "NaNmask");
+ if (CCTK_Equals (verbose, "all"))
+ {
+ CCTK_INFO ("Write out NaN mask using the 'IOHDF5' I/O method");
+ }
+ CCTK_OutputVarAsByMethod (cctkGH,
+ "NaNChecker::NaNmask{downsample={1 1 1}}",
+ "IOHDF5", "NaNmask");
- /* save the iteration of the last NaNmask output */
- last_iteration_output = cctk_iteration;
+ /* save the iteration of the last NaNmask output */
+ last_iteration_output = cctk_iteration;
+ }
if (CCTK_Equals (action_if_found, "terminate"))
{