From fcc32346de7a793060209a0fe959b366a3db3183 Mon Sep 17 00:00:00 2001 From: tradke Date: Mon, 15 Apr 2002 15:06:18 +0000 Subject: Get the reduction result for Info output on every processor (because every processor does print it). This fixes a problem with uninitialized memory on the Alphas. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOBasic/trunk@121 b589c3ab-70e8-4b4d-a09f-cba2dd200880 --- src/OutputInfo.c | 4 ++-- src/WriteInfo.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OutputInfo.c b/src/OutputInfo.c index 29580cb..16676e8 100644 --- a/src/OutputInfo.c +++ b/src/OutputInfo.c @@ -30,9 +30,9 @@ CCTK_FILEVERSION(CactusBase_IOBasic_OutputInfo_c) /* the number at which to switch from decimal to exponential notation */ #define DECIMAL_PRECISION 1.0e-8 #define DECIMAL_TOOBIG 1.0e+8 -#define USE_DECIMAL_NOTATION(x) ((fabs (x) > DECIMAL_PRECISION) || \ +#define USE_DECIMAL_NOTATION(x) ((fabs ((double) x) > DECIMAL_PRECISION) || \ ((x) == 0.0) || \ - (fabs(x) < DECIMAL_TOOBIG)) + (fabs ((double) x) < DECIMAL_TOOBIG)) #define PRINT_FORMATTED_REDUCTION_VALUE(reduction) \ if (reduction->is_valid) \ { \ diff --git a/src/WriteInfo.c b/src/WriteInfo.c index 977f548..850d088 100644 --- a/src/WriteInfo.c +++ b/src/WriteInfo.c @@ -184,7 +184,7 @@ int IOBasic_WriteInfo (const cGH *GH, int vindex) /* for CCTK_GF and CCTK_ARRAY variables: loop over all reductions */ while (reduction) { - reduction->is_valid = CCTK_Reduce (GH_fake_const.non_const_ptr, 0, + reduction->is_valid = CCTK_Reduce (GH_fake_const.non_const_ptr, -1, reduction->handle, 1, CCTK_VARIABLE_REAL, &reduction->value, 1, vindex) == 0; -- cgit v1.2.3