Peano
Loading...
Searching...
No Matches
exahype2.api.Project.Project Class Reference

ExaHyPE 2 project. More...

Inheritance diagram for exahype2.api.Project.Project:
Collaboration diagram for exahype2.api.Project.Project:

Data Structures

class  Generator
 Base class for the code generation steps that turn an ExaHyPE 2 Project's configuration into actual generated files. More...
 

Public Member Functions

 __init__ (self, namespace, project_name, executable, directory=".", subdirectory="", abstract_overwrite=True)
 
 set_load_balancing (self, load_balancer_name, load_balancer_arguments="")
 Set load balancing scheme.
 
 set_log_filter_file (self, file_name)
 Set a log filter file name.
 
 set_number_of_threads (self, value)
 Set number of threads to use.
 
 set_multicore_orchestration (self, value)
 Set orchestration.
 
 set_timeout (self, value)
 Set timeout value has to be a number greater or equal to zero, this then sets the timeout in seconds after which a node waiting for an MPI message shall quit an shutdown the whole application with an error report.
 
 set_step_report_class (self, class_name)
 Set the C++ class the generated main instantiates to report on steps.
 
 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 GPUs that are visible to a rank.
 
 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.
 
 add_solver (self, solver)
 
 remove_all_solvers (self)
 
 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
 
 set_output_path (self, path)
 
 generate_Peano4_project (self, verbosity=peano4.api.LoggerVerbosity.OFF)
 Construct a Peano 4 project and return it.
 
 periodic_BC (self)
 One boolean per axis (dimensions entries) telling whether the domain is periodic along this axis.
 
 subdirectory (self)
 
 additional_includes (self)
 

Data Fields

 mainfile_generator
 
 solver_repository_generator
 
 compiler
 

Static Public Attributes

str LibraryDebug = "_debug"
 
str LibraryRelease = ""
 
str LibraryTrace = "_trace"
 
str LibraryAsserts = "_asserts"
 
str LibraryStats = "_stats"
 

Protected Attributes

 _namespace
 
 _project_name
 
 _directory
 
 _subdirectory
 
 _abstract_overwrite
 
 _solvers
 
 _domain_offset
 ! Set the global simulation parameters
 
 _domain_size
 
 _dimensions
 
 _min_terminal_time
 include <bitset>
 
 _max_terminal_time
 
 _load_balancer_name
 Set load balancing scheme.
 
 _load_balancer_arguments
 
 _log_filter_file
 Set a log filter file name.
 
 _number_of_threads
 Set number of threads to use.
 
 _multicore_orchestration
 Set orchestration.
 
 _timeout
 Set timeout value has to be a number greater or equal to zero, this then sets the timeout in seconds after which a node waiting for an MPI message shall quit an shutdown the whole application with an error report.
 
 _gpus
 Set GPUs to be used value is a list of integers or the empty list if you want the code to use all GPUs that are visible to a rank.
 
 _step_report_class
 Set the C++ class the generated main instantiates to report on steps.
 
 _additional_includes
 
 _Peano_src_directory
 src_path: string Path (relative or absolute) to the src directory of Peano.
 
 _build_mode
 
 _executable_name
 
 _periodic_BC
 One boolean per axis (dimensions entries) telling whether the domain is periodic along this axis.
 
 _output_path
 
 _EXAHYPE_PACKAGE_DESCRIPTION
 

Static Protected Attributes

str _EXAHYPE_PACKAGE_DESCRIPTION
 

Private Member Functions

 __export_constants (self, peano_project)
 We export ExaHyPE's constants.
 

Detailed Description

ExaHyPE 2 project.

Represents an ExaHyPE 2 project. An ExaHyPE2 project is a Peano 4 project with a particular set of actions (algorithmic phases) that you can choose from and with particular solver types. It realises a builder mechanism, i.e. you build up your ExaHyPE 2 project and then you finally tell the project "give me the Peano 4 project". From hereon, you can use this Peano 4 project to actually set up the Peano 4 application.

The project will have a marker per cell that encodes stuff alike a boundary marker. But it is also used to coordinate different solver types.

See also
generate_Peano4_project()

Definition at line 15 of file Project.py.

Constructor & Destructor Documentation

