From a31551cae509597ca53382019ca453ef64d40b64 Mon Sep 17 00:00:00 2001 From: Frederik Hennig <frederik.hennig@fau.de> Date: Thu, 25 Jul 2024 13:04:33 +0200 Subject: [PATCH] Fix two compatibility issues --- .../advanced_streaming/test_advanced_streaming_noslip.py | 2 +- tests/benchmark/test_benchmark.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/advanced_streaming/test_advanced_streaming_noslip.py b/tests/advanced_streaming/test_advanced_streaming_noslip.py index 547d14ac..d6acc6d6 100644 --- a/tests/advanced_streaming/test_advanced_streaming_noslip.py +++ b/tests/advanced_streaming/test_advanced_streaming_noslip.py @@ -43,7 +43,7 @@ def test_advanced_streaming_noslip_single_cell(stencil, streaming_pattern, prev_ index_struct_dtype = numpy_data_type_for_boundary_object(noslip, stencil.D) index_field = Field('indexVector', FieldType.INDEXED, index_struct_dtype, layout=[0], - shape=(TypedSymbol("indexVectorSize", np.int64), 1), strides=(1, 1)) + shape=(TypedSymbol("indexVectorSize", np.int32), 1), strides=(1, 1)) index_vector = np.array([pos + (d,) for d in range(stencil.Q)], dtype=index_struct_dtype) ast = create_lattice_boltzmann_boundary_kernel(pdf_field, diff --git a/tests/benchmark/test_benchmark.py b/tests/benchmark/test_benchmark.py index a59d0510..1680a547 100644 --- a/tests/benchmark/test_benchmark.py +++ b/tests/benchmark/test_benchmark.py @@ -4,7 +4,13 @@ import numpy as np import sympy as sp from lbmpy.scenarios import create_lid_driven_cavity -from pystencils.cpu.cpujit import add_or_change_compiler_flags +from lbmpy._compat import IS_PYSTENCILS_2 + +if IS_PYSTENCILS_2: + from pystencils.backend.jit.legacy_cpu import add_or_change_compiler_flags +else: + from pystencils.cpu.cpujit import add_or_change_compiler_flags + from pystencils.runhelper import ParameterStudy -- GitLab