Skip to content

Commit 57bf01e

Browse files
committed
Add integration test with limiters
1 parent 07b50ac commit 57bf01e

File tree

8 files changed

+555
-72
lines changed

8 files changed

+555
-72
lines changed

.buildkite/pipeline.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ env:
44
OPENMPI_VERSION: "4.1.1"
55
OPENBLAS_NUM_THREADS: 1
66
CLIMATEMACHINE_SETTINGS_FIX_RNG_SEED: "true"
7-
JULIA_DEPOT_PATH: "${BUILDKITE_BUILD_PATH}/${BUILDKITE_PIPELINE_SLUG}/depot/cpu"
87

98
steps:
109
- label: "init cpu env"
1110
key: "init_cpu_env"
1211
command:
13-
- "echo $$JULIA_DEPOT_PATH"
1412
- echo "--- Configure MPI"
1513
- julia -e 'using Pkg; Pkg.add("MPIPreferences"); using MPIPreferences; use_system_binary()'
1614

docs/Manifest.toml

Lines changed: 86 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
julia_version = "1.8.5"
44
manifest_format = "2.0"
5-
project_hash = "b41a2b6962844aa850e2210be1742cc1868a096b"
5+
project_hash = "0445f0b63f403d783217e170583dfd95f7a70fe5"
66

77
[[deps.AMD]]
88
deps = ["Libdl", "LinearAlgebra", "SparseArrays", "Test"]
@@ -173,9 +173,9 @@ version = "0.5.1"
173173

174174
[[deps.ChainRulesCore]]
175175
deps = ["Compat", "LinearAlgebra", "SparseArrays"]
176-
git-tree-sha1 = "e7ff6cadf743c098e08fca25c91103ee4303c9bb"
176+
git-tree-sha1 = "c6d890a52d2c4d55d326439580c3b8d0875a77d9"
177177
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
178-
version = "1.15.6"
178+
version = "1.15.7"
179179

180180
[[deps.ChangesOfVariables]]
181181
deps = ["ChainRulesCore", "LinearAlgebra", "Test"]
@@ -195,6 +195,12 @@ git-tree-sha1 = "ba403ef47480ab31edb6b02d499538574b321c74"
195195
uuid = "d414da3d-4745-48bb-8d80-42e94e092884"
196196
version = "0.10.23"
197197

198+
[[deps.ClimaCorePlots]]
199+
deps = ["ClimaCore", "RecipesBase", "StaticArrays", "TriplotBase"]
200+
git-tree-sha1 = "2fb63d2573c4ba4aff1ed7829a6c91032be5d488"
201+
uuid = "cf7c7e5a-b407-4c48-9047-11a94a308626"
202+
version = "0.2.4"
203+
198204
[[deps.ClimaTimeSteppers]]
199205
deps = ["CUDA", "ClimaComms", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "KernelAbstractions", "Krylov", "LinearAlgebra", "LinearOperators", "SciMLBase", "StaticArrays"]
200206
path = ".."
@@ -276,11 +282,16 @@ git-tree-sha1 = "fcbb72b032692610bfbdb15018ac16a36cf2e406"
276282
uuid = "adafc99b-e345-5852-983c-f28acb93d879"
277283
version = "0.3.1"
278284

285+
[[deps.Crayons]]
286+
git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15"
287+
uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f"
288+
version = "4.1.1"
289+
279290
[[deps.CubedSphere]]
280-
deps = ["Elliptic", "Printf", "Rotations", "TaylorSeries", "Test"]
281-
git-tree-sha1 = "d5b15ff3bc2073a864f38a09b446a3b735a96125"
291+
deps = ["Elliptic", "FFTW", "Printf", "ProgressBars", "SpecialFunctions", "TaylorSeries", "Test"]
292+
git-tree-sha1 = "db9c12cb765cc048e158987388287c52baddf57d"
282293
uuid = "7445602f-e544-4518-8976-18f8e8ae6cdb"
283-
version = "0.2.1"
294+
version = "0.2.2"
284295

