This repository holds scripts for building and running the Pele suite of codes for SUNDIALS and batched linear solver testing purposes.
The ReactEval benchmark program is based off of the ReactEval test case described in the documentation for PelePhysics. Currently the documentation for the test case is outdated when it comes to specifics, but it is still good to read for background information. Here we describe how the ReactEval problem is used for benchmarking time-integrators and linear solver algorithms/libraries.
In real Pele problems (from PeleC or PeleLM(eX)) they are solving chemically reacting flows by coupling the Navier-Stokes equations (advection and diffusion) with chemical kinetics (reactions). At a high-level, what Pele does is advance the physical processes indivdiually, couple them through lagged source terms, and then use an iterative Spectral Deferred Corrections (SDC) scheme to refine the solution. The reactions arise as ODEs per grid-cell of a block-structured adpative mesh refinement (AMR) grid with the source term coming from the advection and diffusion.
The ReactEval program does the reactions advance only from a given state. The ODEs per AMR cell that ReactEval solves are
where
-
ncells: This will determine the total number of AMR grid cells in the domain, which plays a role in determining both the number of batches and the batch size. -
max_grid_size:max_grid_size^3yields the number of systems in a batch. It must be a power of 2 and should be less than or equal toncells^3. -
chem_integrator: This sets which time-integrator to use.ReactorCvodeis the most efficient in almost all cases.ReactorCVodeuses the implicit CVODE integrator from SUNDIALS. Linear solvers are only interesting to test whenReactorCvodeis used currently. Other integator options areReactorArkodewhich uses the explicit Runge-Kutta methods in the ARKODE packages of SUNDIALS. -
cvode.solver_type: This sets which linear solver is to be used when the chemistry integrator isReactorCvode. The current batched options aremagma_direct,ginkgo_GMRES,ginkgo_BICGSTAB. The non-batched options areGMRESandBCGS(these are matrix-free implementations from SUNDIALS). Adding a linear solver requires implementing an interface to it in SUNDIALS. Contact Cody Balos for more info.
On Frontier
See frontier/build-pele-frontier.sh for building.
See frontier/run-reacteval.sh for running.
On Crusher
See crusher/build-pele-crusher.sh for building.
See crusher/run-reacteval.sh for running.
To verify a run for correctness, we first need to establish a baseline. Baseline runs should use the ReactEval inputs cvode.solver_type = GMRES and chem_integator = ReactorCvode.
We will use the AMReX fcompare script to verify correctness.
In order to use fcompare we will need to turn on plotting in the Pele runs. This is done by setting the ReactEval input plotfile = /path/to/plot.
For the baseline you should do plotfile = /path/to/plotReference then plot files will be created with the plotReference name as the prefix.
For further runs you should change this filename to something else.
You will also need to build fcompare, which requires a GNU compiler. On Crusher or Frontier, you can module load gcc/12.2.0 navigate to the PeleC/Submodules/AMReX/Tools/Plotfile/ and run make.
Then you can run fcompare like so:
fcompare pltReference00001 plt00001.