diff options
author | yye00 <yye00@b589c3ab-70e8-4b4d-a09f-cba2dd200880> | 2005-11-01 18:50:38 +0000 |
---|---|---|
committer | yye00 <yye00@b589c3ab-70e8-4b4d-a09f-cba2dd200880> | 2005-11-01 18:50:38 +0000 |
commit | ffa02dbbfb29511a6d60d2823fa36775fb6027d2 (patch) | |
tree | 7552784df92d6d1ddc21754e696c94f23fe28701 /src/WriteScalar.c | |
parent | d675eee199ebdf7f889ab6780c56376d313eaeb0 (diff) |
commits to change IOBasic to use the new reduction interface. This breaks the testsuite for testcomplex because of a new reduction scheme for complex numbers. WaveToy1DF77 also fails with inconsistency, failing at 3,7 processors with varying files and differences between them. Currently investigating these failurse in detail.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOBasic/trunk@169 b589c3ab-70e8-4b4d-a09f-cba2dd200880
Diffstat (limited to 'src/WriteScalar.c')
-rw-r--r-- | src/WriteScalar.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/WriteScalar.c b/src/WriteScalar.c index f0902a3..58a467b 100644 --- a/src/WriteScalar.c +++ b/src/WriteScalar.c @@ -113,7 +113,7 @@ int IOBasic_WriteScalar (const cGH *GH, int vindex, const char *alias) suitable for postprocessing by either gnuplot or xgraph. @enddesc - @calls CCTK_Reduce + @calls CCTK_ReduceGridArrays CCTK_ReductionHandle IOUtil_RestartFromRecovery IOUtil_AdvertiseFile @@ -149,7 +149,15 @@ static int IOBasic_WriteScalarGA (const cGH *GH, int vindex, const char *alias) iobasic_reduction_t *reduction; DECLARE_CCTK_PARAMETERS - + int input_array[1]; + CCTK_INT output_array_type_codes[1]; + CCTK_REAL output_value; + void * reduction_value[1]; + + input_array[0] = vindex; + output_array_type_codes[0] = CCTK_VARIABLE_REAL; + reduction_value[0] = &output_value; + /* set output format */ sprintf (format_str, "%%%s\t%%%s\n", out_format, out_format); @@ -164,9 +172,9 @@ static int IOBasic_WriteScalarGA (const cGH *GH, int vindex, const char *alias) while (reduction) { /* do the reduction (all processors) */ - reduction->is_valid = CCTK_Reduce (GH, 0, reduction->handle, 1, - CCTK_VARIABLE_REAL, - &reduction->value, 1, vindex) == 0; + reduction->is_valid = CCTK_ReduceGridArrays (GH, 0, reduction->handle, -1, 1, input_array , 1, output_array_type_codes, reduction_value) == 0; + reduction->value = output_value; + if (! reduction->is_valid) { CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, |