Skip to content

Commit

Permalink
Reduce dependence on OrdinaryDiffEq
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskawczynski committed Sep 7, 2024
1 parent 9eb9662 commit 609d297
Show file tree
Hide file tree
Showing 43 changed files with 99 additions and 75 deletions.
24 changes: 23 additions & 1 deletion .buildkite/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

julia_version = "1.10.4"
manifest_format = "2.0"
project_hash = "652f90825513bed89484e0ca25f9a53f61dedb8c"
project_hash = "a3b8e1623c974758b823be61fb12f149202fadbb"

[[deps.ADTypes]]
git-tree-sha1 = "99a6f5d0ce1c7c6afdb759daa30226f71c54f6b0"
Expand Down Expand Up @@ -1744,6 +1744,28 @@ git-tree-sha1 = "a8b2d333cd90562b58b977b4033739360b37fb1f"
uuid = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
version = "6.87.0"

[[deps.OrdinaryDiffEqCore]]
deps = ["ADTypes", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "EnumX", "FastBroadcast", "FastClosures", "FillArrays", "FunctionWrappersWrappers", "InteractiveUtils", "LinearAlgebra", "Logging", "MacroTools", "MuladdMacro", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleUnPack", "Static", "StaticArrayInterface", "StaticArraysCore", "TruncatedStacktraces"]
git-tree-sha1 = "bc70a38874c801549d415c16a23ec632ad91afd1"
uuid = "bbf590c4-e513-4bbe-9b18-05decba2e5d8"
version = "1.4.0"
weakdeps = ["EnzymeCore"]

[deps.OrdinaryDiffEqCore.extensions]
OrdinaryDiffEqCoreEnzymeCoreExt = "EnzymeCore"

[[deps.OrdinaryDiffEqSSPRK]]
deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "Static", "StaticArrays"]
git-tree-sha1 = "7dbe4ac56f930df5e9abd003cedb54e25cbbea86"
uuid = "669c94d9-1f4b-4b64-b377-1aa079aa2388"
version = "1.2.0"

[[deps.OrdinaryDiffEqTsit5]]
deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "Static", "TruncatedStacktraces"]
git-tree-sha1 = "96552f7d4619fabab4038a29ed37dd55e9eb513a"
uuid = "b1df2697-797e-41e3-8120-5422d3b24e4a"
version = "1.1.0"