◆ __init__()

exahype2.api.Project.Project.__init__ (   self,
  namespace,
  project_name,
  executable,
  directory = ".",
  subdirectory = "",
  abstract_overwrite = True 
)

Definition at line 67 of file Project.py.

Member Function Documentation

◆ __export_constants()

exahype2.api.Project.Project.__export_constants (   self,
  peano_project 
)
private

We export ExaHyPE's constants.

Besides the constants from ExaHyPE, we also export some parameters from Peano onto the ExaHyPE constants file. Therefore, it is important that you parse the configure output before we export the constants.

peano_project: peano4.api.Project The Peano 4 project that generate_Peano4_project() is currently assembling. It is a local variable there, not an attribute - merely passed through here, so this routine can export onto it.

Definition at line 284 of file Project.py.

References convert::input::PeanoTextPatchFileReader._dimensions, exahype2.api.dslhype.SyntaxTree.Subscript._dimensions, exahype2.api.dslhype.SyntaxTree.Matrix._dimensions, exahype2.api.dslhype.SyntaxTree.TSimpleMemref._dimensions, exahype2.api.dslhype.SyntaxTree.TDataBlock._dimensions, exahype2.api.dslhype.SyntaxTree.MemoryAllocation._dimensions, exahype2.api.dslhype.SyntaxTree.MemoryDeallocation._dimensions, exahype2.api.Project.Project._dimensions, exaparty.api.Project.Project._dimensions, api.Project.Project._dimensions, solvers.api.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi._dimensions, solvers.api.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver._dimensions, tarch.plotter.api.output.Visualiser.PatchFileData._dimensions, tarch.plotter.api.output.Visualiser.Visualiser._dimensions, tarch.plotter::griddata::blockstructured::PeanoBinaryPatchFileWriter._dimensions, tarch.plotter::griddata::blockstructured::PeanoHDF5PatchFileWriter._dimensions, tarch.plotter::griddata::blockstructured::PeanoTextPatchFileWriter._dimensions, scenarios.acoustic_planar_waves.AcousticPlanarWaves._dimensions, scenarios.advection_linear.AdvectionLinear._dimensions, scenarios.elastic_planar_waves.ElasticPlanarWaves._dimensions, scenarios.euler_gaussian_bell.EulerGaussianBell._dimensions, scenarios.euler_isotropic_vortex.EulerIsotropicVortex._dimensions, scenarios.scenario.Scenario._dimensions, scenarios.swe_radial_dam_break.SWERadialDamBreak._dimensions, scenarios.swe_resting_lake.SWERestingLake._dimensions, exahype2.api.Project.Project._domain_offset, exaparty.api.Project.Project._domain_offset, api.Project.Project._domain_offset, api.Tree.Tree._domain_offset, exahype2.api.Project.Project._domain_size, exaparty.api.Project.Project._domain_size, api.Project.Project._domain_size, api.Tree.Tree._domain_size, scenarios.acoustic_planar_waves.AcousticPlanarWaves._domain_size, scenarios.elastic_planar_waves.ElasticPlanarWaves._domain_size, scenarios.euler_gaussian_bell.EulerGaussianBell._domain_size, scenarios.euler_isotropic_vortex.EulerIsotropicVortex._domain_size, scenarios.scenario.Scenario._domain_size, scenarios.swe_radial_dam_break.SWERadialDamBreak._domain_size, scenarios.swe_resting_lake.SWERestingLake._domain_size, exahype2.api.Project.Project._max_terminal_time, exaparty.api.Project.Project._max_terminal_time, exahype2.api.Project.Project._min_terminal_time, exaparty.api.Project.Project._min_terminal_time, exahype2.api.Project.Project._periodic_BC, exaparty.api.Project.Project._periodic_BC, exahype2.api.Project.Project._solvers, and api.Project.Project._solvers.

Referenced by api.Project.Project.__configure_makefile(), and exaparty.api.Project.Project.generate_Peano4_project().

Here is the caller graph for this function:

◆ add_solver()

exahype2.api.Project.Project.add_solver (   self,
  solver 
)

◆ additional_includes()

exahype2.api.Project.Project.additional_includes (   self)

Definition at line 582 of file Project.py.

