From 019f6271792eba1d1d4d9c385bd545638d8d3cc4 Mon Sep 17 00:00:00 2001 From: tradke Date: Wed, 20 Oct 1999 05:38:52 +0000 Subject: Small change to CCTK_ReduceLocalArray1D() which does now element-wise reduction on a single array. I'm not sure about the name of this function, it could have two meanings depending on the definition of 'array': 1) Every processor has its own array and wants to apply a reduction operation on each element with the corresponding elements of other processors' arrays. That's what CCTK_ReduceLocalArray1D() is doing now. 2) The array is a global, shared one (like a grid function), and reduction is done on all elements, resulting in a single output value. Any idea about another name to avoid this ambiguousness ? Thomas git-svn-id: http://svn.cactuscode.org/flesh/trunk@1067 17b73243-c579-4c4c-a9d2-2d5706c11dac --- src/comm/Reduction.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/comm/Reduction.c b/src/comm/Reduction.c index 9d58b420..1256fcdb 100644 --- a/src/comm/Reduction.c +++ b/src/comm/Reduction.c @@ -668,7 +668,7 @@ int CCTK_ReduceLocalArray1D (cGH *GH, int proc, int operation_handle, { return (CCTK_ReduceArray (GH, proc, operation_handle, num_in_array1d, data_type, out_array1d, - 1, 1, data_type, 1, in_array1d)); + 1, 1, data_type, num_in_array1d, in_array1d)); } void FMODIFIER FORTRAN_NAME(CCTK_ReduceLocalArray1D)(int *fortran_return, @@ -682,6 +682,7 @@ void FMODIFIER FORTRAN_NAME(CCTK_ReduceLocalArray1D)(int *fortran_return, { *fortran_return = CCTK_ReduceArray (GH, *proc, *operation_handle, *num_in_array1d, *data_type, out_array1d, - 1, 1, *data_type, 1,in_array1d); + 1, 1, *data_type, *num_in_array1d, + in_array1d); } -- cgit v1.2.3