Skip to content

Commit

Permalink
Try out new implicit solver interface
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisYatunin committed Sep 6, 2023
1 parent c7a266e commit 957c891
Show file tree
Hide file tree
Showing 11 changed files with 530 additions and 710 deletions.
4 changes: 4 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ steps:
- julia -e 'using Pkg; Pkg.add("MPIPreferences"); using MPIPreferences; use_system_binary()'

- echo "--- Instantiate project"
- "julia --project -e 'using Pkg; Pkg.add(url=\"https://github.com/CliMA/ClimaCore.jl\", rev=\"dy/field_matrix\")'"
- "julia --project -e 'using Pkg; Pkg.instantiate(;verbose=true)'"
- "julia --project -e 'using Pkg; Pkg.precompile()'"
- "julia --project -e 'using Pkg; Pkg.status()'"
Expand All @@ -36,16 +37,19 @@ steps:

- echo "--- Instantiate test"
- "julia --project=test -e 'using Pkg; Pkg.develop(path = \".\")'"
- "julia --project=test -e 'using Pkg; Pkg.add(url=\"https://github.com/CliMA/ClimaCore.jl\", rev=\"dy/field_matrix\")'"
- "julia --project=test -e 'using Pkg; Pkg.instantiate(;verbose=true)'"
- "julia --project=test -e 'using Pkg; Pkg.precompile()'"
- "julia --project=test -e 'using Pkg; Pkg.status()'"

- echo "--- Instantiate examples"
- "julia --project=examples -e 'using Pkg; Pkg.add(url=\"https://github.com/CliMA/ClimaCore.jl\", rev=\"dy/field_matrix\")'"
- "julia --project=examples -e 'using Pkg; Pkg.instantiate(;verbose=true)'"
- "julia --project=examples -e 'using Pkg; Pkg.precompile()'"
- "julia --project=examples -e 'using Pkg; Pkg.status()'"

- echo "--- Instantiate perf"
- "julia --project=perf -e 'using Pkg; Pkg.add(url=\"https://github.com/CliMA/ClimaCore.jl\", rev=\"dy/field_matrix\")'"
- "julia --project=perf -e 'using Pkg; Pkg.instantiate(;verbose=true)'"
- "julia --project=perf -e 'using Pkg; Pkg.precompile()'"
- "julia --project=perf -e 'using Pkg; Pkg.status()'"
Expand Down
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
FastGaussQuadrature = "442a2c76-b920-505d-bb47-c5924d526838"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
ImageFiltering = "6a3955dd-da59-5b1f-98d4-e7296123deb5"
Insolation = "e98cc03f-d57e-4e3c-b70c-8d51efe9e0d8"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
Expand Down
16 changes: 9 additions & 7 deletions examples/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
version = "1.16.0"

[[deps.ClimaAtmos]]
deps = ["ArgParse", "ArtifactWrappers", "Artifacts", "AtmosphericProfilesLibrary", "CLIMAParameters", "CUDA", "ClimaComms", "ClimaCore", "ClimaTimeSteppers", "CloudMicrophysics", "Colors", "Dates", "Dierckx", "DiffEqBase", "DiffEqCallbacks", "Distributions", "DocStringExtensions", "FastGaussQuadrature", "ImageFiltering", "Insolation", "Interpolations", "IntervalSets", "JLD2", "LambertW", "LinearAlgebra", "Logging", "NCDatasets", "NVTX", "OrdinaryDiffEq", "Pkg", "Printf", "RRTMGP", "Random", "RootSolvers", "StaticArrays", "Statistics", "StatsBase", "SurfaceFluxes", "TerminalLoggers", "Test", "Thermodynamics", "YAML"]
deps = ["ArgParse", "ArtifactWrappers", "Artifacts", "AtmosphericProfilesLibrary", "CLIMAParameters", "CUDA", "ClimaComms", "ClimaCore", "ClimaTimeSteppers", "CloudMicrophysics", "Colors", "Dates", "Dierckx", "DiffEqBase", "DiffEqCallbacks", "Distributions", "DocStringExtensions", "FastGaussQuadrature", "ForwardDiff", "ImageFiltering", "Insolation", "Interpolations", "IntervalSets", "JLD2", "LambertW", "LinearAlgebra", "Logging", "NCDatasets", "NVTX", "OrdinaryDiffEq", "Pkg", "Printf", "RRTMGP", "Random", "RootSolvers", "StaticArrays", "Statistics", "StatsBase", "SurfaceFluxes", "TerminalLoggers", "Test", "Thermodynamics", "YAML"]
path = ".."
uuid = "b2c96348-7fb7-4fe0-8da9-78d88439e717"
version = "0.16.0"
Expand All @@ -299,9 +299,11 @@ version = "0.5.3"