285296
[[deps.DataAPI]]
286297
git-tree-sha1 = "e8119c1a33d267e16108be441a287a6981ba1630"
@@ -420,6 +431,18 @@ git-tree-sha1 = "74faea50c1d007c85837327f6775bea60b5492dd"
420431
uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5"
421432
version = "4.4.2+2"
422433

434+
[[deps.FFTW]]
435+
deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"]
436+
git-tree-sha1 = "90630efff0894f8142308e334473eba54c433549"
437+
uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
438+
version = "1.5.0"
439+
440+
[[deps.FFTW_jll]]
441+
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
442+
git-tree-sha1 = "c6033cc3892d0ef5bb9cd29b7f2f0331ea5184ea"
443+
uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a"
444+
version = "3.3.10+0"
445+
423446
[[deps.FastBroadcast]]
424447
deps = ["ArrayInterface", "ArrayInterfaceCore", "LinearAlgebra", "Polyester", "Static", "StrideArraysCore"]
425448
git-tree-sha1 = "4bef892787c972913d4d84e7255400759bb650e5"
@@ -517,15 +540,15 @@ version = "3.3.8+0"
517540

518541
[[deps.GPUArrays]]
519542
deps = ["Adapt", "GPUArraysCore", "LLVM", "LinearAlgebra", "Printf", "Random", "Reexport", "Serialization", "Statistics"]
520-
git-tree-sha1 = "45d7deaf05cbb44116ba785d147c518ab46352d7"
543+
git-tree-sha1 = "5ae0f2ab6f6d99d558cb588763f76311106c71b1"
521544
uuid = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7"
522-
version = "8.5.0"
545+
version = "8.6.0"
523546

524547
[[deps.GPUArraysCore]]
525548
deps = ["Adapt"]
526-
git-tree-sha1 = "6872f5ec8fd1a38880f027a26739d42dcda6691f"
549+
git-tree-sha1 = "57f7cde02d7a53c9d1d28443b9f11ac5fbe7ebc9"
527550
uuid = "46192b85-c4d5-4398-a991-12ede77f4527"
528-
version = "0.1.2"
551+
version = "0.1.3"
529552

530553
[[deps.GPUCompiler]]
531554
deps = ["ExprTools", "InteractiveUtils", "LLVM", "Libdl", "Logging", "TimerOutputs", "UUIDs"]
@@ -605,9 +628,9 @@ version = "1.12.2+2"
605628