References exahype2.api.Project.Project._additional_includes, and api.BackupPatchOverlap.BackupPatchOverlap._additional_includes.

Referenced by exahype2.api.fv.actionsets.RollOverUpdatedFace.RollOverUpdatedFace.get_includes(), exahype2.api.rkfd4.actionsets.RollOverUpdatedFace.RollOverUpdatedFace.get_includes(), peano4.api.toolbox.multigrid.cellbased.ScalarJacobiWithRediscretisation.ScalarJacobiWithRediscretisation.get_includes(), peano4.api.toolbox.multigrid.MatrixFreeJacobi.MatrixFreeJacobi.get_includes(), peano4.api.toolbox.multigrid.vertexbased.ScalarJacobiWithRediscretisation.ScalarJacobiWithRediscretisation.get_includes(), peano4.api.toolbox.particles.InsertParticlesAlongCartesianLayoutIntoUnrefinedCells.InsertParticlesAlongCartesianLayoutIntoUnrefinedCells.get_includes(), peano4.api.toolbox.particles.InsertParticlesByCoordinates.InsertParticlesByCoordinates.get_includes(), peano4.api.toolbox.particles.InsertRandomParticlesIntoUnrefinedCells.InsertRandomParticlesIntoUnrefinedCells.get_includes(), peano4.api.toolbox.particles.PlotParticlesInVTKFormat.PlotParticlesInVTKFormat.get_includes(), peano4.api.toolbox.PlotCellDataInPeanoBlockFormat.PlotCellDataInPeanoBlockFormat.get_includes(), peano4.api.toolbox.PlotGridInPeanoBlockFormat.PlotGridInPeanoBlockFormat.get_includes(), peano4.api.toolbox.PlotVertexDataInPeanoBlockFormat.PlotVertexDataInPeanoBlockFormat.get_includes(), api.ApplyPointWiselyToPatch.ApplyPointWiselyToPatch.get_includes(), api.DynamicAMR.DynamicAMR.get_includes(), api.InterpolateAndRestrictCells.InterpolateAndRestrictCells.get_includes(), api.InterpolateHangingFaces.InterpolateHangingFaces.get_includes(), api.PlotPatchesInPeanoBlockFormat.PlotPatchesInPeanoBlockFormat.get_includes(), api.PlotPatchesOverFacesInPeanoBlockFormat.PlotPatchesOverFacesInPeanoBlockFormat.get_includes(), api.ProjectPatchOntoFaces.ProjectPatchOntoFaces.get_includes(), api.ProjectPatchWithHaloOntoFaces.ProjectPatchWithHaloOntoFaces.get_includes(), api.ReconstructPatchWithHalo.ReconstructPatchWithHalo.get_includes(), api.RestrictHangingFaces.RestrictHangingFaces.get_includes(), and dastgen2.DataModel.DataModel.write_header_file().

Here is the caller graph for this function:

◆ generate_Peano4_project()

exahype2.api.Project.Project.generate_Peano4_project (   self,
  verbosity = peano4.api.LoggerVerbosity.OFF 
)

Construct a Peano 4 project and return it.

Build the Peano 4 project, i.e., all the action sets et al that you require to run this ExaHyPE 2 application. The Peano 4 project is a local variable here - a fresh peano4.api.Project - that is populated over the course of this call and eventually returned.

This routine generates a Peano project, i.e. the domain-specific ExaHyPE view is translated into a Peano model. As the Peano project is not kept around as an attribute, calling generate_Peano4_project() again after you have altered the ExaHyPE setup gives you an independent, fresh snapshot of the Peano setup rather than an accumulation on top of a stale one.

Definition at line 433 of file Project.py.

References convert::output::PeanoWriter._directory, convert::output::VTUWriter._directory, exahype2.api.Project.Project._directory, exahype2.api.dslhype.SyntaxTree.Argument._namespace, exahype2.api.Project.Project._namespace, peano4.api.solversteps.Steps.Steps._namespace, exahype2.api.Project.Project._project_name, exahype2.api.Project.Project._subdirectory, api.Project.Project._subdirectory, peano4.api.datamodel.Model.Model._subdirectory, and peano4.api.Project.Project._subdirectory.

◆ periodic_BC()