[[deps.ClimaCore]]
deps = ["Adapt", "BandedMatrices", "BlockArrays", "CUDA", "ClimaComms", "CubedSphere", "DataStructures", "DocStringExtensions", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "LinearAlgebra", "PkgVersion", "RecursiveArrayTools", "Requires", "RootSolvers", "SparseArrays", "Static", "StaticArrays", "Statistics", "UnPack"]
git-tree-sha1 = "f8c0f248eb34fb222455830e35a17f4d1bef9e1c"
git-tree-sha1 = "5317c7d3591f991f438ddb9e63da3395a219dda6"
repo-rev = "dy/field_matrix"
repo-url = "https://github.com/CliMA/ClimaCore.jl.git"
uuid = "d414da3d-4745-48bb-8d80-42e94e092884"
version = "0.10.49"
version = "0.10.48"

[[deps.ClimaCoreMakie]]
deps = ["ClimaCore", "Makie"]
Expand Down Expand Up @@ -2133,9 +2135,9 @@ version = "0.4.0+0"

[[deps.RootSolvers]]
deps = ["DocStringExtensions", "ForwardDiff"]
git-tree-sha1 = "bafbed2755bf8b1e42fd21f5bb417ff03e9cf1a1"
git-tree-sha1 = "9fb3462240d2898be5d4acf8925e47f70ec64d07"
uuid = "7181ea78-2dcb-4de3-ab41-2b8ab5a31e74"
version = "0.4.0"
version = "0.3.5"

[[deps.RoundingEmulator]]
git-tree-sha1 = "40b9edad2e5287e05bd413a38f61a8ff55b9557b"
Expand Down Expand Up @@ -2530,9 +2532,9 @@ version = "1.0.1"

[[deps.Thermodynamics]]
deps = ["DocStringExtensions", "KernelAbstractions", "Random", "RootSolvers"]
git-tree-sha1 = "3f8dfde3a9b02a00509ee1bdabc25045e95101dd"
git-tree-sha1 = "ac3b5236da4d028b9a3984ae7b28730d46892dbf"
uuid = "b60c26fb-14c3-4610-9d3e-2d17fe7ff00c"
version = "0.11.1"
version = "0.11.0"

[[deps.ThreadingUtilities]]
deps = ["ManualMemory"]
Expand Down
3 changes: 1 addition & 2 deletions src/ClimaAtmos.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ include(joinpath("utils", "discrete_hydrostatic_balance.jl"))
include(joinpath("prognostic_equations", "pressure_work.jl"))
include(joinpath("prognostic_equations", "zero_velocity.jl"))

include(joinpath("prognostic_equations", "implicit", "wfact.jl"))
include(joinpath("prognostic_equations", "implicit", "schur_complement_W.jl"))
include(joinpath("prognostic_equations", "implicit", "implicit_tendency.jl"))
include(joinpath("prognostic_equations", "implicit", "implicit_solver.jl"))

include(joinpath("prognostic_equations", "remaining_tendency.jl"))
include(joinpath("prognostic_equations", "forcing", "large_scale_advection.jl")) # TODO: should this be in tendencies/?
Expand Down
7 changes: 2 additions & 5 deletions src/cache/cache.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using LinearAlgebra: ×, norm, dot
using LinearAlgebra: ×, norm, dot, Adjoint

import ClimaAtmos.Parameters as CAP
using ClimaCore: Operators, Fields, Limiters, Geometry, Spaces
Expand Down Expand Up @@ -96,10 +96,7 @@ function default_cache(
ᶜp_ref,
ᶜT = similar(Y.c, FT),
ᶜf,
∂ᶜK∂ᶠu₃_data = similar(
Y.c,
Operators.StencilCoefs{-half, half, NTuple{2, FT}},
),
∂ᶜK∂ᶠu₃ = similar(Y.c, BidiagonalMatrixRow{Adjoint{FT, CT3{FT}}}),
params,
energy_upwinding,
tracer_upwinding,
Expand Down
1 change: 0 additions & 1 deletion src/dycore_equations_deprecated/sgs_flux_tendencies.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using LinearAlgebra
import OrdinaryDiffEq as ODE
import Logging
import TerminalLoggers
Expand Down
Loading

0 comments on commit 957c891

Please sign in to comment.