diff --git a/src/walberla/codegen/build_config.py b/src/walberla/codegen/build_config.py index df9bd71d4fa3181cf1c2b7adeb61d9956dddd43e..38f94713b4ee62d73400da2409f1348a345170a0 100644 --- a/src/walberla/codegen/build_config.py +++ b/src/walberla/codegen/build_config.py @@ -91,3 +91,17 @@ class WalberlaBuildConfig: class DEBUG_ENV: BUILD_CONFIG: WalberlaBuildConfig | None = None + + @staticmethod + def use_hip_default(): + DEBUG_ENV.BUILD_CONFIG = WalberlaBuildConfig( + c_compiler_id="hipcc", + cxx_compiler_id="hipcc", + use_double_precision=True, + optimize_for_localhost=False, + mpi_enabled=False, + openmp_enabled=False, + hip_enabled=True, + cuda_enabled=False, + likwid_enabled=False, + ) diff --git a/tests/BasicLbmScenarios/LbmAlgorithms.py b/tests/BasicLbmScenarios/LbmAlgorithms.py index 08206ea75c0ad9624f0b11e9297f176f974572fb..be8aadc3215138c7410f656de8dcfcbff39ee023 100644 --- a/tests/BasicLbmScenarios/LbmAlgorithms.py +++ b/tests/BasicLbmScenarios/LbmAlgorithms.py @@ -17,11 +17,9 @@ from lbmpy.macroscopic_value_kernels import macroscopic_values_setter from walberla.codegen import Sweep from walberla.codegen.boundaries import FreeSlip -from walberla.codegen.build_config import DEBUG_ENV, WalberlaBuildConfig +from walberla.codegen.build_config import DEBUG_ENV -DEBUG_ENV.BUILD_CONFIG = WalberlaBuildConfig( - "debug", "debug", True, False, True, True, False, True, False -) +DEBUG_ENV.use_hip_default() with SourceFileGenerator(keep_unknown_argv=True) as sfg: parser = argparse.ArgumentParser() diff --git a/tests/BasicLbmScenarios/SimDomain.hpp b/tests/BasicLbmScenarios/SimDomain.hpp index 192d17e8a05a679255cf1141ea494a6854131303..41532a5e53cceef16a61f5e3f756da74990442ff 100644 --- a/tests/BasicLbmScenarios/SimDomain.hpp +++ b/tests/BasicLbmScenarios/SimDomain.hpp @@ -177,7 +177,7 @@ struct SimDomainBuilder #if defined(LBM_SCENARIOS_GPU_BUILD) auto hostAlloc = make_shared< gpu::HostFieldAllocator< PdfField_T::value_type > >(); #else - auto hostAlloc = make_shared< field::FieldAllocator< PdfField_T::value_type > >(); + auto hostAlloc = make_shared< field::StdFieldAlloc< PdfField_T::value_type > >(); #endif const BlockDataID pdfsId = field::addToStorage< PdfField_T >(sbfs, "f", real_c(0.0), field::fzyx, 1, hostAlloc);