Peano
Loading...
Searching...
No Matches
Project.py
Go to the documentation of this file.
1# This file is part of the ExaHyPE2 project. For conditions of distribution and
2# use, please see the copyright notice at www.peano-framework.org
3import peano4.api
5from peano4.api.taskgraph.compiler.PropagateUseStatements import propagate_use_statements
6from peano4.api.taskgraph.compiler.DeriveLoadStoreComputeFlag import derive_load_store_compute_flag
7
8import dastgen2
9
10import abc
11import os
12import sys
13
14
15class Project(object):
16 """!
17
18 ExaHyPE 2 project
19
20 Represents an ExaHyPE 2 project. An ExaHyPE2 project is a Peano 4
21 project with a particular set of actions (algorithmic phases)
22 that you can choose from and with particular solver types. It
23 realises a builder mechanism, i.e. you build up your ExaHyPE 2
24 project and then you finally tell the project "give me the Peano 4
25 project". From hereon, you can use this Peano 4 project to actually
26 set up the Peano 4 application.
27
28 The project will have a marker per cell that encodes stuff alike
29 a boundary marker. But it is also used to coordinate different
30 solver types.
31
32 @see generate_Peano4_project()
33 """
34
35 class Generator(abc.ABC):
36 """!
37
38 Base class for the code generation steps that turn an ExaHyPE 2
39 Project's configuration into actual generated files.
40
41 generate_Peano4_project() below currently does this work inline (see
42 the "@todo Has to go into a generator" note in there); the various
43 steps it performs (writing the solver implementation files, the
44 solver repository, the main file, ...) are meant to become Generator
45 subclasses instead, of which SolverToCPPFiles is the first.
46
47 """
48
49 def __init__(self, project: "Project"):
50 self.project = project
51
52 @abc.abstractmethod
53 def construct_output(self, peano_project):
54 """!
55 Add this generator's output to peano_project (a
56 peano4.api.Project-compatible object, or anything else that
57 add()'s cleanly into peano_project.output). This is the one
58 thing every Generator has to implement.
59
60 peano_project: peano4.api.Project
61 The Peano 4 project that self.project.generate_Peano4_project()
62 is currently assembling. It is a local variable there, not an
63 attribute - merely passed through here, so this generator can
64 add its own artefacts to it.
65 """
66
67 def __init__(self, namespace, project_name, executable, directory=".", subdirectory="", abstract_overwrite=True):
68 # Kept around only to construct the peano4.api.Project afresh each
69 # time generate_Peano4_project() runs - see there. That project is a
70 # local variable, not an attribute: repeated calls to
71 # generate_Peano4_project() must yield an independent snapshot
72 # rather than accumulate onto a stale, shared instance.
73 self._namespace = namespace
74 self._project_name = project_name
75 self._directory = directory
76 self._subdirectory = subdirectory
77 self._abstract_overwrite = abstract_overwrite
78
79 self._solvers = []
80 self._domain_offset = [0.0, 0.0, 0.0]
81 self._domain_size = [1.0, 1.0, 1.0]
82 self._dimensions = 3
87 self._log_filter_file = "exahype2.log-filter"
88 self._number_of_threads = "tarch::multicore::Core::UseDefaultNumberOfThreads"
89 self._multicore_orchestration = "tarch::multicore::orchestration::createDefaultStrategy()"
90 self._timeout = 3600
91 self._gpus = []
92 self._step_report_class = "peano4::DefaultStepReport"
93 self._additional_includes = [ "tarch/logging/LogFilterFileReader.h",
94 "tarch/accelerator/Device.h"
95 ]
97 self._build_mode = peano4.api.output.CompileMode.ASSERTS
98 self._executable_name = executable
99 self._periodic_BC = [False, False, False]
100 self._output_path = "./"
101
102 # Turns this project's configuration into the header/implementation
103 # file pair holding main(). Defaults to an ExaHyPE-flavoured main
104 # similar to python/exahype2/ExaHyPEMain.template.h/.cpp; assign a
105 # different Project.Generator subclass instance to use your own.
106 from .generators.DefaultSimulationMain import DefaultSimulationMain
107 self.mainfile_generator = DefaultSimulationMain(self)
108
109 # Generates repositories/SolverRepository.h/.cpp (one extern
110 # instance per registered solver, plus the getMinTimeStamp()/
111 # getMaxTimeStamp() aggregators).
112 from .generators.SolverRepositoryGenerator import SolverRepositoryGenerator
113 self.solver_repository_generator = SolverRepositoryGenerator(self)
114
115 # Translates each of the four algorithmic phases' task graphs into a
116 # sequence of Observers (peano4.api.solversteps.Step). Defaults to
117 # the simplest possible compiler, which just linearises the task
118 # graph without exploiting any of its parallelism; assign a
119 # different translate() routine (e.g. from a hypothetical
120 # peano4.api.taskgraph.compiler.Parallel) to use a smarter one.
121 self.compiler = peano4.api.taskgraph.compiler.Sequential.translate
122
123
124 def set_load_balancing(self, load_balancer_name, load_balancer_arguments=""):
125 """! Set load balancing scheme
126
127 The load balancing scheme controls how subtress are distributed both
128 among ranks and threads, i.e. the instance is important for MPI but
129 also whenever you use any multithreading strategy.
130
131 Similar to set_multicore_orchestration(), you have to let the project
132 know about where the load balancing is held. If you rely on the
133 load balancing toolbox and if you have configured Peano with the
134 load balancing toolbox, then simply adding the right eader is
135 sufficient:
136
137 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
138 project.add_mainfile_include( "toolbox/loadbalancing/strategies/Hardcoded.h)
139 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
140
141 If you use a bespoke load balancing, you also have to add the
142 implementation file or hosting library to the project.
143
144 @param load_balancer_name: string
145 Should be full-qualified name of the load balancer.
146 By default, I recommend to pass "toolbox::loadbalancing::strategies::RecursiveSubdivision".
147
148 @param load_balancer_arguments: string
149 If your load balancing requires parameters, add them
150 here. It is a string that will be copied into the C++ class instantiation.
151 Please add the brackets yourself, i.e. "(3,4,5)" is fine, but "3,4,5" is not.
152 The only exception is the empty parameter list. Here, you can/should simply
153 add the empty string.
154 """
155 self._load_balancer_name = load_balancer_name
156 self._load_balancer_arguments = load_balancer_arguments
157
158
159 def set_log_filter_file(self, file_name):
160 """! Set a log filter file name
161
162 Pass in the empty string, if you don't want the code to use the
163 hard-coded defaults. That is, by default an ExaHyPE2 application
164 searches for a file exahype2.log-filter. Through this call, you can
165 instruct the project to use another filter file.
166
167 @param file_name String
168 Name of the log filter file that the application should load on
169 startup.
170
171 """
172 self._log_filter_file = file_name
173
174
175 def set_number_of_threads(self, value):
176 """! Set number of threads to use
177
178 Pass in number of threads (positive integer) or a string such as
179 "tarch::multicore::Core::UseDefaultNumberOfThreads". Please note that
180 this value is handed through to Peano which in turn passes it on the
181 tarch::multicore::Core::configure(int). It then depends on the
182 multithreading backend if this backend allows you to set the thread
183 count manually. Many backends (such as OpenMP) do not allow this,
184 but require users to use environment variables (or scheduler options)
185 instead.
186
187 """
188 self._number_of_threads = value
189
190
192 """! Set orchestration
193
194 The orchestration accepts one value which is a C++ statement. This
195 value has to be a string which creates an orchestration object,
196 i.e. an object of the type tarch::multicore::orchestration::Orchestration,
197 on the heap.
198
199 You can either create it directly (in this case you need to add a new),
200 or you can use a factory method such as
201 tarch::multicore::orchestration::StrategyFactory::createDefaultStrategy().
202
203 Depending on where you come from, you might have to add the strategy's
204 header file to the project explicitly. By default, the ExaHyPE 2
205 project only is aware of very few strategies. Here's an example:
206
207 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
208 project.add_mainfile_include( "tarch/multicore/orchestration/Hardcoded.h")
209 project.set_multicore_orchestration(
210 "new benchmarks::exahype2::ccz4::MulticoreOrchestration()"
211 )
212 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
213
214 @see exahype2.Project.add_mainfile_include()
215 @param value C++ expression delivering a new orchestration object on the heap
216
217 """
218 self._multicore_orchestration = value
219
220
221 def set_timeout(self, value):
222 """! Set timeout
223 value has to be a number greater or equal to zero, this then sets the
224 timeout in seconds after which a node waiting for an MPI message shall
225 quit an shutdown the whole application with an error report.
226 If zero is passed, this feature is switched off and nodes will wait
227 indefinitely.
228 """
229 if value < 0:
230 raise Exception("Timeout has to be greater or equal to 0")
231 self._timeout = value
232
233
234 def set_step_report_class(self, class_name):
235 """! Set the C++ class the generated main instantiates to report on steps
236
237 class_name: str
238 Fully qualified C++ class name (e.g. "peano4::DefaultStepReport",
239 the default) of a peano4::RunMultipleSteps::Report subclass. The
240 generated main creates exactly one instance of it, so the class
241 has to be default-constructible. If you pass in anything other
242 than the default, its header is not included automatically - you
243 have to make it visible to the generated main yourself.
244 """
245 self._step_report_class = class_name
246
247
248 def set_gpus(self, value):
249 """! Set GPUs to be used
250 value is a list of integers or the empty list if you want the code to
251 use all GPUs that are visible to a rank.
252 """
253 self._gpus = value
254
255
256 """
257 The standard extensions that I use for both Peano and ExaHyPE.
258 """
259 LibraryDebug = "_debug"
260 LibraryRelease = ""
261 LibraryTrace = "_trace"
262 LibraryAsserts = "_asserts"
263 LibraryStats = "_stats"
264
265 def set_Peano4_installation(self, src_path, mode=peano4.api.output.CompileMode.RELEASE):
266 """
267 src_path: string
268 Path (relative or absolute) to the src directory of Peano. This path
269 should hold both the headers (in subdirectories) and all the static
270 libraries.
271
272 mode: peano4.api.output.CompileMode
273 """
274 self._Peano_src_directory = src_path
275 self._build_mode = mode
276
277 def add_solver(self, solver):
278 self._solvers.append(solver)
279
281 self._solvers = []
282 self._peano_project.cleanup()
283
284 def __export_constants(self, peano_project):
285 """
286 We export ExaHyPE's constants. Besides the constants from ExaHyPE,
287 we also export some parameters from Peano onto the ExaHyPE constants
288 file. Therefore, it is important that you parse the configure output
289 before we export the constants.
290
291 peano_project: peano4.api.Project
292 The Peano 4 project that generate_Peano4_project() is currently
293 assembling. It is a local variable there, not an attribute -
294 merely passed through here, so this routine can export onto it.
295 """
296 peano_project.constants.clear()
297 offset_string = "{" + str(self._domain_offset[0])
298 size_string = "{" + str(self._domain_size[0])
299 for i in range(1, self._dimensions):
300 offset_string += ","
301 size_string += ","
302 offset_string += str(self._domain_offset[i])
303 size_string += str(self._domain_size[i])
304 offset_string += "}"
305 size_string += "}"
306 peano_project.constants.add_include("""#include <bitset>""")
307 peano_project.constants.add_include("""#include "tarch/la/Vector.h" """)
308 peano_project.constants.add_include("""#include "peano4/utils/Globals.h" """)
309 peano_project.constants.export_const_with_type(
310 "DomainOffset", offset_string, "tarch::la::Vector<Dimensions,double>"
311 )
312 peano_project.constants.export_const_with_type(
313 "DomainSize", size_string, "tarch::la::Vector<Dimensions,double>"
314 )
315 peano_project.constants.export("MinTerminalTime", str(self._min_terminal_time))
317 peano_project.constants.export(
318 "MaxTerminalTime", str(self._max_terminal_time)
319 )
320 else:
321 peano_project.constants.export(
322 "MaxTerminalTime", "std::numeric_limits<double>::max()"
323 )
324
325 peano_project.constants.export_boolean_sequence("PeriodicBC", self._periodic_BC)
326
327 build_string = "python3 "
328 for i in sys.argv:
329 build_string += " "
330 build_string += i
331 peano_project.constants.export_string("BuildInformation", build_string)
332 peano_project.constants.export_string(
333 "ConfigureInformation", peano_project.output.makefile.configure_call
334 )
335
336 for i in self._solvers:
337 readme_descriptor = i.create_readme_descriptor(self._domain_offset[0], self._domain_size[0])
338 if readme_descriptor is not None:
339 peano_project.output.readme.add_entry(readme_descriptor)
340
342 self,
343 dimensions,
344 offset,
345 size,
346 min_end_time,
347 periodic_BC=[False, False, False],
348 max_end_time=0.0,
349 ):
350 """
351 ! Set the global simulation parameters
352
353 @param dimensions: 2 or 3
354
355 @param offset: [Float]
356 Has to have dimension number of entries.
357
358 @param size: [Float}
359 Has to have dimension number of entries and all of them have to be
360 positive. At this point, we strongly suggest that all size entries
361 are exactly the same. While Peano and ExaHyPE do support anisotropic
362 meshes, most compute kernels do not, so working with something else
363 than a square or cube will likely break all numerics.
364
365 @param max_end_time: Float
366 If you set it zero (or actually any value smaller than min_end_time), then
367 the code will run until the cell that lags behind the most hits the min time.
368 If you specify a valid max time however, you can stop the sim as soon as the
369 most advanced cell exceeds this threshold.
370
371 There are no plot settings here: when and how often to plot is
372 configured per solver on its plotter, e.g.
373 exahype2.api.fv.PlotAsVTKFile.
374 """
375 self._domain_offset = offset
376 self._domain_size = size
377 self._dimensions = dimensions
378
379 assert (
380 len(self._domain_offset) == dimensions
381 ), "domain offset vector and dimensions don't match"
382 assert (
383 len(self._domain_size) == dimensions
384 ), "domain offset vector and dimensions don't match"
385
386 self._max_terminal_time = max_end_time
387 self._min_terminal_time = min_end_time
388
389 self._periodic_BC = []
390 for d in range(0, dimensions):
391 self._periodic_BC.append(periodic_BC[d])
392
393 def set_output_path(self, path):
394 self._output_path = path
395 if not os.path.exists(self._output_path):
396 try:
397 os.makedirs(self._output_path)
398 except:
399 print("Couldn't create the defined output path, please ensure that this path exists")
400 if not self._output_path.endswith("/"):
401 self._output_path += "/"
402
403
404 _EXAHYPE_PACKAGE_DESCRIPTION = """
405
406### ExaHyPE 2
407
408This code uses ExaHyPE in its second generation. The first generation of the
409code was developed through an EU FET HPC project called ExaHyPE. This first
410generation was built on top of Peano in its third generation. The present
411code uses ExaHyPE 2 which is a complete rewrite built on top of Peano 4. We
412do not yet have a release paper for this second generation of ExaHyPE, and
413thus appreciate any citation of the original release paper
414
415 @article{Reinarz:2020:ExaHyPE,
416 title = {ExaHyPE: An engine for parallel dynamically adaptive simulations of wave problems},
417 journal = {Computer Physics Communications},
418 volume = {254},
419 pages = {107251},
420 year = {2020},
421 issn = {0010-4655},
422 doi = {https://doi.org/10.1016/j.cpc.2020.107251},
423 url = {https://www.sciencedirect.com/science/article/pii/S001046552030076X},
424 author = {Anne Reinarz and Dominic E. Charrier and Michael Bader and Luke Bovard and Michael Dumbser and Kenneth Duru and Francesco Fambri and Alice-Agnes Gabriel and Jean-Matthieu Gallard and Sven K\"oppel and Lukas Krenz and Leonhard Rannabauer and Luciano Rezzolla and Philipp Samfass and Maurizio Tavelli and Tobias Weinzierl},
425 keywords = {Hyperbolic, PDE, ADER-DG, Finite volumes, AMR, MPI, TBB, MPI+X},
426 abstract = {ExaHyPE (An Exascale Hyperbolic PDE Engine) is a software engine for solving systems of first-order hyperbolic partial differential equations (PDEs). Hyperbolic PDEs are typically derived from the conservation laws of physics and are useful in a wide range of application areas. Applications powered by ExaHyPE can be run on a student's laptop, but are also able to exploit thousands of processor cores on state-of-the-art supercomputers. The engine is able to dynamically increase the accuracy of the simulation using adaptive mesh refinement where required. Due to the robustness and shock capturing abilities of ExaHyPE's numerical methods, users of the engine can simulate linear and non-linear hyperbolic PDEs with very high accuracy. Users can tailor the engine to their particular PDE by specifying evolved quantities, fluxes, and source terms. A complete simulation code for a new hyperbolic PDE can often be realised within a few hours - a task that, traditionally, can take weeks, months, often years for researchers starting from scratch. In this paper, we showcase ExaHyPE's workflow and capabilities through real-world scenarios from our two main application areas: seismology and astrophysics.
427 Program summary
428 Program title: ExaHyPE-Engine Program Files doi: http://dx.doi.org/10.17632/6sz8h6hnpz.1 Licensing provisions: BSD 3-clause Programming languages: C++, Python, Fortran Nature of Problem: The ExaHyPE PDE engine offers robust algorithms to solve linear and non-linear hyperbolic systems of PDEs written in first order form. The systems may contain both conservative and non-conservative terms. Solution method: ExaHyPE employs the discontinuous Galerkin (DG) method combined with explicit one-step ADER (arbitrary high-order derivative) time-stepping. An a-posteriori limiting approach is applied to the ADER-DG solution, whereby spurious solutions are discarded and recomputed with a robust, patch-based finite volume scheme. ExaHyPE uses dynamical adaptive mesh refinement to enhance the accuracy of the solution around shock waves, complex geometries, and interesting features.
429 }
430 }
431"""
432
433 def generate_Peano4_project(self, verbosity=peano4.api.LoggerVerbosity.OFF):
434 """!
435
436 Construct a Peano 4 project and return it
437
438 Build the Peano 4 project, i.e., all the action sets et al that you require
439 to run this ExaHyPE 2 application. The Peano 4 project is a local variable
440 here - a fresh peano4.api.Project - that is populated over the course of
441 this call and eventually returned.
442
443 This routine generates a Peano project, i.e. the domain-specific ExaHyPE
444 view is translated into a Peano model. As the Peano project is not kept
445 around as an attribute, calling generate_Peano4_project() again after you
446 have altered the ExaHyPE setup gives you an independent, fresh snapshot of
447 the Peano setup rather than an accumulation on top of a stale one.
448 """
449 peano4.api.Logger().verbosity = verbosity
450
451 peano_project = peano4.api.Project(
452 self._namespace, self._project_name, self._directory, self._subdirectory
453 )
454 peano_project.output.readme.add_package_description(self._EXAHYPE_PACKAGE_DESCRIPTION_EXAHYPE_PACKAGE_DESCRIPTION)
455
456 peano_project.output.makefile.set_dimension(self._dimensions)
457 peano_project.output.makefile.set_executable_name(self._executable_name)
458 peano_project.output.makefile.set_mode(self._build_mode)
459 peano_project.output.makefile.parse_configure_script_outcome(self._Peano_src_directory)
460
461 self.__export_constants(peano_project)
462
463 # The task graphs for the four algorithmic phases every ExaHyPE 2
464 # project goes through. They only live for the duration of this call
465 # - each solver contributes its tasks into them as it is realised.
466 # The mesh adaptation phase is optional: It remains empty if no
467 # solver has a Solver.MeshAdaptation, and the generated main never
468 # runs an empty phase.
469 setup_simulation = peano4.api.taskgraph.Graph()
470 time_step = peano4.api.taskgraph.Graph()
472 mesh_adaptation = peano4.api.taskgraph.Graph()
473
474 for solver in self._solvers:
475 solver.generate_solver_realisation(
476 self, peano_project, setup_simulation, time_step, plot, mesh_adaptation
477 )
478
479 # Each solver's construct_output() above visualises the (input)
480 # task graph it just contributed to - Setup, TimeStep, Plot and
481 # MeshAdaptation - via Graph.visualise(), which renders without
482 # blocking so all of them can appear together; this is where we
483 # actually pause and let the user look at them before moving on.
484 peano4.api.taskgraph.wait_for_visualisations()
485
486 #
487 # The steps tied to one phase. This is really a sequence of
488 # observers (aka Peano grid traversals) which the code should
489 # run through for a given phase.
490 #
491 setup_simulation_steps = self.compiler(setup_simulation, "SetupSimulation", peano_project)
492 time_step_steps = self.compiler(time_step, "TimeStep", peano_project)
493 plot_steps = self.compiler(plot, "Plot", peano_project)
494 mesh_adaptation_steps = self.compiler(mesh_adaptation, "MeshAdaptation", peano_project)
495
496 #
497 # Setup runs once, as a prequel to both time stepping and plotting;
498 # time stepping and plotting may then follow one another in either
499 # order, repeatedly (each carries a self-edge for that reason) -
500 # @see peano4.api.taskgraph.compiler.PropagateUseStatements for what
501 # these edges mean and why a repeating sequence needs a self-edge.
502 # This postprocessing runs on the compiled steps, as it counts mesh
503 # traversals, and a compiler might fuse several tasks into one.
504 #
505 # The mesh adaptation only ever runs right after a time step, and
506 # it is followed by either a time step or a plot. It never runs
507 # twice in a row, as its tasks repeat themselves until the mesh is
508 # stationary. It takes part only if any solver has contributed to
509 # it: an empty sequence without incoming edges would otherwise
510 # count as an entry sequence.
511 #
512 sequences = [setup_simulation_steps, time_step_steps, plot_steps]
513 edges = [
514 (setup_simulation_steps, time_step_steps),
515 (setup_simulation_steps, plot_steps),
516 (time_step_steps, plot_steps),
517 (plot_steps, time_step_steps),
518 (time_step_steps, time_step_steps),
519 (plot_steps, plot_steps),
520 ]
521 if mesh_adaptation_steps:
522 sequences.append(mesh_adaptation_steps)
523 edges += [
524 (time_step_steps, mesh_adaptation_steps),
525 (mesh_adaptation_steps, time_step_steps),
526 (mesh_adaptation_steps, plot_steps),
527 ]
528 propagate_use_statements(sequences, edges=edges)
529
530 # Only now do we actually know which Steps this project runs, and
531 # under which qualifier each of them uses a given submodel - the
532 # compiler above is free to fuse, drop or reorder tasks, so this
533 # cannot be derived from the pre-compilation task graphs above -
534 # @see peano4.api.taskgraph.compiler.DeriveLoadStoreComputeFlag.
535 derive_load_store_compute_flag(
536 setup_simulation_steps + time_step_steps + plot_steps + mesh_adaptation_steps
537 )
538
539 # Symmetric to the wait_for_visualisations() call above, but for
540 # the *compiled* task graphs each self.compiler() call
541 # just reported (@see
542 # peano4.api.taskgraph.compiler.ReportCompiledStepSequence).
543 peano4.api.taskgraph.wait_for_visualisations()
544
545 #
546 # Add these observers to the Peano project, so a main file can
547 # trigger them.
548 #
549 for step in setup_simulation_steps + time_step_steps + plot_steps + mesh_adaptation_steps:
550 peano_project.solversteps.add_step(step)
551
552 #
553 # Create one runner object per phase. A runner object has only one
554 # big routine (run()) and this routine triggers all the observers
555 # (aka Peano grid traversals) that logically make up a simulation phase.
556 #
557 peano4.api.taskgraph.create_runner(peano_project, "SetupSimulation", setup_simulation_steps)
558 peano4.api.taskgraph.create_runner(peano_project, "TimeStep", time_step_steps)
559 peano4.api.taskgraph.create_runner(peano_project, "Plot", plot_steps)
560 peano4.api.taskgraph.create_runner(peano_project, "MeshAdaptation", mesh_adaptation_steps)
561
562 self.solver_repository_generator.construct_output(peano_project)
563
564 self.mainfile_generator.construct_output(peano_project)
565
566 return peano_project
567
568 @property
569 def periodic_BC(self):
570 """!
571 One boolean per axis (dimensions entries) telling whether the domain
572 is periodic along this axis. Read-only copy - @see
573 set_global_simulation_parameters() to change it.
574 """
575 return list(self._periodic_BC)
576
577 @property
578 def subdirectory(self):
579 return self._subdirectory
580
581 @property
583 return self._additional_includes
Base class for the code generation steps that turn an ExaHyPE 2 Project's configuration into actual g...
Definition Project.py:35
__init__(self, "Project" project)
Definition Project.py:49
construct_output(self, peano_project)
Add this generator's output to peano_project (a peano4.api.Project-compatible object,...
Definition Project.py:53
ExaHyPE 2 project.
Definition Project.py:15
set_step_report_class(self, class_name)
Set the C++ class the generated main instantiates to report on steps.
Definition Project.py:234
_periodic_BC
One boolean per axis (dimensions entries) telling whether the domain is periodic along this axis.
Definition Project.py:99
set_multicore_orchestration(self, value)
Set orchestration.
Definition Project.py:191
_Peano_src_directory
src_path: string Path (relative or absolute) to the src directory of Peano.
Definition Project.py:96
set_global_simulation_parameters(self, dimensions, offset, size, min_end_time, periodic_BC=[False, False, False], max_end_time=0.0)
! Set the global simulation parameters
Definition Project.py:349
__export_constants(self, peano_project)
We export ExaHyPE's constants.
Definition Project.py:284
set_timeout(self, value)
Set timeout value has to be a number greater or equal to zero, this then sets the timeout in seconds ...
Definition Project.py:221
set_log_filter_file(self, file_name)
Set a log filter file name.
Definition Project.py:159
_gpus
Set GPUs to be used value is a list of integers or the empty list if you want the code to use all GPU...
Definition Project.py:91
_log_filter_file
Set a log filter file name.
Definition Project.py:87
__init__(self, namespace, project_name, executable, directory=".", subdirectory="", abstract_overwrite=True)
Definition Project.py:67
generate_Peano4_project(self, verbosity=peano4.api.LoggerVerbosity.OFF)
Construct a Peano 4 project and return it.
Definition Project.py:433
set_gpus(self, value)
Set GPUs to be used value is a list of integers or the empty list if you want the code to use all GPU...
Definition Project.py:248
_timeout
Set timeout value has to be a number greater or equal to zero, this then sets the timeout in seconds ...
Definition Project.py:90
_domain_offset
! Set the global simulation parameters
Definition Project.py:80
_multicore_orchestration
Set orchestration.
Definition Project.py:89
_number_of_threads
Set number of threads to use.
Definition Project.py:88
set_load_balancing(self, load_balancer_name, load_balancer_arguments="")
Set load balancing scheme.
Definition Project.py:124
set_number_of_threads(self, value)
Set number of threads to use.
Definition Project.py:175
_load_balancer_name
Set load balancing scheme.
Definition Project.py:85
set_Peano4_installation(self, src_path, mode=peano4.api.output.CompileMode.RELEASE)
src_path: string Path (relative or absolute) to the src directory of Peano.
Definition Project.py:265
_step_report_class
Set the C++ class the generated main instantiates to report on steps.
Definition Project.py:92
periodic_BC(self)
One boolean per axis (dimensions entries) telling whether the domain is periodic along this axis.
Definition Project.py:569
_min_terminal_time
include <bitset>
Definition Project.py:83
Singleton logger for the Peano 4 Python API.
Definition Logger.py:37
Represents a Peano 4 project.
Definition Project.py:23
Holds a sequence of Task instances.
Definition Graph.py:9