Skip to content
Snippets Groups Projects
Commit ecaa70ea authored by Frederik Hennig's avatar Frederik Hennig
Browse files

extend DEBUG_ENV. Fix abstract field allocator.

parent 8ff0f780
Branches
Tags release/0.4.1
No related merge requests found
Pipeline #75896 failed with stages
in 9 minutes and 13 seconds
...@@ -91,3 +91,17 @@ class WalberlaBuildConfig: ...@@ -91,3 +91,17 @@ class WalberlaBuildConfig:
class DEBUG_ENV: class DEBUG_ENV:
BUILD_CONFIG: WalberlaBuildConfig | None = None 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,
)
...@@ -17,11 +17,9 @@ from lbmpy.macroscopic_value_kernels import macroscopic_values_setter ...@@ -17,11 +17,9 @@ from lbmpy.macroscopic_value_kernels import macroscopic_values_setter
from walberla.codegen import Sweep from walberla.codegen import Sweep
from walberla.codegen.boundaries import FreeSlip 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_ENV.use_hip_default()
"debug", "debug", True, False, True, True, False, True, False
)
with SourceFileGenerator(keep_unknown_argv=True) as sfg: with SourceFileGenerator(keep_unknown_argv=True) as sfg:
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
......
...@@ -177,7 +177,7 @@ struct SimDomainBuilder ...@@ -177,7 +177,7 @@ struct SimDomainBuilder
#if defined(LBM_SCENARIOS_GPU_BUILD) #if defined(LBM_SCENARIOS_GPU_BUILD)
auto hostAlloc = make_shared< gpu::HostFieldAllocator< PdfField_T::value_type > >(); auto hostAlloc = make_shared< gpu::HostFieldAllocator< PdfField_T::value_type > >();
#else #else
auto hostAlloc = make_shared< field::FieldAllocator< PdfField_T::value_type > >(); auto hostAlloc = make_shared< field::StdFieldAlloc< PdfField_T::value_type > >();
#endif #endif
const BlockDataID pdfsId = field::addToStorage< PdfField_T >(sbfs, "f", real_c(0.0), field::fzyx, 1, hostAlloc); const BlockDataID pdfsId = field::addToStorage< PdfField_T >(sbfs, "f", real_c(0.0), field::fzyx, 1, hostAlloc);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment