diff options
author | yye00 <yye00@89daf98e-ef62-4674-b946-b8ff9de2216c> | 2005-12-07 22:18:11 +0000 |
---|---|---|
committer | yye00 <yye00@89daf98e-ef62-4674-b946-b8ff9de2216c> | 2005-12-07 22:18:11 +0000 |
commit | c4a3d4ee1c4128763a104036b196120557cdb42b (patch) | |
tree | 999d6e3d505e9846342d74641c7a38e66ef55f7c /src/AHFinder_mask.F | |
parent | 442fa01989f63543f07fe90bea429b2100022da3 (diff) |
changes to AHFinder to use the new reduction API. Some problems appeared when converting AHFinder_int.F, irregularities with behavior, MPI stalls etc... This is currently being investigated.
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinder/trunk@383 89daf98e-ef62-4674-b946-b8ff9de2216c
Diffstat (limited to 'src/AHFinder_mask.F')
-rw-r--r-- | src/AHFinder_mask.F | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/AHFinder_mask.F b/src/AHFinder_mask.F index 4153a27..a781ca5 100644 --- a/src/AHFinder_mask.F +++ b/src/AHFinder_mask.F @@ -38,6 +38,11 @@ CCTK_REAL buffer,dd,aux CCTK_REAL xa,ya,za +! Reduction variables + CCTK_INT, dimension(1) :: input_array_dim + CCTK_POINTER_TO_CONST, dimension(1) :: input_array + CCTK_POINTER, dimension(1) :: reduction_value + ! ******************* ! *** NUMBERS *** @@ -115,13 +120,18 @@ ! Now find the minimum of rhor across processors. reduce_handle = -1 - call CCTK_ReductionArrayHandle(reduce_handle,"minimum") + call CCTK_LocalArrayReductionHandle(reduce_handle,"minimum") if (reduce_handle.lt.0) then call CCTK_WARN(1,"Cannot get handle for minimum reduction ! Forgot to activate an implementation providing reduction operators ??") end if - call CCTK_ReduceLocalScalar(ierr ,cctkGH,-1,reduce_handle, - . rhor,rhortemp,CCTK_VARIABLE_REAL) + input_array_dim(1) = zero + input_array(1) = CCTK_PointerTo(rhor) + reduction_value(1) = CCTK_PointerTo(rhortemp) + call CCTK_ReduceArraysGlobally(ierr, cctkGH, -1,reduce_handle, -1, + . 1, input_array,0, input_array_dim, CCTK_VARIABLE_INT, 1, + . CCTK_VARIABLE_INT, reduction_value) + rhor = rhortemp if (ierr.ne.0) then |