13 """ExaHyPE 2 - ExaHyPE is an open source simulation engine to solve
14 hyperbolic PDE systems. It is built on top of dynamically
15 adaptive Cartesian meshes and offers support for Finite Volume,
16 Runge-Kutta Discontinuous Galerkin and ADER-DG discretisations.
17 ExaHyPE is written in a way that most computer science aspects
18 as well as most of the numerics are hidden away from the user:
19 Users plug in user functions for their PDE formulation
20 (such as flux functions and eigenvalues) into the engine and
21 then delegate all further work to ExaHyPE.
24 homepage =
"www.peano-framework.org"
25 url =
"https://gitlab.lrz.de/hpcsoftware/Peano"
26 git =
"https://gitlab.lrz.de/hpcsoftware/Peano.git"
28 maintainers(
"hpcsoftware")
30 version(
"muc", branch=
"muc/exahype")
32 variant(
"mpi", default=
True, description=
"Build with MPI support")
33 variant(
"tracer", default=
True, description=
"Build with particle tracer support")
34 variant(
"hdf5", default=
True, description=
"Build with HDF5 support")
35 variant(
"netcdf", default=
True, description=
"Build with NetCDF support")
37 depends_on(
"cmake@3.31.2")
39 depends_on(
"mpi", when=
"+mpi")
41 depends_on(
"python@3.13.0")
42 depends_on(
"py-pip@24.3.1")
44 depends_on(
"hdf5@1.14.5 -fortran -java +threadsafe ~mpi +shared +cxx +hl", when=
"~mpi +hdf5")
45 depends_on(
"hdf5@1.14.5 -fortran -java +threadsafe +mpi +shared +cxx +hl", when=
"+mpi +hdf5")
47 depends_on(
"netcdf-c@4.9.2 +shared ~mpi", when=
"~mpi +netcdf")
48 depends_on(
"netcdf-c@4.9.2 +shared +mpi", when=
"+mpi +netcdf")
49 depends_on(
"netcdf-cxx4@4.3.1 +shared +pic", when=
"+netcdf")
52 depends_on(
'libxsmm@1.17 +generator')
54 variant(
"omp", default=
True, description=
"Build with OpenMP multithreading support")
55 variant(
"sycl", default=
False, description=
"Build with SYCL multithreading support")
56 variant(
"cpp", default=
False, description=
"Build with std::par multithreading support")
57 variant(
"tbb", default=
False, description=
"Build with TBB multithreading support")
59 conflicts(
"+omp", when=
"+sycl", msg=
"OpenMP and SYCL support are exclusive")
60 conflicts(
"+omp", when=
"+cpp", msg=
"OpenMP and std::par support are exclusive")
61 conflicts(
"+sycl", when=
"+cpp", msg=
"SYCL and std::par support are exclusive")
62 conflicts(
"+tbb", when=
"+cpp", msg=
"TBB and std::par support are exclusive")
63 conflicts(
"+tbb", when=
"+sycl", msg=
"TBB and SYCL support are exclusive")
64 conflicts(
"+tbb", when=
"+omp", msg=
"TBB and OpenMP support are exclusive")
66 depends_on(
"cuda@11:", when=
"+cuda")
71 msg=
"A value for cuda_arch must be specified. Add cuda_arch=XX",
77 description=
"GPU accelerator backend",
78 values=(
"omp",
"cpp",
"sycl",
"cuda"),
85 "-DENABLE_TOOLBOX_LOADBALANCING=ON",
86 "-DENABLE_TOOLBOX_BLOCKSTRUCTURED=ON",
87 "-DENABLE_EXTENSIONEXAHYPE=ON",
89 self.define_from_variant(
"WITH_MPI",
"mpi"),
90 self.define_from_variant(
"WITH_HDF5",
"hdf5"),
91 self.define_from_variant(
"WITH_NETCDF",
"netcdf"),
92 self.define_from_variant(
"ENABLE_TOOLBOX_PARTICLES",
"tracer"),
95 if self.spec.satisfies(
"+omp"):
96 args.append(
"-DWITH_MULTITHREADING=omp")
97 if self.spec.satisfies(
"+cpp"):
98 args.append(
"-DWITH_MULTITHREADING=cpp")
99 if self.spec.satisfies(
"+sycl"):
100 args.append(
"-DWITH_MULTITHREADING=sycl")
101 if self.spec.satisfies(
"+tbb"):
102 args.append(
"-DWITH_MULTITHREADING=tbb")
104 if self.spec.satisfies(
"+cuda"):
105 cuda_arch = self.spec.variants[
"cuda_arch"].value[0]
106 gpu_backend = self.spec.variants[
"gpu_backend"].value
107 args.append(f
"-DWITH_GPU={gpu_backend}")
108 args.append(f
"-DWITH_GPU_ARCH=sm_{cuda_arch}")
114 super(Exahype2, self).
install(spec, prefix)
116 python_exe = Executable(spec[
'python'].command.path)
118 requirements_path = join_path(self.stage.source_path,
'requirements.txt')
119 if os.path.exists(requirements_path):
120 python_exe(
'-m',
'pip',
'install',
'--prefix=' + prefix,
'-r', requirements_path)
124 env.set(
"PEANO_SRC_ROOT_DIR", self.spec.prefix)
125 env.set(
"PEANO_CMAKE_BUILD_DIR", self.spec.prefix)
126 env.prepend_path(
"PYTHONPATH", self.spec.prefix +
"/python")
127 env.prepend_path(
"PYTHONPATH", join_path(self.spec.prefix,
"lib",
"python" +
str(self.spec[
"python"].version.up_to(2)),
"site-packages"))
ExaHyPE 2 - ExaHyPE is an open source simulation engine to solve hyperbolic PDE systems.
def setup_run_environment(self, env)
def install(self, spec, prefix)