Skip to content

Commit

Permalink
Merge #1415
Browse files Browse the repository at this point in the history
1415: Fully remove direct dependency on DiffEqBase r=charleskawczynski a=charleskawczynski

Followup to #1414, we replace this with a dependency on SciMLBase, which is much more lightweight. (to fully close out #331). A step towards #1235.

Co-authored-by: Charles Kawczynski <[email protected]>
  • Loading branch information
bors[bot] and charleskawczynski committed Aug 5, 2023
2 parents 50424fe + 49ef389 commit 6183ba6
Show file tree
Hide file tree
Showing 15 changed files with 36 additions and 39 deletions.
10 changes: 5 additions & 5 deletions benchmarks/bickleyjet/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,10 @@ uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71"
version = "0.72.9"

[[deps.GR_jll]]
deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Qt6Base_jll", "Zlib_jll", "libpng_jll"]
git-tree-sha1 = "f61f768bf090d97c532d24b64e07b237e9bb7b6b"
deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "FreeType2_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Qt6Base_jll", "Zlib_jll", "libpng_jll"]
git-tree-sha1 = "1596bab77f4f073a14c62424283e7ebff3072eca"
uuid = "d2c73de3-f751-5644-a686-071e5b155ba9"
version = "0.72.9+0"
version = "0.72.9+1"

[[deps.GaussQuadrature]]
deps = ["SpecialFunctions"]
Expand Down Expand Up @@ -1092,9 +1092,9 @@ version = "0.4.1"

[[deps.Unitful]]
deps = ["ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "Random"]
git-tree-sha1 = "1cd9b6d3f637988ca788007b7466c132feebe263"
git-tree-sha1 = "64eb17acef1d9734cf09967539818f38093d9b35"
uuid = "1986cc42-f94f-5a68-af5c-568840ba703d"
version = "1.16.1"
version = "1.16.2"

[[deps.UnitfulLatexify]]
deps = ["LaTeXStrings", "Latexify", "Unitful"]
Expand Down
10 changes: 5 additions & 5 deletions docs/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -694,10 +694,10 @@ uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71"
version = "0.72.9"

[[deps.GR_jll]]
deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Qt6Base_jll", "Zlib_jll", "libpng_jll"]
git-tree-sha1 = "f61f768bf090d97c532d24b64e07b237e9bb7b6b"
deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "FreeType2_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Qt6Base_jll", "Zlib_jll", "libpng_jll"]
git-tree-sha1 = "1596bab77f4f073a14c62424283e7ebff3072eca"
uuid = "d2c73de3-f751-5644-a686-071e5b155ba9"
version = "0.72.9+0"
version = "0.72.9+1"

[[deps.GaussQuadrature]]
deps = ["SpecialFunctions"]
Expand Down Expand Up @@ -2121,9 +2121,9 @@ version = "0.4.1"

[[deps.Unitful]]
deps = ["ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "Random"]
git-tree-sha1 = "1cd9b6d3f637988ca788007b7466c132feebe263"
git-tree-sha1 = "64eb17acef1d9734cf09967539818f38093d9b35"
uuid = "1986cc42-f94f-5a68-af5c-568840ba703d"
version = "1.16.1"
version = "1.16.2"

[[deps.UnitfulLatexify]]
deps = ["LaTeXStrings", "Latexify", "Unitful"]
Expand Down
12 changes: 6 additions & 6 deletions examples/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

julia_version = "1.8.5"
manifest_format = "2.0"
project_hash = "f83a9db1f18fcdbfe5617cfdec71fc6f7394c4c2"
project_hash = "037057f753be71d701aa4d6f94452110f8465205"

[[deps.ADTypes]]
git-tree-sha1 = "f5c25e8a5b29b5e941b7408bc8cc79fea4d9ef9a"
Expand Down Expand Up @@ -591,10 +591,10 @@ uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71"
version = "0.72.9"

[[deps.GR_jll]]
deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Qt6Base_jll", "Zlib_jll", "libpng_jll"]
git-tree-sha1 = "f61f768bf090d97c532d24b64e07b237e9bb7b6b"
deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "FreeType2_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Qt6Base_jll", "Zlib_jll", "libpng_jll"]
git-tree-sha1 = "1596bab77f4f073a14c62424283e7ebff3072eca"
uuid = "d2c73de3-f751-5644-a686-071e5b155ba9"
version = "0.72.9+0"
version = "0.72.9+1"

[[deps.GaussQuadrature]]
deps = ["SpecialFunctions"]
Expand Down Expand Up @@ -1719,9 +1719,9 @@ version = "0.4.1"

[[deps.Unitful]]
deps = ["ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "Random"]
git-tree-sha1 = "1cd9b6d3f637988ca788007b7466c132feebe263"
git-tree-sha1 = "64eb17acef1d9734cf09967539818f38093d9b35"
uuid = "1986cc42-f94f-5a68-af5c-568840ba703d"
version = "1.16.1"
version = "1.16.2"

[[deps.UnitfulLatexify]]
deps = ["LaTeXStrings", "Latexify", "Unitful"]
Expand Down
1 change: 0 additions & 1 deletion examples/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ ClimaCoreTempestRemap = "d934ef94-cdd4-4710-83d6-720549644b70"
ClimaCoreVTK = "c8b6d40d-e815-466f-95ae-c48aefa668fa"
ClimaTimeSteppers = "595c0a79-7f3d-439a-bc5a-b232dc3bde79"
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
Expand Down
1 change: 0 additions & 1 deletion examples/column/bb_fct_advection.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Test
using LinearAlgebra
using OrdinaryDiffEq: ODEProblem, solve
using DiffEqBase
using ClimaTimeSteppers

import ClimaCore:
Expand Down
1 change: 0 additions & 1 deletion examples/column/zalesak_fct_advection.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Test
using LinearAlgebra
using OrdinaryDiffEq: ODEProblem, solve
using DiffEqBase
using ClimaTimeSteppers

import ClimaCore:
Expand Down
1 change: 0 additions & 1 deletion examples/hybrid/box/limiters_advection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import ClimaCore:
slab
import ClimaCore.Geometry:
using OrdinaryDiffEq: ODEProblem, solve
using DiffEqBase
using ClimaTimeSteppers

import Logging
Expand Down
10 changes: 7 additions & 3 deletions examples/hybrid/driver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ postprocessing(sol, output_dir) = nothing

import ClimaTimeSteppers as CTS
using ClimaComms
import SciMLBase
const comms_ctx = ClimaComms.context()
is_distributed = comms_ctx isa ClimaComms.MPICommsContext

Expand Down Expand Up @@ -143,8 +144,11 @@ else
initial_affect = true,
)
end
callback =
CallbackSet(dss_callback, save_to_disk_callback, additional_callbacks...)
callback = SciMLBase.CallbackSet(
dss_callback,
save_to_disk_callback,
additional_callbacks...,
)

problem = ODE.ODEProblem(
CTS.ClimaODEFunction(;
Expand Down Expand Up @@ -216,7 +220,7 @@ if is_distributed # replace sol.u on the root processor with the global sol.u
end
end
if ClimaComms.iamroot(comms_ctx)
sol = DiffEqBase.sensitivity_solution(sol, global_sol_u, sol.t)
sol = SciMLBase.sensitivity_solution(sol, global_sol_u, sol.t)
output_file =
joinpath(output_dir, "scaling_data_$(nprocs)_processes.jld2")
println("writing performance data to $output_file")
Expand Down
6 changes: 3 additions & 3 deletions examples/hybrid/ode_config.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import DiffEqBase
import SciMLBase
import OrdinaryDiffEq as ODE
import ClimaTimeSteppers as CTS

Expand All @@ -23,15 +23,15 @@ is_ordinary_diffeq_newton(alg_or_tableau) =
}

is_imex_CTS_algo(::CTS.IMEXAlgorithm) = true
is_imex_CTS_algo(::DiffEqBase.AbstractODEAlgorithm) = false
is_imex_CTS_algo(::SciMLBase.AbstractODEAlgorithm) = false

is_implicit(::ODE.OrdinaryDiffEqImplicitAlgorithm) = true
is_implicit(::ODE.OrdinaryDiffEqAdaptiveImplicitAlgorithm) = true
is_implicit(ode_algo) = is_imex_CTS_algo(ode_algo)

is_rosenbrock(::ODE.Rosenbrock23) = true
is_rosenbrock(::ODE.Rosenbrock32) = true
is_rosenbrock(::DiffEqBase.AbstractODEAlgorithm) = false
is_rosenbrock(::SciMLBase.AbstractODEAlgorithm) = false
use_transform(ode_algo) =
!(is_imex_CTS_algo(ode_algo) || is_rosenbrock(ode_algo))

Expand Down
1 change: 0 additions & 1 deletion examples/hybrid/sphere/hadley_circulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import ClimaCore:
import ClimaCore.Utilities: half

using OrdinaryDiffEq: ODEProblem, solve
using DiffEqBase
using ClimaTimeSteppers

using NCDatasets, ClimaCoreTempestRemap
Expand Down
1 change: 0 additions & 1 deletion examples/plane/limiters_advection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import ClimaCore:
Domains, Fields, Geometry, Meshes, Operators, Spaces, Topologies, Limiters

using OrdinaryDiffEq: ODEProblem, solve
using DiffEqBase
using ClimaTimeSteppers

import Logging
Expand Down
7 changes: 4 additions & 3 deletions examples/sphere/shallow_water_cuda.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ using CUDA
using ClimaComms
using DocStringExtensions
using LinearAlgebra
using ClimaTimeSteppers, DiffEqBase
using ClimaTimeSteppers
import SciMLBase
import OrdinaryDiffEq as ODE
import ClimaTimeSteppers as CTS
using DiffEqCallbacks
Expand Down Expand Up @@ -581,7 +582,7 @@ function shallow_water_driver_cuda(ARGS, ::Type{FT}) where {FT}
adaptive = false,
progress_message = (dt, u, p, t) -> t,
internalnorm = (u, t) -> norm(parent(Y)),
callback = CallbackSet(save_callback),
callback = SciMLBase.CallbackSet(save_callback),
)

