From 4d12255f805ed4a0c8de19b7188eca15e4058797 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Keck <Jean-Baptiste.Keck@imag.fr> Date: Sun, 16 Dec 2018 16:02:04 +0100 Subject: [PATCH] test advection --- ci/scripts/test.sh | 18 +++++++++--------- .../codegen/kernels/directional_advection.py | 3 ++- hysop/numerics/fft/gpyfft_fft.py | 4 ++++ 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/ci/scripts/test.sh b/ci/scripts/test.sh index 51b8b970e..f25d5a2bb 100755 --- a/ci/scripts/test.sh +++ b/ci/scripts/test.sh @@ -52,15 +52,15 @@ python -c 'import hysop; print hysop' #python "$HYSOP_DIR/backend/device/codegen/kernels/tests/test_directional_advection.py" #python "$HYSOP_DIR/backend/device/codegen/kernels/tests/test_directional_remesh.py" -python "$HYSOP_DIR/core/arrays/tests/test_array.py" -python "$HYSOP_DIR/core/graph/tests/test_graph.py" -python "$HYSOP_DIR/fields/tests/test_fields.py" -$HYSOP_DIR/fields/tests/test_cartesian.sh -python "$HYSOP_DIR/numerics/tests/test_fft.py" -python "$HYSOP_DIR/operator/tests/test_analytic.py" -python "$HYSOP_DIR/operator/tests/test_transpose.py" -python "$HYSOP_DIR/operator/tests/test_fd_derivative.py" -python "$HYSOP_DIR/operator/tests/test_absorption.py" +#python "$HYSOP_DIR/core/arrays/tests/test_array.py" +#python "$HYSOP_DIR/core/graph/tests/test_graph.py" +#python "$HYSOP_DIR/fields/tests/test_fields.py" +#$HYSOP_DIR/fields/tests/test_cartesian.sh +#python "$HYSOP_DIR/numerics/tests/test_fft.py" +#python "$HYSOP_DIR/operator/tests/test_analytic.py" +#python "$HYSOP_DIR/operator/tests/test_transpose.py" +#python "$HYSOP_DIR/operator/tests/test_fd_derivative.py" +#python "$HYSOP_DIR/operator/tests/test_absorption.py" python "$HYSOP_DIR/operator/tests/test_directional_advection.py" python "$HYSOP_DIR/operator/tests/test_directional_diffusion.py" python "$HYSOP_DIR/operator/tests/test_directional_stretching.py" diff --git a/hysop/backend/device/codegen/kernels/directional_advection.py b/hysop/backend/device/codegen/kernels/directional_advection.py index 594380a69..c364732e1 100644 --- a/hysop/backend/device/codegen/kernels/directional_advection.py +++ b/hysop/backend/device/codegen/kernels/directional_advection.py @@ -590,8 +590,9 @@ class DirectionalAdvectionKernelGenerator(KernelCodeGenerator): i='idx', N=V_cache_width, Lx=local_id[0], gsize=local_size[0]) with s._for_(loop): - code='{dst}[{i}] = 0.0;'.format(i='idx', dst=Vc) + code='{dst}[{i}] = 0.5;'.format(i='idx', dst=Vc) s.append(code) + s.barrier(_local=True) else: code='event_t event = async_work_group_copy({dst}, {src}, {ne}, {event});'.format( dst=Vc, src=line_velocity, ne=V_cache_width, event=0) diff --git a/hysop/numerics/fft/gpyfft_fft.py b/hysop/numerics/fft/gpyfft_fft.py index 3fb175c41..341a449fc 100644 --- a/hysop/numerics/fft/gpyfft_fft.py +++ b/hysop/numerics/fft/gpyfft_fft.py @@ -1250,6 +1250,10 @@ class GpyFFT(OpenClFFTI): - real planning capability (but no explicit caching capabilities) - injection of custom opencl code for pre and post processing. + It also has some disadvantages: + - Bad OpenCL CPU devices support + - The library is to greedy with temporary buffers for big transforms. + Planning may destroy initial arrays content. Executing a plan may result in unwanted writes to output data, see notes. -- GitLab