606629
[[deps.HTTP]]
607630
deps = ["Base64", "CodecZlib", "Dates", "IniFile", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"]
608-
git-tree-sha1 = "fd9861adba6b9ae4b42582032d0936d456c8602d"
631+
git-tree-sha1 = "eb5aa5e3b500e191763d35198f859e4b40fff4a6"
609632
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
610-
version = "1.6.3"
633+
version = "1.7.3"
611634

612635
[[deps.HarfBuzz_jll]]
613636
deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"]
@@ -648,6 +671,12 @@ git-tree-sha1 = "f550e6e32074c939295eb5ea6de31849ac2c9625"
648671
uuid = "83e8ac13-25f8-5344-8a64-a9f2b223428f"
649672
version = "0.5.1"
650673

674+
[[deps.IntelOpenMP_jll]]
675+
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
676+
git-tree-sha1 = "d979e54b71da82f3a65b62553da4fc3d18c9004c"
677+
uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0"
678+
version = "2018.0.3+2"
679+
651680
[[deps.InteractiveUtils]]
652681
deps = ["Markdown"]
653682
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
@@ -754,9 +783,9 @@ version = "3.0.0+1"
754783

755784
[[deps.LLVM]]
756785
deps = ["CEnum", "LLVMExtra_jll", "Libdl", "Printf", "Unicode"]
757-
git-tree-sha1 = "088dd02b2797f0233d92583562ab669de8517fd1"
786+
git-tree-sha1 = "b8ae281340f0d3e973aae7b96fb7502b0119b376"
758787
uuid = "929cbde3-209d-540e-8aea-75f648917ca0"
759-
version = "4.14.1"
788+
version = "4.15.0"
760789

761790
[[deps.LLVMExtra_jll]]
762791
deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg", "TOML"]
@@ -900,9 +929,15 @@ version = "1.0.0"
900929

901930
[[deps.LoopVectorization]]
902931
deps = ["ArrayInterface", "ArrayInterfaceCore", "ArrayInterfaceOffsetArrays", "ArrayInterfaceStaticArrays", "CPUSummary", "ChainRulesCore", "CloseOpenIntervals", "DocStringExtensions", "ForwardDiff", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "SIMDDualNumbers", "SIMDTypes", "SLEEFPirates", "SnoopPrecompile", "SpecialFunctions", "Static", "ThreadingUtilities", "UnPack", "VectorizationBase"]
903-
git-tree-sha1 = "155132d68bc33c826dbdeb452c5d0a79e2d0e586"
932+
git-tree-sha1 = "641ba2dbd7667d1ede0e9135aa3585018581d99b"
904933
uuid = "bdcacae8-1622-11e9-2a5c-532679323890"
905-
version = "0.12.146"
934+
version = "0.12.147"
935+
936+
[[deps.MKL_jll]]
937+
deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"]
938+
git-tree-sha1 = "2ce8695e1e699b68702c03402672a69f54b8aca9"
939+
uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7"
940+
version = "2022.2.0+0"
906941

907942
[[deps.MacroTools]]
908943
deps = ["Markdown", "Random"]
@@ -1005,9 +1040,9 @@ version = "0.8.1+0"
10051040

10061041
[[deps.OpenSSL]]
10071042
deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"]
1008-
git-tree-sha1 = "df6830e37943c7aaa10023471ca47fb3065cc3c4"
1043+
git-tree-sha1 = "6503b77492fd7fcb9379bf73cd31035670e3c509"
10091044
uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c"
1010-
version = "1.3.2"
1045+
version = "1.3.3"
10111046

10121047
[[deps.OpenSSL_jll]]
10131048
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
@@ -1057,9 +1092,9 @@ version = "0.12.3"
10571092

10581093
[[deps.Parsers]]
10591094
deps = ["Dates", "SnoopPrecompile"]
1060-
git-tree-sha1 = "6466e524967496866901a78fca3f2e9ea445a559"
1095+
git-tree-sha1 = "8175fc2b118a3755113c8e68084dc1a9e63c61ee"
10611096
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
1062-
version = "2.5.2"
1097+
version = "2.5.3"
10631098

10641099
[[deps.Pipe]]
10651100
git-tree-sha1 = "6842804e7867b115ca9de748a0cf6b364523c16d"
@@ -1079,9 +1114,9 @@ version = "1.8.0"
10791114

10801115
[[deps.PkgVersion]]
10811116
deps = ["Pkg"]
1082-
git-tree-sha1 = "f6cf8e7944e50901594838951729a1861e668cb8"
1117+
git-tree-sha1 = "192aa02cc47f6566c7a1a8907dee76f6eb0a7c90"
10831118
uuid = "eebad327-c553-4316-9ea0-9fa01ccd7688"
1084-
version = "0.3.2"
1119+
version = "0.2.1"
10851120

10861121
[[deps.PlotThemes]]
10871122
deps = ["PlotUtils", "Statistics"]
@@ -1125,10 +1160,22 @@ git-tree-sha1 = "47e5f437cc0e7ef2ce8406ce1e7e24d44915f88d"
11251160
uuid = "21216c6a-2e73-6563-6e65-726566657250"
11261161
version = "1.3.0"
11271162

1163+
[[deps.PrettyTables]]
1164+
deps = ["Crayons", "Formatting", "LaTeXStrings", "Markdown", "Reexport", "StringManipulation", "Tables"]
1165+
git-tree-sha1 = "96f6db03ab535bdb901300f88335257b0018689d"
1166+
uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
1167+
version = "2.2.2"
1168+
11281169
[[deps.Printf]]
11291170
deps = ["Unicode"]
11301171
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
11311172

1173+
[[deps.ProgressBars]]
1174+
deps = ["Printf"]
1175+
git-tree-sha1 = "806ebc92e1b4b4f72192369a28dfcaf688566b2b"
1176+
uuid = "49802e3a-d2f1-5c88-81d8-b72133a6f568"
1177+
version = "1.4.1"
1178+
11321179
[[deps.Qt5Base_jll]]
11331180
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "xkbcommon_jll"]
11341181
git-tree-sha1 = "0c03844e2231e12fda4d0086fd7cbe4098ee8dc5"
@@ -1137,9 +1184,9 @@ version = "5.15.3+2"
11371184

