From d711c5b48379e1a16af630ec9a513bae2236c3be Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Keck <Jean-Baptiste.Keck@imag.fr>
Date: Mon, 25 Feb 2019 20:47:58 +0100
Subject: [PATCH] removed annoying interpolation logs from scales, working
 scaling for opencl multiscale energy

---
 examples/multiresolution/scalar_advection.py              | 2 +-
 hysop/backend/device/opencl/operator/spatial_filtering.py | 4 ++--
 hysop/operator/base/spectral_operator.py                  | 1 -
 src/scalesInterface/particles/advec.f90                   | 2 +-
 src/scalesInterface/particles/advec_Vector.f90            | 2 +-
 5 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/examples/multiresolution/scalar_advection.py b/examples/multiresolution/scalar_advection.py
index 45579d9fd..f9123b0ae 100644
--- a/examples/multiresolution/scalar_advection.py
+++ b/examples/multiresolution/scalar_advection.py
@@ -123,7 +123,7 @@ def compute(args):
                              output_variables={scalar: npts},
                              filtering_method=FilteringMethod.SPECTRAL,
                              plot_input_energy=IOParams(filename='E_fine_{fname}_{it}', frequency=args.dump_freq),
-                             #plot_output_energy=IOParams(filename='E_coarse_{fname}_{it}', frequency=args.dump_freq),
+                             plot_output_energy=IOParams(filename='E_coarse_{fname}_{it}', frequency=args.dump_freq),
                              implementation=impl,
                              **extra_op_kwds)
     
diff --git a/hysop/backend/device/opencl/operator/spatial_filtering.py b/hysop/backend/device/opencl/operator/spatial_filtering.py
index cf35c5b1d..b04b9a82d 100644
--- a/hysop/backend/device/opencl/operator/spatial_filtering.py
+++ b/hysop/backend/device/opencl/operator/spatial_filtering.py
@@ -33,7 +33,7 @@ class OpenClSpectralLowpassFilter(SpectralLowpassFilterBase, OpenClOperator):
         #  the kernel_generator to fill ones and use explicit copy kernels
         
         # This seems to be the only solution to fill a non C-contiguous 
-        #  input_buffer with ones.
+        # OpenClinput_buffer with ones.
         buf = self.Ft.input_buffer
         buf, = kernel_generator.arrays_to_symbols(buf)
         expr = Assignment(buf, 1)
@@ -48,7 +48,7 @@ class OpenClSpectralLowpassFilter(SpectralLowpassFilterBase, OpenClOperator):
         scaling = 1.0 / self.Bt.output_buffer[(0,)*self.FOUT.ndim].get()
         
         # Now we can finally build the filter scaling kernel
-        fout, = kernel_generator.arrays_to_symbols(self.Bt.output_buffer)
+        fout, = kernel_generator.arrays_to_symbols(self.FOUT)
         expr = Assignment(fout, scaling*fout)
         scale, _ = kernel_generator.elementwise_kernel('scale', expr)
         kl += scale
diff --git a/hysop/operator/base/spectral_operator.py b/hysop/operator/base/spectral_operator.py
index 0e7011a86..4cf985968 100644
--- a/hysop/operator/base/spectral_operator.py
+++ b/hysop/operator/base/spectral_operator.py
@@ -1936,7 +1936,6 @@ SPECTRAL TRANSFORM SETUP
                 unlock_mutexes = FFTI.plan_fill_zeros(tg=tg, a=mutexes_buffer, slices=(Ellipsis,))
                 compute_energy_queue += unlock_mutexes
                 compute_energy_queue().wait()  # we need this before compute energy to unlock mutexes
-                print mutexes_buffer.get()
             compute_energy_queue += FFTI.plan_compute_energy(tg=tg,
                                                          fshape=field_buffer.shape,
                                                          src=spectral_buffer, dst=energy_buffer,
diff --git a/src/scalesInterface/particles/advec.f90 b/src/scalesInterface/particles/advec.f90
index a34d30614..897e6a8d7 100644
--- a/src/scalesInterface/particles/advec.f90
+++ b/src/scalesInterface/particles/advec.f90
@@ -234,7 +234,7 @@ subroutine advec_step_Inter_basic(dt, Vx, Vy, Vz, scal)
     call Interpol_3D(Vx, mesh_V%dx, Vx_f, mesh_sc%dx)
     call Interpol_3D(Vy, mesh_V%dx, Vy_f, mesh_sc%dx)
     call Interpol_3D(Vz, mesh_V%dx, Vz_f, mesh_sc%dx)
-    if (cart_rank==0) write(6,'(a)') '        [INFO PARTICLES] Interpolation done'
+    !if (cart_rank==0) write(6,'(a)') '        [INFO PARTICLES] Interpolation done'
 
     call advec_step_Torder2(dt, Vx_f, Vy_f, Vz_f, scal)
 
diff --git a/src/scalesInterface/particles/advec_Vector.f90 b/src/scalesInterface/particles/advec_Vector.f90
index 6ddef2ca6..43d1f1c59 100644
--- a/src/scalesInterface/particles/advec_Vector.f90
+++ b/src/scalesInterface/particles/advec_Vector.f90
@@ -92,7 +92,7 @@ subroutine advec_step_Inter_basic_Vect(dt, Vx, Vy, Vz, vectX, vectY, vectZ)
     call Interpol_3D(Vx, mesh_V%dx, Vx_f, mesh_sc%dx)
     call Interpol_3D(Vy, mesh_V%dx, Vy_f, mesh_sc%dx)
     call Interpol_3D(Vz, mesh_V%dx, Vz_f, mesh_sc%dx)
-    if (cart_rank==0) write(6,'(a)') '        [INFO PARTICLES] Interpolation done'
+    !if (cart_rank==0) write(6,'(a)') '        [INFO PARTICLES] Interpolation done'
 
     call advec_step_Vect(dt, Vx_f, Vy_f, Vz_f, vectX, vectY, vectZ)
 
-- 
GitLab