exahype2.api.Project.Project.periodic_BC (   self)

One boolean per axis (dimensions entries) telling whether the domain is periodic along this axis.

Read-only copy -

See also
set_global_simulation_parameters() to change it.

Definition at line 569 of file Project.py.

References exahype2.api.Project.Project._periodic_BC, and exaparty.api.Project.Project._periodic_BC.

◆ remove_all_solvers()

exahype2.api.Project.Project.remove_all_solvers (   self)

Definition at line 280 of file Project.py.

References exahype2.api.Project.Project._solvers, api.Project.Project._solvers, and ScenarioFactory.createScenario().

Here is the call graph for this function:

◆ set_global_simulation_parameters()

exahype2.api.Project.Project.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

Parameters
dimensions2 or 3
offset[Float] Has to have dimension number of entries.
size[Float} Has to have dimension number of entries and all of them have to be positive. At this point, we strongly suggest that all size entries are exactly the same. While Peano and ExaHyPE do support anisotropic meshes, most compute kernels do not, so working with something else than a square or cube will likely break all numerics.
max_end_timeFloat If you set it zero (or actually any value smaller than min_end_time), then the code will run until the cell that lags behind the most hits the min time. If you specify a valid max time however, you can stop the sim as soon as the most advanced cell exceeds this threshold.

There are no plot settings here: when and how often to plot is configured per solver on its plotter, e.g. exahype2.api.fv.PlotAsVTKFile.

Definition at line 341 of file Project.py.

References convert::input::PeanoTextPatchFileReader._dimensions, exahype2.api.dslhype.SyntaxTree.Subscript._dimensions, exahype2.api.dslhype.SyntaxTree.Matrix._dimensions, exahype2.api.dslhype.SyntaxTree.TSimpleMemref._dimensions, exahype2.api.dslhype.SyntaxTree.TDataBlock._dimensions, exahype2.api.dslhype.SyntaxTree.MemoryAllocation._dimensions, exahype2.api.dslhype.SyntaxTree.MemoryDeallocation._dimensions, exahype2.api.Project.Project._dimensions, exaparty.api.Project.Project._dimensions, api.Project.Project._dimensions, solvers.api.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi._dimensions, solvers.api.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver._dimensions, tarch.plotter.api.output.Visualiser.PatchFileData._dimensions, tarch.plotter.api.output.Visualiser.Visualiser._dimensions, tarch.plotter::griddata::blockstructured::PeanoBinaryPatchFileWriter._dimensions, tarch.plotter::griddata::blockstructured::PeanoHDF5PatchFileWriter._dimensions, tarch.plotter::griddata::blockstructured::PeanoTextPatchFileWriter._dimensions, scenarios.acoustic_planar_waves.AcousticPlanarWaves._dimensions, scenarios.advection_linear.AdvectionLinear._dimensions, scenarios.elastic_planar_waves.ElasticPlanarWaves._dimensions, scenarios.euler_gaussian_bell.EulerGaussianBell._dimensions, scenarios.euler_isotropic_vortex.EulerIsotropicVortex._dimensions, scenarios.scenario.Scenario._dimensions, scenarios.swe_radial_dam_break.SWERadialDamBreak._dimensions, scenarios.swe_resting_lake.SWERestingLake._dimensions, exahype2.api.Project.Project._domain_offset, exaparty.api.Project.Project._domain_offset, api.Project.Project._domain_offset, api.Tree.Tree._domain_offset, exahype2.api.Project.Project._domain_size, exaparty.api.Project.Project._domain_size, api.Project.Project._domain_size, api.Tree.Tree._domain_size, scenarios.acoustic_planar_waves.AcousticPlanarWaves._domain_size, scenarios.elastic_planar_waves.ElasticPlanarWaves._domain_size, scenarios.euler_gaussian_bell.EulerGaussianBell._domain_size, scenarios.euler_isotropic_vortex.EulerIsotropicVortex._domain_size, scenarios.scenario.Scenario._domain_size, scenarios.swe_radial_dam_break.SWERadialDamBreak._domain_size, scenarios.swe_resting_lake.SWERestingLake._domain_size, exahype2.api.Project.Project._max_terminal_time, exaparty.api.Project.Project._max_terminal_time, exahype2.api.Project.Project._min_terminal_time, exaparty.api.Project.Project._min_terminal_time, exahype2.api.Project.Project._periodic_BC, and exaparty.api.Project.Project._periodic_BC.

