Skip to content

Commit ac4fffe

Browse files
authored
remove abort_on_failure (#1174)
it is now the responsibility of the application code to check the success flag in burn_t. This is because we were not aborting when on GPUs, so it is better if the application code makes these decisions.
1 parent 6d199a7 commit ac4fffe

File tree

5 files changed

+12
-26
lines changed

5 files changed

+12
-26
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 23.05
2+
3+
* The abort_on_failure runtime parameter has been removed (#1174)
4+
15
# 23.04
26

37
* added preliminary CMake support (#1151, #1164, #1166)

integration/_parameters

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ rtol_enuc real 1.d-6
2828
atol_spec real 1.d-8
2929
atol_enuc real 1.d-6
3030

31-
# Should we abort the run when the burn fails?
32-
abort_on_failure logical .true.
33-
3431
# Whether to renormalize the mass fractions at each step in the evolution
3532
# so that they sum to unity.
3633
renormalize_abundances logical .false.

integration/integrator.H

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,6 @@ AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
1111
void integrator (burn_t& state, Real dt)
1212
{
1313
actual_integrator(state, dt);
14-
15-
#ifndef NSE_TABLE
16-
// optionally abort here if we don't have retries in the driver.
17-
// Note, for NSE we get a second chance if the state entered NSE,
18-
// in burner()
19-
if (!state.success && abort_on_failure) {
20-
#ifndef AMREX_USE_GPU
21-
std::cout << "failure: \n";
22-
std::cout << state << std::endl;
23-
amrex::Error("integration failed in burner");
24-
#endif
25-
}
26-
#endif
27-
2814
}
2915

3016
#endif

interfaces/burner.H

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,6 @@ void burner (burn_t& state, Real dt)
7777
sdc_nse_burn(state, dt_remaining);
7878
#else
7979
nse_burn(state, dt_remaining);
80-
#endif
81-
} else if (state.success == false && abort_on_failure) {
82-
#ifndef AMREX_USE_GPU
83-
std::cout << "failure \n";
84-
std::cout << state << std::endl;
85-
amrex::Error("integration failed in burner");
8680
#endif
8781
}
8882
}

sphinx_docs/source/integrators.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ The input is a ``burn_t``.
7575
.. note::
7676

7777
For the thermodynamic state, only the density, temperature, and
78-
mass fractions -- we explicitly compute the internal energy
78+
mass fractions are used directly&mdash;we compute the internal energy
7979
corresponding to this input state through the equation of state
8080
before integrating.
8181

@@ -335,8 +335,8 @@ Stiff ODE Solvers
335335
=================
336336

337337
We use a high-order implicit ODE solver for integrating the reaction
338-
system. As an alternative, a first order explicit integrator is also
339-
provided. Internally, the integrators uses different data structures
338+
system. A few alternatives, including first order implicit and explicit integrators are also
339+
provided. Internally, the integrators use different data structures
340340
to store the integration progress, and each integrator needs to
341341
provide a routine to convert from the integrator’s internal
342342
representation to the ``burn_t`` type required by the ``actual_rhs``
@@ -366,6 +366,11 @@ the allowed options are:
366366
We recommend that you use the VODE solver, as it is the most
367367
robust.
368368

369+
.. important::
370+
371+
The integrator will not abort if it encounters trouble. Instead it will
372+
set ``burn_t burn_state.success = false`` on exit. It is up to the
373+
application code to handle the failure.
369374

370375
Tolerances
371376
----------

0 commit comments

Comments
 (0)