11381185
[[deps.QuadGK]]
11391186
deps = ["DataStructures", "LinearAlgebra"]
1140-
git-tree-sha1 = "97aa253e65b784fd13e83774cadc95b38011d734"
1187+
git-tree-sha1 = "de191bc385072cc6c7ed3ffdc1caeed3f22c74d4"
11411188
uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
1142-
version = "2.6.0"
1189+
version = "2.7.0"
11431190

11441191
[[deps.Quaternions]]
11451192
deps = ["LinearAlgebra", "Random", "RealDot"]
@@ -1193,9 +1240,9 @@ version = "2.35.0"
11931240

11941241
[[deps.RecursiveFactorization]]
11951242
deps = ["LinearAlgebra", "LoopVectorization", "Polyester", "SnoopPrecompile", "StrideArraysCore", "TriangularSolve"]
1196-
git-tree-sha1 = "9f9d83b485b5f3bfd0f8cb0b8733d573bd4c388f"
1243+
git-tree-sha1 = "664aba1c5259821356f2ef771eabc502d67a8f0d"
11971244
uuid = "f2c3362d-daeb-58d1-803e-2bc74f2840b4"
1198-
version = "0.2.14"
1245+
version = "0.2.16"
11991246

12001247
[[deps.Reexport]]
12011248
git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b"
@@ -1308,10 +1355,10 @@ uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7"
13081355
version = "1.1.0"
13091356

13101357
[[deps.SimpleNonlinearSolve]]
1311-
deps = ["ArrayInterfaceCore", "FiniteDiff", "ForwardDiff", "Reexport", "SciMLBase", "SnoopPrecompile", "StaticArraysCore"]
1312-
git-tree-sha1 = "fc4b9f81a033cf6879c91bb7f5b3ff59008c7dd2"
1358+
deps = ["ArrayInterfaceCore", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "Reexport", "SciMLBase", "SnoopPrecompile", "StaticArraysCore"]
1359+
git-tree-sha1 = "61b8ffdb22453132e02a10c5638dfb42834c776b"
13131360
uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7"
1314-
version = "0.1.4"
1361+
version = "0.1.5"
13151362

13161363
[[deps.SimpleTraits]]
13171364
deps = ["InteractiveUtils", "MacroTools"]
@@ -1407,6 +1454,11 @@ git-tree-sha1 = "50ccd5ddb00d19392577902f0079267a72c5ab04"
14071454
uuid = "69024149-9ee7-55f6-a4c4-859efe599b68"
14081455
version = "0.3.5"
14091456

1457+
[[deps.StringManipulation]]
1458+
git-tree-sha1 = "46da2434b41f41ac3594ee9816ce5541c6096123"
1459+
uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e"
1460+
version = "0.3.0"
1461+
14101462
[[deps.SuiteSparse]]
14111463
deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"]
14121464
uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"
@@ -1489,6 +1541,11 @@ git-tree-sha1 = "6bac775f2d42a611cdfcd1fb217ee719630c4175"
14891541
uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775"
14901542
version = "0.1.6"
14911543

1544+
[[deps.TriplotBase]]
1545+
git-tree-sha1 = "4d4ed7f294cda19382ff7de4c137d24d16adc89b"
1546+
uuid = "981d1d27-644d-49a2-9326-4793e63143c3"
1547+
version = "0.1.0"
1548+
14921549
[[deps.URIs]]
14931550
git-tree-sha1 = "ac00576f90d8a259f2c9d823e91d1de3fd44d348"
14941551
uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"

docs/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[deps]
22
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
33
ClimaCore = "d414da3d-4745-48bb-8d80-42e94e092884"
4+
ClimaCorePlots = "cf7c7e5a-b407-4c48-9047-11a94a308626"
45
ClimaTimeSteppers = "595c0a79-7f3d-439a-bc5a-b232dc3bde79"
56
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
67
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
@@ -9,5 +10,6 @@ DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
910
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
1011
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
1112
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
13+
PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
1214
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
1315
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"

docs/src/dev/report_gen.jl

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,22 @@ include(joinpath(pkgdir(ClimaTimeSteppers), "test", "problems.jl"))
99

1010
all_subtypes(::Type{T}) where {T} = isabstracttype(T) ? vcat(all_subtypes.(subtypes(T))...) : [T]
1111

12-
@testset "IMEX Algorithm Convergence" begin
12+
let # IMEX Algorithm convergence
1313
title = "IMEX Algorithms"
1414
algorithm_names = map(T -> T(), all_subtypes(ClimaTimeSteppers.IMEXAlgorithmName))
15-
test_imex_algorithms(title, algorithm_names, ark_analytic_nonlin_test_cts(Float64), 200)
16-
test_imex_algorithms(title, algorithm_names, ark_analytic_sys_test_cts(Float64), 400)
17-
test_imex_algorithms(title, algorithm_names, ark_analytic_test_cts(Float64), 40000; super_convergence = (ARS121(),))
18-
test_imex_algorithms(
19-
title,
20-
algorithm_names,
21-
onewaycouple_mri_test_cts(Float64),
22-
10000;
23-
num_steps_scaling_factor = 5,
24-
)
25-
test_imex_algorithms(
15+
verify_convergence(title, algorithm_names, ark_analytic_nonlin_test_cts(Float64), 200)
16+
verify_convergence(title, algorithm_names, ark_analytic_sys_test_cts(Float64), 400)
17+
verify_convergence(title, algorithm_names, ark_analytic_test_cts(Float64), 40000; super_convergence = (ARS121(),))
18+
verify_convergence(title, algorithm_names, onewaycouple_mri_test_cts(Float64), 10000; num_steps_scaling_factor = 5)
19+
verify_convergence(
2620
title,
2721
algorithm_names,
2822
climacore_1Dheat_test_cts(Float64),
2923
200;
3024
num_steps_scaling_factor = 4,
3125
numerical_reference_algorithm_name = ARS343(),
3226
)
33-
test_imex_algorithms(
27+
verify_convergence(
3428
title,
3529
algorithm_names,
3630
climacore_2Dheat_test_cts(Float64),
@@ -40,7 +34,7 @@ all_subtypes(::Type{T}) where {T} = isabstracttype(T) ? vcat(all_subtypes.(subty
4034
)
4135
end
4236

43-
@testset "Unconstrained vs SSPConstrained (no limiters)" begin
37+
let # Unconstrained vs SSPConstrained results without limiters
4438
algorithm_names = map(T -> T(), all_subtypes(ClimaTimeSteppers.IMEXSSPRKAlgorithmName))
4539
for (test_case, num_steps) in (
4640
(ark_analytic_nonlin_test_cts(Float64), 200),
@@ -58,7 +52,11 @@ end
5852
reference_algorithm = IMEXAlgorithm(algorithm_name, newtons_method, Unconstrained())
5953
solution = solve(deepcopy(prob), algorithm; dt).u[end]
6054
reference_solution = solve(deepcopy(prob), reference_algorithm; dt).u[end]
61-
@test norm(solution .- reference_solution) / norm(reference_solution) < 30 * eps(Float64)
55+
if norm(solution .- reference_solution) / norm(reference_solution) > 30 * eps(Float64)
56+
alg_str = string(nameof(typeof(algorithm_name)))
57+
@warn "Unconstrained and SSPConstrained versions of $alg_str \
58+
give different results for $(test_case.test_name)"
59+
end
6260
end
6361
end
6462
end

0 commit comments

Comments
 (0)