Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/src/verbosity.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ through the `verbose` keyword argument for `solve`. The verbosity system allows
information is displayed during the solve process. See [SciMLLogging.jl](https://docs.sciml.ai/SciMLLogging/dev/) for more details.

```@docs
OrdinaryDiffEqCore.DEVerbosity
DiffEqBase.DEVerbosity
```
2 changes: 1 addition & 1 deletion lib/DelayDiffEq/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Aqua = "0.8.11"
ArrayInterface = "7"
DDEProblemLibrary = "0.1"
DataStructures = "0.18, 0.19"
DiffEqBase = "6.209"
DiffEqBase = "6.217"
DiffEqCallbacks = "4"
DiffEqDevTools = "2.44.4"
DiffEqNoiseProcess = "5"
Expand Down
4 changes: 2 additions & 2 deletions lib/DelayDiffEq/src/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -279,15 +279,15 @@ function SciMLBase.__init(
nothing, uEltypeNoUnits, uBottomEltypeNoUnits,
tTypeNoUnits, uprev, f_with_history, t0,
tType(dt), Val{isinplace(prob)},
OrdinaryDiffEqCore.DEVerbosity()
DiffEqBase.DEVerbosity()
Comment thread
jClugstor marked this conversation as resolved.
)
else
OrdinaryDiffEqCore.alg_cache(
alg.alg, u, rate_prototype, uEltypeNoUnits,
uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2,
f_with_history, t0, zero(tType), reltol_internal, p,
calck,
Val(isinplace(prob)), OrdinaryDiffEqCore.DEVerbosity()
Val(isinplace(prob)), DiffEqBase.DEVerbosity()
)
end

Expand Down
4 changes: 2 additions & 2 deletions lib/DelayDiffEq/src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ function build_history_function(
uBottomEltypeNoUnits, tTypeNoUnits, ode_uprev,
ode_uprev, ode_f, t0, zero(tType), reltol, p,
calck,
Val(isinplace(prob)), OrdinaryDiffEqCore.DEVerbosity()
Val(isinplace(prob)), DiffEqBase.DEVerbosity()
)

# build dense interpolation of history
Expand Down Expand Up @@ -444,7 +444,7 @@ function build_history_function(
uEltypeNoUnits, uBottomEltypeNoUnits,
tTypeNoUnits, ode_uprev, ode_f, t0,
zero(tType), Val{isinplace(prob)},
OrdinaryDiffEqCore.DEVerbosity()
DiffEqBase.DEVerbosity()
)

ode_alg_choice = iscomposite(alg) ? Int[] : nothing
Expand Down
8 changes: 5 additions & 3 deletions lib/DiffEqBase/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "DiffEqBase"
uuid = "2b5f629d-d688-5b77-993f-72d75c75574e"
authors = ["Chris Rackauckas <accounts@chrisrackauckas.com>"]
version = "6.216.0"
version = "6.217.0"

[deps]
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
Expand All @@ -22,6 +22,7 @@ Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
SciMLLogging = "a6db7da4-7206-11f0-1eab-35f2a5dbe1d1"
SciMLOperators = "c0aeaf25-5076-4817-a8d5-81caf7dfa961"
SciMLStructures = "53ae85a6-f571-4167-b2af-e1d143709226"
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
Expand Down Expand Up @@ -79,8 +80,8 @@ DiffEqCallbacks = "4"
DifferentiationInterface = "0.7"
Distributed = "1.9"
Distributions = "0.25"
DynamicQuantities = "1"
DocStringExtensions = "0.9"
DynamicQuantities = "1"
Enzyme = "0.13.100"
FastBroadcast = "1.3"
FastClosures = "0.3.2"
Expand Down Expand Up @@ -110,6 +111,7 @@ Reexport = "1.0"
ReverseDiff = "1"
SafeTestsets = "0.1"
SciMLBase = "2.143.0"
SciMLLogging = "1.9.1"
SciMLOperators = "1"
SciMLStructures = "1.5"
Setfield = "1"
Expand All @@ -128,8 +130,8 @@ julia = "1.10"
[extras]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def"
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def"
DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Expand Down
6 changes: 6 additions & 0 deletions lib/DiffEqBase/src/DiffEqBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ import FunctionWrappersWrappers

using SciMLBase

using SciMLLogging: SciMLLogging, AbstractVerbositySpecifier, AbstractVerbosityPreset,
None, Minimal, Standard, Detailed, All, Silent, InfoLevel, WarnLevel, ErrorLevel,
CustomLevel, AbstractMessageLevel, @verbosity_specifier, verbosity_to_bool

using SciMLOperators: AbstractSciMLOperator, AbstractSciMLScalarOperator, DEFAULT_UPDATE_FUNC

using SciMLBase: @def, DEIntegrator, AbstractDEProblem,
Expand Down Expand Up @@ -151,6 +155,7 @@ include("solve.jl")
include("internal_euler.jl")
include("norecompile.jl")
include("integrator_accessors.jl")
include("verbosity.jl")

# This is only used for oop stiff solvers
default_factorize(A) = lu(A; check = false)
Expand All @@ -172,6 +177,7 @@ struct ConvergenceSetup{P, C}
convergence_axis::C
end

export DEVerbosity
export initialize!, finalize!

export SensitivityADPassThrough
Expand Down
10 changes: 5 additions & 5 deletions lib/DiffEqBase/src/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ end

function init(
prob::AbstractDEProblem, args...; sensealg = nothing,
u0 = nothing, p = nothing, kwargs...
u0 = nothing, p = nothing, verbose = true, kwargs...
)
if sensealg === nothing && has_kwargs(prob) && haskey(prob.kwargs, :sensealg)
sensealg = prob.kwargs[:sensealg]
Expand All @@ -99,7 +99,7 @@ function init(
u0 = u0 !== nothing ? u0 : prob.u0
p = p !== nothing ? p : prob.p

return init_up(prob, sensealg, u0, p, args...; kwargs...)
return init_up(prob, sensealg, u0, p, args...; verbose, kwargs...)
end

function init(prob::AbstractJumpProblem, args...; kwargs...)
Expand Down Expand Up @@ -590,7 +590,7 @@ the extension to other types is straightforward.
"""
function solve(
prob::AbstractDEProblem, args...; sensealg = nothing,
u0 = nothing, p = nothing, wrap = Val(true), kwargs...
u0 = nothing, p = nothing, wrap = Val(true), verbose = true, kwargs...
)
if sensealg === nothing && haskey(prob.kwargs, :sensealg)
sensealg = prob.kwargs[:sensealg]
Expand All @@ -604,14 +604,14 @@ function solve(
solve_up(
prob, sensealg, u0, p, args...;
originator = SciMLBase.set_mooncakeoriginator_if_mooncake(SciMLBase.ChainRulesOriginator()),
kwargs...
verbose, kwargs...
)
)
else
solve_up(
prob, sensealg, u0, p, args...;
originator = SciMLBase.set_mooncakeoriginator_if_mooncake(SciMLBase.ChainRulesOriginator()),
kwargs...
verbose, kwargs...
)
end
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@verbosity_specifier DEVerbosity begin
toggles = (
:linear_verbosity, :nonlinear_verbosity,
:dt_NaN, :init_NaN, :dense_output_saveat, :max_iters, :dt_min_unstable, :instability,
:dt_NaN, :init_NaN, :dense_output_saveat, :max_iters, :dt_min_unstable, :instability, :inconsistent_input,
:newton_convergence, :step_rejected, :step_accepted, :convergence_limit,
:alg_switch, :stiff_detection, :mismatched_input_output_type, :jacobian_update,
:w_factorization, :newton_iterations,
Expand Down Expand Up @@ -29,6 +29,7 @@
max_iters = Silent(),
dt_min_unstable = Silent(),
instability = Silent(),
inconsistent_input = Silent(),
newton_convergence = Silent(),
step_rejected = Silent(),
step_accepted = Silent(),
Expand Down Expand Up @@ -65,6 +66,7 @@
max_iters = WarnLevel(),
dt_min_unstable = WarnLevel(),
instability = WarnLevel(),
inconsistent_input = WarnLevel(),
newton_convergence = WarnLevel(),
step_rejected = Silent(),
step_accepted = Silent(),
Expand Down Expand Up @@ -101,6 +103,7 @@
max_iters = WarnLevel(),
dt_min_unstable = WarnLevel(),
instability = WarnLevel(),
inconsistent_input = WarnLevel(),
newton_convergence = Silent(),
step_rejected = Silent(),
step_accepted = Silent(),
Expand Down Expand Up @@ -137,6 +140,7 @@
max_iters = WarnLevel(),
dt_min_unstable = WarnLevel(),
instability = WarnLevel(),
inconsistent_input = WarnLevel(),
newton_convergence = WarnLevel(),
step_rejected = Silent(),
step_accepted = Silent(),
Expand Down Expand Up @@ -173,6 +177,7 @@
max_iters = WarnLevel(),
dt_min_unstable = WarnLevel(),
instability = WarnLevel(),
inconsistent_input = WarnLevel(),
newton_convergence = WarnLevel(),
step_rejected = InfoLevel(),
step_accepted = InfoLevel(),
Expand Down Expand Up @@ -205,7 +210,7 @@
groups = (
error_control = (
:dt_NaN, :init_NaN, :dense_output_saveat, :max_iters, :dt_min_unstable,
:instability, :newton_convergence, :step_rejected, :step_accepted, :convergence_limit,
:instability, :inconsistent_input, :newton_convergence, :step_rejected, :step_accepted, :convergence_limit,
),
performance = (
:alg_switch, :stiff_detection, :mismatched_input_output_type, :jacobian_update,
Expand Down Expand Up @@ -235,8 +240,8 @@ end
"""
DEVerbosity <: AbstractVerbositySpecifier

Verbosity configuration for OrdinaryDiffEq.jl solvers, providing fine-grained control over
diagnostic messages, warnings, and errors during ODE solution.
Verbosity configuration for differential equation solvers, providing fine-grained control over
diagnostic messages, warnings, and errors during solution.

# Fields

Expand Down Expand Up @@ -290,7 +295,7 @@ diagnostic messages, warnings, and errors during ODE solution.

DEVerbosity(preset::AbstractVerbosityPreset)

Create an `DEVerbosity` using a preset configuration:
Create a `DEVerbosity` using a preset configuration:
- `SciMLLogging.None()`: All messages disabled
- `SciMLLogging.Minimal()`: Only critical errors and fatal issues
- `SciMLLogging.Standard()`: Balanced verbosity (default)
Expand All @@ -299,7 +304,7 @@ Create an `DEVerbosity` using a preset configuration:

DEVerbosity(; preset=nothing, error_control=nothing, performance=nothing, numerical=nothing, sde_specific=nothing, dde_specific=nothing, kwargs...)

Create an `DEVerbosity` with group-level or individual field control.
Create a `DEVerbosity` with group-level or individual field control.

# Examples

Expand Down Expand Up @@ -329,13 +334,14 @@ verbose = DEVerbosity(
function DEVerbosity end

const DEFAULT_VERBOSE = DEVerbosity()
const NONE_VERBOSE = DEVerbosity(SciMLLogging.None())

@inline function _process_verbose_param(verbose::SciMLLogging.AbstractVerbosityPreset)
return DEVerbosity(verbose)
end

@inline function _process_verbose_param(verbose::Bool)
return verbose ? DEFAULT_VERBOSE : DEVerbosity(SciMLLogging.None())
return verbose ? DEFAULT_VERBOSE : NONE_VERBOSE
end

@inline _process_verbose_param(verbose::DEVerbosity) = verbose
4 changes: 2 additions & 2 deletions lib/OrdinaryDiffEqCore/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "OrdinaryDiffEqCore"
uuid = "bbf590c4-e513-4bbe-9b18-05decba2e5d8"
authors = ["ParamThakkar123 <paramthakkar864@gmail.com>"]
version = "3.31.0"
version = "3.32.0"

[deps]
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Expand Down Expand Up @@ -83,7 +83,7 @@ RecursiveArrayTools = "3.52"
FastPower = "1.1"
Logging = "1.10"
Mooncake = "0.4, 0.5"
DiffEqBase = "6.209"
DiffEqBase = "6.217"
Adapt = "4.3"
Reexport = "1.2"

Expand Down
6 changes: 3 additions & 3 deletions lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ import DiffEqBase: DefaultInit, ShampineCollocationInit, BrownFullBasicInit
# Internal utils
import DiffEqBase: ODE_DEFAULT_NORM,
ODE_DEFAULT_ISOUTOFDOMAIN, ODE_DEFAULT_PROG_MESSAGE,
ODE_DEFAULT_UNSTABLE_CHECK
ODE_DEFAULT_UNSTABLE_CHECK,
DEVerbosity, DEFAULT_VERBOSE, _process_verbose_param

import SciMLOperators: AbstractSciMLOperator, AbstractSciMLScalarOperator,
MatrixOperator, FunctionOperator,
Expand Down Expand Up @@ -90,7 +91,7 @@ import Accessors: @reset

using SciMLLogging: SciMLLogging, @SciMLMessage, AbstractVerbositySpecifier, AbstractVerbosityPreset,
None, Minimal, Standard, Detailed, All, Silent, InfoLevel, WarnLevel, ErrorLevel,
CustomLevel, AbstractMessageLevel, @verbosity_specifier
CustomLevel, AbstractMessageLevel

using SymbolicIndexingInterface: state_values, parameter_values

Expand Down Expand Up @@ -142,7 +143,6 @@ end

include("doc_utils.jl")
include("misc_utils.jl")
include("verbosity.jl")

include("algorithms.jl")
include("composite_algs.jl")
Expand Down
Loading