◆ set_gpus()

exahype2.api.Project.Project.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 GPUs that are visible to a rank.

Definition at line 248 of file Project.py.

References exahype2.api.Project.Project._gpus.

◆ set_load_balancing()

exahype2.api.Project.Project.set_load_balancing (   self,
  load_balancer_name,
  load_balancer_arguments = "" 
)

Set load balancing scheme.

The load balancing scheme controls how subtress are distributed both among ranks and threads, i.e. the instance is important for MPI but also whenever you use any multithreading strategy.

Similar to set_multicore_orchestration(), you have to let the project know about where the load balancing is held. If you rely on the load balancing toolbox and if you have configured Peano with the load balancing toolbox, then simply adding the right eader is sufficient:

project.add_mainfile_include( "toolbox/loadbalancing/strategies/Hardcoded.h)

If you use a bespoke load balancing, you also have to add the implementation file or hosting library to the project.

Parameters
load_balancer_namestring Should be full-qualified name of the load balancer. By default, I recommend to pass "toolbox::loadbalancing::strategies::RecursiveSubdivision".
load_balancer_argumentsstring If your load balancing requires parameters, add them here. It is a string that will be copied into the C++ class instantiation. Please add the brackets yourself, i.e. "(3,4,5)" is fine, but "3,4,5" is not. The only exception is the empty parameter list. Here, you can/should simply add the empty string.

Definition at line 124 of file Project.py.

References exahype2.api.Project.Project._load_balancer_arguments, exaparty.api.Project.Project._load_balancer_arguments, api.Project.Project._load_balancer_arguments, exahype2.api.Project.Project._load_balancer_name, exaparty.api.Project.Project._load_balancer_name, and api.Project.Project._load_balancer_name.

◆ set_log_filter_file()

exahype2.api.Project.Project.set_log_filter_file (   self,
  file_name 
)

Set a log filter file name.

Pass in the empty string, if you don't want the code to use the hard-coded defaults. That is, by default an ExaHyPE2 application searches for a file exahype2.log-filter. Through this call, you can instruct the project to use another filter file.

Parameters
file_nameString Name of the log filter file that the application should load on startup.

Definition at line 159 of file Project.py.

References exahype2.api.Project.Project._log_filter_file.

◆ set_multicore_orchestration()

exahype2.api.Project.Project.set_multicore_orchestration (   self,
  value 
)

Set orchestration.

The orchestration accepts one value which is a C++ statement. This value has to be a string which creates an orchestration object, i.e. an object of the type tarch::multicore::orchestration::Orchestration, on the heap.

You can either create it directly (in this case you need to add a new), or you can use a factory method such as tarch::multicore::orchestration::StrategyFactory::createDefaultStrategy().

Depending on where you come from, you might have to add the strategy's header file to the project explicitly. By default, the ExaHyPE 2 project only is aware of very few strategies. Here's an example:

project.add_mainfile_include( "tarch/multicore/orchestration/Hardcoded.h")
project.set_multicore_orchestration(
"new benchmarks::exahype2::ccz4::MulticoreOrchestration()"
)
See also
exahype2.Project.add_mainfile_include()
Parameters
valueC++ expression delivering a new orchestration object on the heap

Definition at line 191 of file Project.py.

References exahype2.api.Project.Project._multicore_orchestration, and api.Project.Project._multicore_orchestration.

◆ set_number_of_threads()

exahype2.api.Project.Project.set_number_of_threads (   self,
  value 
)

Set number of threads to use.

Pass in number of threads (positive integer) or a string such as "tarch::multicore::Core::UseDefaultNumberOfThreads". Please note that this value is handed through to Peano which in turn passes it on the tarch::multicore::Core::configure(int). It then depends on the multithreading backend if this backend allows you to set the thread count manually. Many backends (such as OpenMP) do not allow this, but require users to use environment variables (or scheduler options) instead.

Definition at line 175 of file Project.py.

References exahype2.api.Project.Project._number_of_threads.

◆ set_output_path()

◆ set_Peano4_installation()

exahype2.api.Project.Project.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.

This path should hold both the headers (in subdirectories) and all the static libraries.

mode: peano4.api.output.CompileMode

Definition at line 265 of file Project.py.

References exahype2.api.Project.Project._build_mode, exaparty.api.Project.Project._build_mode, api.Project.Project._build_mode, exahype2.api.Project.Project._Peano_src_directory, exaparty.api.Project.Project._Peano_src_directory, and api.Project.Project._Peano_src_directory.

◆ set_step_report_class()

exahype2.api.Project.Project.set_step_report_class (   self,
  class_name 
)

Set the C++ class the generated main instantiates to report on steps.

class_name: str Fully qualified C++ class name (e.g. "peano4::DefaultStepReport", the default) of a peano4::RunMultipleSteps::Report subclass. The generated main creates exactly one instance of it, so the class has to be default-constructible. If you pass in anything other than the default, its header is not included automatically - you have to make it visible to the generated main yourself.

Definition at line 234 of file Project.py.

References exahype2.api.Project.Project._step_report_class.

◆ set_timeout()

exahype2.api.Project.Project.set_timeout (   self,
  value 
)

Set timeout value has to be a number greater or equal to zero, this then sets the timeout in seconds after which a node waiting for an MPI message shall quit an shutdown the whole application with an error report.

If zero is passed, this feature is switched off and nodes will wait indefinitely.

Definition at line 221 of file Project.py.

References exahype2.api.Project.Project._timeout.

◆ subdirectory()

Field Documentation

◆ _abstract_overwrite

exahype2.api.Project.Project._abstract_overwrite
protected

Definition at line 77 of file Project.py.

Referenced by api.Project.Project.add_solver().

◆ _additional_includes

exahype2.api.Project.Project._additional_includes
protected

◆ _build_mode

◆ _dimensions

◆ _directory

exahype2.api.Project.Project._directory
protected

Definition at line 75 of file Project.py.

Referenced by exahype2.api.Project.Project.generate_Peano4_project().

◆ _domain_offset

exahype2.api.Project.Project._domain_offset
protected

! Set the global simulation parameters

Parameters
dimensions2 or 3
offset[Float] Has to have dimension number of entries.
size[Float} Has to have dimension number of entries and all of them have to be positive. At this point, we strongly suggest that all size entries are exactly the same. While Peano and ExaHyPE do support anisotropic meshes, most compute kernels do not, so working with something else than a square or cube will likely break all numerics.
max_end_timeFloat If you set it zero (or actually any value smaller than min_end_time), then the code will run until the cell that lags behind the most hits the min time. If you specify a valid max time however, you can stop the sim as soon as the most advanced cell exceeds this threshold.

There are no plot settings here: when and how often to plot is configured per solver on its plotter, e.g. exahype2.api.fv.PlotAsVTKFile.

Definition at line 80 of file Project.py.

Referenced by exaparty.api.Project.Project.__export_constants(), api.Project.Project.__export_constants(), exahype2.api.Project.Project.__export_constants(), api.Project.Project.__init__(), api.Tree.Tree.__str__(), api.Project.Project.generate_Peano4_project(), exaparty.api.Project.Project.set_global_simulation_parameters(), api.Project.Project.set_global_simulation_parameters(), api.Project.Project.set_global_simulation_parameters(), and exahype2.api.Project.Project.set_global_simulation_parameters().

◆ _domain_size

◆ _EXAHYPE_PACKAGE_DESCRIPTION [1/2]

str exahype2.api.Project.Project._EXAHYPE_PACKAGE_DESCRIPTION
staticprotected
Initial value:
= """
### ExaHyPE 2
This code uses ExaHyPE in its second generation. The first generation of the
code was developed through an EU FET HPC project called ExaHyPE. This first
generation was built on top of Peano in its third generation. The present
code uses ExaHyPE 2 which is a complete rewrite built on top of Peano 4. We
do not yet have a release paper for this second generation of ExaHyPE, and
thus appreciate any citation of the original release paper
@article{Reinarz:2020:ExaHyPE,
title = {ExaHyPE: An engine for parallel dynamically adaptive simulations of wave problems},
journal = {Computer Physics Communications},
volume = {254},
pages = {107251},
year = {2020},
issn = {0010-4655},
doi = {https://doi.org/10.1016/j.cpc.2020.107251},
url = {https://www.sciencedirect.com/science/article/pii/S001046552030076X},
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},
keywords = {Hyperbolic, PDE, ADER-DG, Finite volumes, AMR, MPI, TBB, MPI+X},
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.
Program summary
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.
}
}
"""

Definition at line 404 of file Project.py.

◆ _EXAHYPE_PACKAGE_DESCRIPTION [2/2]

exahype2.api.Project.Project._EXAHYPE_PACKAGE_DESCRIPTION
protected

Definition at line 454 of file Project.py.

◆ _executable_name

◆ _gpus

exahype2.api.Project.Project._gpus
protected

Set GPUs to be used value is a list of integers or the empty list if you want the code to use all GPUs that are visible to a rank.

Definition at line 91 of file Project.py.

Referenced by exahype2.api.Project.Project.set_gpus().

◆ _load_balancer_arguments

◆ _load_balancer_name

exahype2.api.Project.Project._load_balancer_name
protected

Set load balancing scheme.

The load balancing scheme controls how subtress are distributed both among ranks and threads, i.e. the instance is important for MPI but also whenever you use any multithreading strategy.

Similar to set_multicore_orchestration(), you have to let the project know about where the load balancing is held. If you rely on the load balancing toolbox and if you have configured Peano with the load balancing toolbox, then simply adding the right eader is sufficient:

project.add_mainfile_include( "toolbox/loadbalancing/strategies/Hardcoded.h)

If you use a bespoke load balancing, you also have to add the implementation file or hosting library to the project.

Parameters
load_balancer_namestring Should be full-qualified name of the load balancer. By default, I recommend to pass "toolbox::loadbalancing::strategies::RecursiveSubdivision".
load_balancer_argumentsstring If your load balancing requires parameters, add them here. It is a string that will be copied into the C++ class instantiation. Please add the brackets yourself, i.e. "(3,4,5)" is fine, but "3,4,5" is not. The only exception is the empty parameter list. Here, you can/should simply add the empty string.

Definition at line 85 of file Project.py.

Referenced by exaparty.api.Project.Project.__generate_global_state_files(), api.Project.Project.__init__(), exaparty.api.Project.Project.set_load_balancing(), api.Project.Project.set_load_balancing(), and exahype2.api.Project.Project.set_load_balancing().

◆ _log_filter_file

exahype2.api.Project.Project._log_filter_file
protected

Set a log filter file name.

Pass in the empty string, if you don't want the code to use the hard-coded defaults. That is, by default an ExaHyPE2 application searches for a file exahype2.log-filter. Through this call, you can instruct the project to use another filter file.

Parameters
file_nameString Name of the log filter file that the application should load on startup.

Definition at line 87 of file Project.py.

Referenced by exahype2.api.Project.Project.set_log_filter_file().

◆ _max_terminal_time

◆ _min_terminal_time

exahype2.api.Project.Project._min_terminal_time
protected

◆ _multicore_orchestration

exahype2.api.Project.Project._multicore_orchestration
protected

Set orchestration.

The orchestration accepts one value which is a C++ statement. This value has to be a string which creates an orchestration object, i.e. an object of the type tarch::multicore::orchestration::Orchestration, on the heap.

You can either create it directly (in this case you need to add a new), or you can use a factory method such as tarch::multicore::orchestration::StrategyFactory::createDefaultStrategy().

Depending on where you come from, you might have to add the strategy's header file to the project explicitly. By default, the ExaHyPE 2 project only is aware of very few strategies. Here's an example:

project.add_mainfile_include( "tarch/multicore/orchestration/Hardcoded.h")
project.set_multicore_orchestration(
"new benchmarks::exahype2::ccz4::MulticoreOrchestration()"
)
See also
exahype2.Project.add_mainfile_include()
Parameters
valueC++ expression delivering a new orchestration object on the heap

Definition at line 89 of file Project.py.

Referenced by exahype2.api.Project.Project.set_multicore_orchestration().

◆ _namespace

exahype2.api.Project.Project._namespace
protected

Definition at line 73 of file Project.py.

Referenced by exahype2.api.Project.Project.generate_Peano4_project().

◆ _number_of_threads

exahype2.api.Project.Project._number_of_threads
protected

Set number of threads to use.

Pass in number of threads (positive integer) or a string such as "tarch::multicore::Core::UseDefaultNumberOfThreads". Please note that this value is handed through to Peano which in turn passes it on the tarch::multicore::Core::configure(int). It then depends on the multithreading backend if this backend allows you to set the thread count manually. Many backends (such as OpenMP) do not allow this, but require users to use environment variables (or scheduler options) instead.

Definition at line 88 of file Project.py.

Referenced by exahype2.api.Project.Project.set_number_of_threads().

◆ _output_path

◆ _Peano_src_directory

exahype2.api.Project.Project._Peano_src_directory
protected

src_path: string Path (relative or absolute) to the src directory of Peano.

This path should hold both the headers (in subdirectories) and all the static libraries.

mode: peano4.api.output.CompileMode

Definition at line 96 of file Project.py.

Referenced by api.Project.Project.__configure_makefile(), api.Project.Project.__init__(), exaparty.api.Project.Project.generate_Peano4_project(), exahype2.api.Project.Project.set_Peano4_installation(), exaparty.api.Project.Project.set_Peano4_installation(), and api.Project.Project.set_Peano4_installation().

◆ _periodic_BC

exahype2.api.Project.Project._periodic_BC
protected

One boolean per axis (dimensions entries) telling whether the domain is periodic along this axis.

Read-only copy -

See also
set_global_simulation_parameters() to change it.

Definition at line 99 of file Project.py.

Referenced by exahype2.api.Project.Project.__export_constants(), exahype2.api.Project.Project.periodic_BC(), exaparty.api.Project.Project.set_global_simulation_parameters(), and exahype2.api.Project.Project.set_global_simulation_parameters().

◆ _project_name

exahype2.api.Project.Project._project_name
protected

Definition at line 74 of file Project.py.

Referenced by exahype2.api.Project.Project.generate_Peano4_project().

◆ _solvers

◆ _step_report_class

exahype2.api.Project.Project._step_report_class
protected

Set the C++ class the generated main instantiates to report on steps.

class_name: str Fully qualified C++ class name (e.g. "peano4::DefaultStepReport", the default) of a peano4::RunMultipleSteps::Report subclass. The generated main creates exactly one instance of it, so the class has to be default-constructible. If you pass in anything other than the default, its header is not included automatically - you have to make it visible to the generated main yourself.

Definition at line 92 of file Project.py.

Referenced by exahype2.api.Project.Project.set_step_report_class().

◆ _subdirectory

◆ _timeout

exahype2.api.Project.Project._timeout
protected

Set timeout value has to be a number greater or equal to zero, this then sets the timeout in seconds after which a node waiting for an MPI message shall quit an shutdown the whole application with an error report.

If zero is passed, this feature is switched off and nodes will wait indefinitely.

Definition at line 90 of file Project.py.

Referenced by exahype2.api.Project.Project.set_timeout().

◆ compiler

exahype2.api.Project.Project.compiler

Definition at line 121 of file Project.py.

◆ LibraryAsserts

str exahype2.api.Project.Project.LibraryAsserts = "_asserts"
static

Definition at line 262 of file Project.py.

◆ LibraryDebug

str exahype2.api.Project.Project.LibraryDebug = "_debug"
static

Definition at line 259 of file Project.py.

◆ LibraryRelease

str exahype2.api.Project.Project.LibraryRelease = ""
static

Definition at line 260 of file Project.py.

◆ LibraryStats

str exahype2.api.Project.Project.LibraryStats = "_stats"
static

Definition at line 263 of file Project.py.

◆ LibraryTrace

str exahype2.api.Project.Project.LibraryTrace = "_trace"
static

Definition at line 261 of file Project.py.

◆ mainfile_generator

exahype2.api.Project.Project.mainfile_generator

Definition at line 107 of file Project.py.

◆ solver_repository_generator

exahype2.api.Project.Project.solver_repository_generator

Definition at line 113 of file Project.py.


The documentation for this class was generated from the following file: