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 1, 2023
1 parent d4cc64c commit f89e65f
Show file tree
Hide file tree
Showing 11 changed files with 518 additions and 705 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
6 changes: 4 additions & 2 deletions examples/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,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 @@ -295,7 +295,9 @@ 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 = "23890cb4479e498244b220613e8dd188aba37975"
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.48"

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 f89e65f

Please sign in to comment.