[[deps.P11Kit_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "2cd396108e178f3ae8dedbd8e938a18726ab2fbf"
Expand Down
2 changes: 2 additions & 0 deletions .buildkite/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
NVTX = "5da4648a-3479-48b8-97b9-01cb529c0a1f"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
OrdinaryDiffEqSSPRK = "669c94d9-1f4b-4b64-b377-1aa079aa2388"
OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a"
PProf = "e4faabce-9ead-11e9-39d9-4379958e3056"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
Expand Down
2 changes: 1 addition & 1 deletion examples/bickleyjet/bickleyjet_cg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import ClimaCore:
Quadratures
import ClimaCore.Geometry:

using OrdinaryDiffEq: ODEProblem, solve, SSPRK33
using OrdinaryDiffEqSSPRK: ODEProblem, solve, SSPRK33

import Logging
import TerminalLoggers
Expand Down
2 changes: 1 addition & 1 deletion examples/bickleyjet/bickleyjet_cg_invariant_hypervisc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import ClimaCore:
Topologies,
Quadratures,
DataLayouts
using OrdinaryDiffEq: ODEProblem, solve, SSPRK33
using OrdinaryDiffEqSSPRK: ODEProblem, solve, SSPRK33

using Logging
ClimaComms.@import_required_backends
Expand Down
2 changes: 1 addition & 1 deletion examples/bickleyjet/bickleyjet_cg_unsmesh.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import ClimaCore:
Quadratures
import ClimaCore.Geometry:

using OrdinaryDiffEq: ODEProblem, solve, SSPRK33
using OrdinaryDiffEqSSPRK: ODEProblem, solve, SSPRK33

import Logging
import TerminalLoggers
Expand Down
2 changes: 1 addition & 1 deletion examples/bickleyjet/bickleyjet_dg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import ClimaCore:
import ClimaCore.Geometry:
import ClimaCore.RecursiveApply: , rdiv, rmap

using OrdinaryDiffEq: ODEProblem, solve, SSPRK33
using OrdinaryDiffEqSSPRK: ODEProblem, solve, SSPRK33

import Logging
import TerminalLoggers
Expand Down
2 changes: 1 addition & 1 deletion examples/column/advect.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import ClimaCore:
Geometry,
Spaces

using OrdinaryDiffEq: ODEProblem, solve, SSPRK33
using OrdinaryDiffEqSSPRK: ODEProblem, solve, SSPRK33

import Logging
import TerminalLoggers
Expand Down
2 changes: 1 addition & 1 deletion examples/column/advect_diffusion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import ClimaCore:
Geometry,
Spaces

using OrdinaryDiffEq: ODEProblem, solve, SSPRK33
using OrdinaryDiffEqSSPRK: ODEProblem, solve, SSPRK33

import Logging
import TerminalLoggers
Expand Down
2 changes: 1 addition & 1 deletion examples/column/bb_fct_advection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import ClimaComms
ClimaComms.@import_required_backends
using Test
using LinearAlgebra
using OrdinaryDiffEq: ODEProblem, solve
using SciMLBase: ODEProblem, solve
using ClimaTimeSteppers

import ClimaCore:
Expand Down
2 changes: 1 addition & 1 deletion examples/column/ekman.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import ClimaCore:
Geometry,
Spaces

using OrdinaryDiffEq: OrdinaryDiffEq, ODEProblem, solve, SSPRK33
using OrdinaryDiffEqSSPRK: ODEProblem, solve, SSPRK33

import Logging
import TerminalLoggers
Expand Down
2 changes: 1 addition & 1 deletion examples/column/fct_advection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import ClimaComms
ClimaComms.@import_required_backends
using Test
using LinearAlgebra
using OrdinaryDiffEq: ODEProblem, solve, SSPRK33
using OrdinaryDiffEqSSPRK: ODEProblem, solve, SSPRK33

import ClimaCore:
Fields,
Expand Down
2 changes: 1 addition & 1 deletion examples/column/heat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import ClimaCore:
Geometry,
Spaces

using OrdinaryDiffEq: ODEProblem, solve, SSPRK33
using OrdinaryDiffEqSSPRK: ODEProblem, solve, SSPRK33

import Logging
import TerminalLoggers
Expand Down
2 changes: 1 addition & 1 deletion examples/column/hydrostatic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import ClimaCore:
Geometry,
Spaces

using OrdinaryDiffEq: OrdinaryDiffEq, ODEProblem, solve, SSPRK33
using OrdinaryDiffEqSSPRK: ODEProblem, solve, SSPRK33

import Logging
import TerminalLoggers
Expand Down
2 changes: 1 addition & 1 deletion examples/column/hydrostatic_discrete.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import ClimaCore:
Geometry,
Spaces

using OrdinaryDiffEq: OrdinaryDiffEq, ODEProblem, solve, SSPRK33
using OrdinaryDiffEqSSPRK: ODEProblem, solve, SSPRK33

import Logging
import TerminalLoggers
Expand Down
2 changes: 1 addition & 1 deletion examples/column/hydrostatic_ekman.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import ClimaCore:

import ClimaCore.Geometry:

using OrdinaryDiffEq: OrdinaryDiffEq, ODEProblem, solve, SSPRK33
using OrdinaryDiffEqSSPRK: ODEProblem, solve, SSPRK33

import Logging
import TerminalLoggers
Expand Down
2 changes: 1 addition & 1 deletion examples/column/step.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import ClimaCore:
Geometry,
Spaces

using OrdinaryDiffEq: ODEProblem, solve, SSPRK33
using OrdinaryDiffEqSSPRK: ODEProblem, solve, SSPRK33

import Logging
import TerminalLoggers
Expand Down
2 changes: 1 addition & 1 deletion examples/column/wave.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import ClimaCore:
Geometry,
Spaces

using OrdinaryDiffEq: OrdinaryDiffEq, ODEProblem, solve, SSPRK33
using OrdinaryDiffEqSSPRK: ODEProblem, solve, SSPRK33

import Logging
import TerminalLoggers
Expand Down
2 changes: 1 addition & 1 deletion examples/column/zalesak_fct_advection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import ClimaComms
ClimaComms.@import_required_backends
using Test
using LinearAlgebra
using OrdinaryDiffEq: ODEProblem, solve
using SciMLBase: ODEProblem, solve
using ClimaTimeSteppers

import ClimaCore:
Expand Down
7 changes: 4 additions & 3 deletions examples/hybrid/box/bubble_3d_invariant_rhoe.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ using Adapt
using ClimaComms
ClimaComms.@import_required_backends
FloatType = eval(Meta.parse(get(ARGS, 1, "Float64")))
using StaticArrays, IntervalSets, LinearAlgebra, OrdinaryDiffEq
using StaticArrays, IntervalSets, LinearAlgebra, SciMLBase
using OrdinaryDiffEqSSPRK: SSPRK33
using DocStringExtensions

import ClimaCore:
Expand Down Expand Up @@ -446,7 +447,7 @@ function bubble_3d_invariant_ρe(ARGS, comms_ctx, ::Type{FT}) where {FT}
# run!
Δt = sim_params.Δt
prob = ODEProblem(rhs_invariant!, Y, (0.0, sim_params.t_int), ghost_buffer)
integrator = OrdinaryDiffEq.init(
integrator = SciMLBase.init(
prob,
SSPRK33(),
dt = Δt,
Expand All @@ -460,7 +461,7 @@ function bubble_3d_invariant_ρe(ARGS, comms_ctx, ::Type{FT}) where {FT}
throw(:exit_profile)
end

t_diff = @elapsed sol_invariant = OrdinaryDiffEq.solve!(integrator)
t_diff = @elapsed sol_invariant = SciMLBase.solve!(integrator)

if ClimaComms.iamroot(comms_ctx)
println("Walltime = $t_diff seconds")
Expand Down
2 changes: 1 addition & 1 deletion examples/hybrid/box/bubble_3d_invariant_rhotheta.jl
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ dYdt = similar(Y);
rhs_invariant!(dYdt, Y, nothing, 0.0);

# run!
using OrdinaryDiffEq
using OrdinaryDiffEqSSPRK: ODEProblem, solve, SSPRK33
Δt = 0.050
prob = ODEProblem(rhs_invariant!, Y, (0.0, 1.0))
sol = solve(
Expand Down
6 changes: 3 additions & 3 deletions examples/hybrid/box/bubble_3d_rhotheta.jl
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,10 @@ rhs!(dYdt, Y, nothing, 0.0);


# run!
using OrdinaryDiffEq
using OrdinaryDiffEqSSPRK: ODEProblem, init, solve!, SSPRK33
Δt = 0.05
prob = ODEProblem(rhs!, Y, (0.0, 1.0))
integrator = OrdinaryDiffEq.init(
integrator = init(
prob,
SSPRK33(),
dt = Δt,
Expand All @@ -321,7 +321,7 @@ if haskey(ENV, "CI_PERF_SKIP_RUN") # for performance analysis
throw(:exit_profile)
end

sol = @timev OrdinaryDiffEq.solve!(integrator)
sol = @timev solve!(integrator)

ENV["GKSwstype"] = "nul"
import Plots
Expand Down
6 changes: 3 additions & 3 deletions examples/hybrid/driver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ atexit() do
global_logger(prev_logger)
end

using OrdinaryDiffEq
using SciMLBase
using DiffEqCallbacks
using JLD2

Expand Down Expand Up @@ -163,7 +163,7 @@ problem = ODE.ODEProblem(
(t_start, t_end),
p,
)
integrator = OrdinaryDiffEq.init(
integrator = SciMLBase.init(
problem,
ode_algo;
saveat = dt_save_to_sol == 0 ? [] : dt_save_to_sol,
Expand All @@ -182,7 +182,7 @@ end
@info "Running `$test_dir/$test_file_name` test case"
@info "on a vertical $z_stretch_string grid"

walltime = @elapsed sol = OrdinaryDiffEq.solve!(integrator)
walltime = @elapsed sol = SciMLBase.solve!(integrator)
any(isnan, sol.u[end]) && error("NaNs found in result.")

if is_distributed # replace sol.u on the root processor with the global sol.u
Expand Down
6 changes: 3 additions & 3 deletions examples/hybrid/plane/bubble_2d_invariant_rhoe.jl
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,10 @@ dYdt = similar(Y);
rhs_invariant!(dYdt, Y, nothing, 0.0);

# run!
using OrdinaryDiffEq
using OrdinaryDiffEqSSPRK: init, ODEProblem, solve!, SSPRK33
Δt = 0.04
prob = ODEProblem(rhs_invariant!, Y, (0.0, 1200.0))
integrator = OrdinaryDiffEq.init(
integrator = init(
prob,
SSPRK33(),
dt = Δt,
Expand All @@ -269,7 +269,7 @@ if haskey(ENV, "CI_PERF_SKIP_RUN") # for performance analysis
throw(:exit_profile)
end

sol = @timev OrdinaryDiffEq.solve!(integrator)
sol = @timev solve!(integrator)

ENV["GKSwstype"] = "nul"
import Plots, ClimaCorePlots
Expand Down
6 changes: 3 additions & 3 deletions examples/hybrid/plane/density_current_2d_flux_form.jl
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,11 @@ rhs!(dYdt, Y, nothing, 0.0);


# run!
using OrdinaryDiffEq
using OrdinaryDiffEqSSPRK: ODEProblem, init, solve!, SSPRK33
Δt = 0.3
prob = ODEProblem(rhs!, Y, (0.0, 900.0))

integrator = OrdinaryDiffEq.init(
integrator = init(
prob,
SSPRK33(),
dt = Δt,
Expand All @@ -312,7 +312,7 @@ if haskey(ENV, "CI_PERF_SKIP_RUN") # for performance analysis
throw(:exit_profile)
end

sol = @timev OrdinaryDiffEq.solve!(integrator)
sol = @timev solve!(integrator)

ENV["GKSwstype"] = "nul"
using ClimaCorePlots, Plots
Expand Down
6 changes: 3 additions & 3 deletions examples/hybrid/plane/density_current_2dinvariant_rhoe.jl
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,11 @@ dYdt = similar(Y);
rhs_invariant!(dYdt, Y, nothing, 0.0);

# run!
using OrdinaryDiffEq
using OrdinaryDiffEqSSPRK: ODEProblem, init, solve!, SSPRK33
timeend = 900.0
Δt = 0.3
prob = ODEProblem(rhs_invariant!, Y, (0.0, timeend))
integrator = OrdinaryDiffEq.init(
integrator = init(
prob,
SSPRK33(),
dt = Δt,
Expand All @@ -289,7 +289,7 @@ if haskey(ENV, "CI_PERF_SKIP_RUN") # for performance analysis
throw(:exit_profile)
end

sol = @timev OrdinaryDiffEq.solve!(integrator)
sol = @timev solve!(integrator)

ENV["GKSwstype"] = "nul"
import Plots, ClimaCorePlots
Expand Down
6 changes: 3 additions & 3 deletions examples/hybrid/plane/isothermal_channel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,10 @@ dYdt = similar(Y);
rhs_invariant!(dYdt, Y, nothing, 0.0);

# run!
using OrdinaryDiffEq
using OrdinaryDiffEqSSPRK: ODEProblem, init, solve!, SSPRK33
Δt = 0.5
prob = ODEProblem(rhs_invariant!, Y, (0.0, 15000.0))
integrator = OrdinaryDiffEq.init(
integrator = init(
prob,
SSPRK33(),
dt = Δt,
Expand All @@ -293,7 +293,7 @@ if haskey(ENV, "CI_PERF_SKIP_RUN") # for performance analysis
throw(:exit_profile)
end

sol = @timev OrdinaryDiffEq.solve!(integrator)
sol = @timev solve!(integrator)

ENV["GKSwstype"] = "nul"
import Plots, ClimaCorePlots
Expand Down
6 changes: 3 additions & 3 deletions examples/hybrid/plane/topo_agnesi_nh.jl
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ dYdt = similar(Y);
rhs_invariant!(dYdt, Y, nothing, 0.0);

# run!
using OrdinaryDiffEq
using OrdinaryDiffEqSSPRK: ODEProblem, init, solve!, SSPRK33
Δt = 1.0
timeend = 72000.0
function make_dss_func()
Expand All @@ -347,7 +347,7 @@ end
dss_func = make_dss_func()
dss_callback = FunctionCallingCallback(dss_func, func_start = true)
prob = ODEProblem(rhs_invariant!, Y, (0.0, timeend))
integrator = OrdinaryDiffEq.init(
integrator = init(
prob,
SSPRK33(),
dt = Δt,
Expand All @@ -361,7 +361,7 @@ if haskey(ENV, "CI_PERF_SKIP_RUN") # for performance analysis
throw(:exit_profile)
end

sol = @timev OrdinaryDiffEq.solve!(integrator)
sol = @timev solve!(integrator)

ENV["GKSwstype"] = "nul"
import Plots, ClimaCorePlots
Expand Down
Loading

0 comments on commit 609d297

Please sign in to comment.