diff options
Diffstat (limited to 'src/ReductionAvg.c')
-rw-r--r-- | src/ReductionAvg.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ReductionAvg.c b/src/ReductionAvg.c index 24cb152..ac3f8ce 100644 --- a/src/ReductionAvg.c +++ b/src/ReductionAvg.c @@ -137,6 +137,7 @@ static int ReductionAvg (int N_dims, int operator_handle, int i, j, k, flag, product, num_points; int ierr; int * iters_per_dim; + int global_calling = 0; /* indices to hold the temp indices of size N_dims and iteration indices*/ int * indices; @@ -1233,8 +1234,9 @@ static int ReductionAvg (int N_dims, int operator_handle, num_points--; - /* store the number of points in the paramater table */ - if ( Util_TableQueryNKeys(param_table_handle) != 0) + /* store the number of points in the paramater table and perform division */ + ierr = Util_TableGetInt(param_table_handle, &global_calling, "global_calling"); + if ( global_calling != 0) { ierr = Util_TableSetInt(param_table_handle, num_points, "num_points"); ierr = Util_TableSetInt(param_table_handle, 3,"mpi_operation"); |