return integrator
Expand All @@ -590,5 +591,5 @@ end
integrator = shallow_water_driver_cuda(ARGS, Float64)

if !isinteractive()
solve!(integrator)
SciMLBase.solve!(integrator)
end
12 changes: 6 additions & 6 deletions perf/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

julia_version = "1.8.5"
manifest_format = "2.0"
project_hash = "c54aa7d0b23478422bec08435ef844c918675b5c"
project_hash = "a0e6654ac8ff86eaa046a2da8cf5fbd3959ce466"

[[deps.ADTypes]]
git-tree-sha1 = "f5c25e8a5b29b5e941b7408bc8cc79fea4d9ef9a"
Expand Down Expand Up @@ -639,10 +639,10 @@ uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71"
version = "0.72.9"

[[deps.GR_jll]]
deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Qt6Base_jll", "Zlib_jll", "libpng_jll"]
git-tree-sha1 = "f61f768bf090d97c532d24b64e07b237e9bb7b6b"
deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "FreeType2_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Qt6Base_jll", "Zlib_jll", "libpng_jll"]
git-tree-sha1 = "1596bab77f4f073a14c62424283e7ebff3072eca"
uuid = "d2c73de3-f751-5644-a686-071e5b155ba9"
version = "0.72.9+0"
version = "0.72.9+1"

[[deps.GaussQuadrature]]
deps = ["SpecialFunctions"]
Expand Down Expand Up @@ -1883,9 +1883,9 @@ version = "0.4.1"

[[deps.Unitful]]
deps = ["ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "Random"]
git-tree-sha1 = "1cd9b6d3f637988ca788007b7466c132feebe263"
git-tree-sha1 = "64eb17acef1d9734cf09967539818f38093d9b35"
uuid = "1986cc42-f94f-5a68-af5c-568840ba703d"
version = "1.16.1"
version = "1.16.2"

[[deps.UnitfulLatexify]]
deps = ["LaTeXStrings", "Latexify", "Unitful"]
Expand Down
1 change: 0 additions & 1 deletion perf/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ ClimaCoreTempestRemap = "d934ef94-cdd4-4710-83d6-720549644b70"
ClimaCoreVTK = "c8b6d40d-e815-466f-95ae-c48aefa668fa"
ClimaTimeSteppers = "595c0a79-7f3d-439a-bc5a-b232dc3bde79"
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def"
DiffEqOperators = "9fdde737-9c7f-55bf-ade8-46b3f136cc48"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
Expand Down
1 change: 0 additions & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ ClimaComms = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d"
ClimaCore = "d414da3d-4745-48bb-8d80-42e94e092884"
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
CubedSphere = "7445602f-e544-4518-8976-18f8e8ae6cdb"
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
GFlops = "2ea8233c-34d4-5acc-88b4-02f326385bcc"
Expand Down

0 comments on commit 6183ba6

Please sign in to comment.