From 6d32e4aca008c4d5905ed25fed51ba814034b0a4 Mon Sep 17 00:00:00 2001 From: sriharshakandala Date: Thu, 22 Jun 2023 10:27:39 -0700 Subject: [PATCH 1/7] Update dependencies, use ClimaComms v0.5.0 --- .dev/Manifest.toml | 4 +- Project.toml | 2 +- docs/Manifest.toml | 44 +++++++++---------- examples/Manifest.toml | 32 +++++++------- .../hybrid/box/bubble_3d_invariant_rhoe.jl | 4 +- lib/ClimaCoreTempestRemap/Project.toml | 2 +- perf/Manifest.toml | 36 +++++++-------- src/Fields/mapreduce.jl | 20 ++++----- src/Operators/finitedifference.jl | 4 +- src/Operators/spectralelement.jl | 2 +- src/Spaces/dss.jl | 38 +++++++++------- src/Spaces/pointspace.jl | 6 ++- src/Topologies/interval.jl | 2 +- src/deprecated.jl | 4 +- test/Fields/field.jl | 2 +- test/Fields/fielddiffeq.jl | 2 +- test/Fields/reduction_cuda.jl | 9 ++-- test/Hypsography/3dsphere.jl | 2 +- test/InputOutput/hybrid2dbox.jl | 2 +- test/InputOutput/hybrid2dbox_stretched.jl | 2 +- test/InputOutput/hybrid2dbox_topography.jl | 2 +- test/InputOutput/hybrid3dbox.jl | 2 +- test/InputOutput/hybrid3dcubedsphere.jl | 2 +- .../hybrid3dcubedsphere_topography.jl | 2 +- test/Operators/hybrid/3d.jl | 4 +- test/Operators/hybrid/dss_opt.jl | 2 +- test/Operators/hybrid/extruded_3dbox_cuda.jl | 6 ++- test/Operators/hybrid/extruded_sphere_cuda.jl | 6 ++- test/Operators/hybrid/opt.jl | 2 +- test/Operators/remapping.jl | 2 +- .../spectralelement/benchmark_kernels.jl | 2 +- .../spectralelement/benchmark_ops.jl | 2 +- .../spectralelement/benchmark_times.jl | 4 +- .../spectralelement/benchmark_utils.jl | 13 ++++-- test/Operators/spectralelement/diffusion2d.jl | 2 +- test/Operators/spectralelement/opt.jl | 8 +++- test/Operators/spectralelement/rectilinear.jl | 2 +- .../spectralelement/rectilinear_cuda.jl | 2 +- test/Operators/spectralelement/sphere_curl.jl | 6 ++- .../spectralelement/sphere_diffusion.jl | 2 +- .../spectralelement/sphere_diffusion_vec.jl | 6 ++- .../spectralelement/sphere_divergence.jl | 6 ++- .../spectralelement/sphere_geometry.jl | 2 +- .../spectralelement/sphere_gradient.jl | 6 ++- .../spectralelement/sphere_hyperdiffusion.jl | 2 +- .../sphere_hyperdiffusion_vec.jl | 6 ++- test/Remapping/interpolate_array.jl | 2 +- test/Spaces/ddss1_cs.jl | 3 +- test/Spaces/distributed_cuda/ddss_ne32_cs.jl | 2 +- test/Spaces/extruded_cuda.jl | 5 ++- test/Spaces/spaces.jl | 4 +- test/Topologies/cubedsphere.jl | 2 +- test/Topologies/rectangle.jl | 2 +- 53 files changed, 189 insertions(+), 151 deletions(-) diff --git a/.dev/Manifest.toml b/.dev/Manifest.toml index 28b6f23a25..e4ed271853 100644 --- a/.dev/Manifest.toml +++ b/.dev/Manifest.toml @@ -142,9 +142,9 @@ version = "1.6.0" [[deps.Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "a5aef8d4a6e8d81f171b2bd4be5265b01384c74c" +git-tree-sha1 = "5a6ab2f64388fd1175effdf73fe5933ef1e0bac0" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.5.10" +version = "2.7.0" [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] diff --git a/Project.toml b/Project.toml index 3c16d188de..16cd36dafe 100644 --- a/Project.toml +++ b/Project.toml @@ -32,8 +32,8 @@ UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" [compat] Adapt = "3" BlockArrays = "0.16" +ClimaComms = "0.5" CUDA = "3, 4.2.0" -ClimaComms = "0.4.2" CubedSphere = "0.2" DataStructures = "0.18" DiffEqBase = "6.75" diff --git a/docs/Manifest.toml b/docs/Manifest.toml index 990879d0c0..b784854212 100644 --- a/docs/Manifest.toml +++ b/docs/Manifest.toml @@ -131,9 +131,9 @@ version = "0.1.5" [[deps.BlockArrays]] deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] -git-tree-sha1 = "14d688a2254ca2242d834176a385cc9b3bceeb02" +git-tree-sha1 = "3ea044977340889bb17c49f11177ab5c7bd3abc9" uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" -version = "0.16.28" +version = "0.16.30" [[deps.Bzip2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -211,9 +211,9 @@ version = "0.1.7" [[deps.ClimaComms]] deps = ["CUDA", "MPI"] -git-tree-sha1 = "7f3f28296a39cf99cb1372a6f1fc47b0baa1c66d" +git-tree-sha1 = "483971be380aefef7d576797508c7f3159c39775" uuid = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d" -version = "0.4.2" +version = "0.5.0" [[deps.ClimaCore]] deps = ["Adapt", "BlockArrays", "CUDA", "ClimaComms", "CubedSphere", "DataStructures", "DiffEqBase", "DocStringExtensions", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "LinearAlgebra", "PkgVersion", "RecursiveArrayTools", "Requires", "RootSolvers", "Rotations", "SparseArrays", "Static", "StaticArrays", "Statistics", "UnPack"] @@ -346,9 +346,9 @@ version = "0.3.1" [[deps.CubedSphere]] deps = ["Elliptic", "FFTW", "Printf", "ProgressBars", "SpecialFunctions", "TaylorSeries", "Test"] -git-tree-sha1 = "db9c12cb765cc048e158987388287c52baddf57d" +git-tree-sha1 = "131498c78453d02b4821d8b93f6e44595399f19f" uuid = "7445602f-e544-4518-8976-18f8e8ae6cdb" -version = "0.2.2" +version = "0.2.3" [[deps.DataAPI]] git-tree-sha1 = "8da84edb865b0b5b0100c0666a9bc9a0b71c553c" @@ -533,9 +533,9 @@ uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" [[deps.FillArrays]] deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"] -git-tree-sha1 = "589d3d3bff204bdd80ecc53293896b4f39175723" +git-tree-sha1 = "e17cc4dc2d0b0b568e80d937de8ed8341822de67" uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.1.1" +version = "1.2.0" [[deps.FiniteDiff]] deps = ["ArrayInterface", "LinearAlgebra", "Requires", "Setfield", "SparseArrays", "StaticArrays"] @@ -738,9 +738,9 @@ version = "2.8.1+1" [[deps.HostCPUFeatures]] deps = ["BitTwiddlingConvenienceFunctions", "IfElse", "Libdl", "Static"] -git-tree-sha1 = "734fd90dd2f920a2f1921d5388dcebe805b262dc" +git-tree-sha1 = "d38bd0d9759e3c6cfa19bdccc314eccf8ce596cc" uuid = "3e5b6fbb-0976-4d2c-9146-d79de83f2fb0" -version = "0.1.14" +version = "0.1.15" [[deps.HypergeometricFunctions]] deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] @@ -957,9 +957,9 @@ version = "1.3.0" [[deps.Latexify]] deps = ["Formatting", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Printf", "Requires"] -git-tree-sha1 = "099e356f267354f46ba65087981a77da23a279b7" +git-tree-sha1 = "f428ae552340899a935973270b8d98e5a31c49fe" uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" -version = "0.16.0" +version = "0.16.1" [[deps.LayoutPointers]] deps = ["ArrayInterface", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface"] @@ -1070,9 +1070,9 @@ uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[deps.LinearSolve]] deps = ["ArrayInterface", "DocStringExtensions", "EnumX", "FastLapackInterface", "GPUArraysCore", "InteractiveUtils", "KLU", "Krylov", "LinearAlgebra", "PrecompileTools", "Preferences", "RecursiveFactorization", "Reexport", "Requires", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Sparspak", "SuiteSparse", "UnPack"] -git-tree-sha1 = "d829e01d7557f0c755dbb34ade286b9742734b4d" +git-tree-sha1 = "d4514497594519b3c20e93a609389fddb4ee39ab" uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" -version = "2.1.12" +version = "2.1.13" [[deps.Literate]] deps = ["Base64", "IOCapture", "JSON", "REPL"] @@ -1354,9 +1354,9 @@ version = "1.6.0" [[deps.OrdinaryDiffEq]] deps = ["ADTypes", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "ExponentialUtilities", "FastBroadcast", "FastClosures", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "IfElse", "InteractiveUtils", "LineSearches", "LinearAlgebra", "LinearSolve", "Logging", "LoopVectorization", "MacroTools", "MuladdMacro", "NLsolve", "NonlinearSolve", "Polyester", "PreallocationTools", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLNLSolve", "SciMLOperators", "SimpleNonlinearSolve", "SimpleUnPack", "SparseArrays", "SparseDiffTools", "StaticArrayInterface", "StaticArrays", "TruncatedStacktraces"] -git-tree-sha1 = "2205eff89c992bb6d21bc44feb4b26e6d20f54d4" +git-tree-sha1 = "67a072ae51be0ae71a9173f15ee7593c398b43b8" uuid = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" -version = "6.53.0" +version = "6.53.1" [[deps.PCRE2_jll]] deps = ["Artifacts", "Libdl"] @@ -1395,9 +1395,9 @@ version = "0.12.3" [[deps.Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "a5aef8d4a6e8d81f171b2bd4be5265b01384c74c" +git-tree-sha1 = "5a6ab2f64388fd1175effdf73fe5933ef1e0bac0" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.5.10" +version = "2.7.0" [[deps.Pipe]] git-tree-sha1 = "6842804e7867b115ca9de748a0cf6b364523c16d" @@ -1435,9 +1435,9 @@ version = "1.3.5" [[deps.Plots]] deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "JLFzf", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "PrecompileTools", "Preferences", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "RelocatableFolders", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "UUIDs", "UnicodeFun", "UnitfulLatexify", "Unzip"] -git-tree-sha1 = "ceb1ec8d4fbeb02f8817004837d924583707951b" +git-tree-sha1 = "75ca67b2c6512ad2d0c767a7cfc55e75075f8bbc" uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" -version = "1.38.15" +version = "1.38.16" [[deps.Polyester]] deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Requires", "Static", "StaticArrayInterface", "StrideArraysCore", "ThreadingUtilities"] @@ -1889,9 +1889,9 @@ version = "1.10.1" [[deps.TaylorSeries]] deps = ["LinearAlgebra", "Markdown", "Requires", "SparseArrays"] -git-tree-sha1 = "87baeec9ad6273ed8040a93fbbbaa039fa955f1f" +git-tree-sha1 = "c274151bde5a608bb329d76160a9344af707bfb4" uuid = "6aa5eb33-94cf-58f4-a9d0-e4b2c4fc25ea" -version = "0.12.2" +version = "0.15.1" [[deps.TempestRemap_jll]] deps = ["Artifacts", "HDF5_jll", "JLLWrappers", "Libdl", "NetCDF_jll", "OpenBLAS32_jll", "Pkg"] diff --git a/examples/Manifest.toml b/examples/Manifest.toml index b710ee7d49..f06765c173 100644 --- a/examples/Manifest.toml +++ b/examples/Manifest.toml @@ -203,9 +203,9 @@ version = "0.1.7" [[deps.ClimaComms]] deps = ["CUDA", "MPI"] -git-tree-sha1 = "7f3f28296a39cf99cb1372a6f1fc47b0baa1c66d" +git-tree-sha1 = "483971be380aefef7d576797508c7f3159c39775" uuid = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d" -version = "0.4.2" +version = "0.5.0" [[deps.ClimaCore]] deps = ["Adapt", "BlockArrays", "CUDA", "ClimaComms", "CubedSphere", "DataStructures", "DiffEqBase", "DocStringExtensions", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "LinearAlgebra", "PkgVersion", "RecursiveArrayTools", "Requires", "RootSolvers", "Rotations", "SparseArrays", "Static", "StaticArrays", "Statistics", "UnPack"] @@ -233,9 +233,9 @@ version = "0.7.2" [[deps.ClimaTimeSteppers]] deps = ["CUDA", "ClimaComms", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "KernelAbstractions", "Krylov", "LinearAlgebra", "LinearOperators", "SciMLBase", "StaticArrays"] -git-tree-sha1 = "fe71c83dbffc6178b51c280728953d92914d441c" +git-tree-sha1 = "54b602435b0107b6c2dfe7664e0f7ff5fc78fb91" uuid = "595c0a79-7f3d-439a-bc5a-b232dc3bde79" -version = "0.7.6" +version = "0.7.7" [[deps.CloseOpenIntervals]] deps = ["ArrayInterface", "Static"] @@ -336,9 +336,9 @@ version = "0.3.1" [[deps.CubedSphere]] deps = ["Elliptic", "FFTW", "Printf", "ProgressBars", "SpecialFunctions", "TaylorSeries", "Test"] -git-tree-sha1 = "db9c12cb765cc048e158987388287c52baddf57d" +git-tree-sha1 = "131498c78453d02b4821d8b93f6e44595399f19f" uuid = "7445602f-e544-4518-8976-18f8e8ae6cdb" -version = "0.2.2" +version = "0.2.3" [[deps.DEDataArrays]] deps = ["ArrayInterface", "DocStringExtensions", "LinearAlgebra", "RecursiveArrayTools", "SciMLBase", "StaticArrays"] @@ -687,9 +687,9 @@ version = "2.8.1+1" [[deps.HostCPUFeatures]] deps = ["BitTwiddlingConvenienceFunctions", "IfElse", "Libdl", "Static"] -git-tree-sha1 = "734fd90dd2f920a2f1921d5388dcebe805b262dc" +git-tree-sha1 = "d38bd0d9759e3c6cfa19bdccc314eccf8ce596cc" uuid = "3e5b6fbb-0976-4d2c-9146-d79de83f2fb0" -version = "0.1.14" +version = "0.1.15" [[deps.HypergeometricFunctions]] deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] @@ -853,9 +853,9 @@ version = "1.9.0" [[deps.Latexify]] deps = ["Formatting", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Printf", "Requires"] -git-tree-sha1 = "099e356f267354f46ba65087981a77da23a279b7" +git-tree-sha1 = "f428ae552340899a935973270b8d98e5a31c49fe" uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" -version = "0.16.0" +version = "0.16.1" [[deps.LayoutPointers]] deps = ["ArrayInterface", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static"] @@ -1241,9 +1241,9 @@ version = "0.12.3" [[deps.Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "a5aef8d4a6e8d81f171b2bd4be5265b01384c74c" +git-tree-sha1 = "5a6ab2f64388fd1175effdf73fe5933ef1e0bac0" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.5.10" +version = "2.7.0" [[deps.Pipe]] git-tree-sha1 = "6842804e7867b115ca9de748a0cf6b364523c16d" @@ -1281,9 +1281,9 @@ version = "1.3.5" [[deps.Plots]] deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "JLFzf", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "PrecompileTools", "Preferences", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "RelocatableFolders", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "UUIDs", "UnicodeFun", "UnitfulLatexify", "Unzip"] -git-tree-sha1 = "ceb1ec8d4fbeb02f8817004837d924583707951b" +git-tree-sha1 = "75ca67b2c6512ad2d0c767a7cfc55e75075f8bbc" uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" -version = "1.38.15" +version = "1.38.16" [[deps.Polyester]] deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Requires", "Static", "StrideArraysCore", "ThreadingUtilities"] @@ -1625,9 +1625,9 @@ version = "1.10.1" [[deps.TaylorSeries]] deps = ["LinearAlgebra", "Markdown", "Requires", "SparseArrays"] -git-tree-sha1 = "87baeec9ad6273ed8040a93fbbbaa039fa955f1f" +git-tree-sha1 = "c274151bde5a608bb329d76160a9344af707bfb4" uuid = "6aa5eb33-94cf-58f4-a9d0-e4b2c4fc25ea" -version = "0.12.2" +version = "0.15.1" [[deps.TempestRemap_jll]] deps = ["Artifacts", "HDF5_jll", "JLLWrappers", "Libdl", "NetCDF_jll", "OpenBLAS32_jll", "Pkg"] diff --git a/examples/hybrid/box/bubble_3d_invariant_rhoe.jl b/examples/hybrid/box/bubble_3d_invariant_rhoe.jl index 90cb0922f8..eccf924951 100644 --- a/examples/hybrid/box/bubble_3d_invariant_rhoe.jl +++ b/examples/hybrid/box/bubble_3d_invariant_rhoe.jl @@ -525,7 +525,9 @@ function bubble_3d_invariant_ρe(ARGS, comms_ctx, ::Type{FT}) where {FT} cpu_hv_center_space, cpu_hv_face_space, cpu_horztopology = hvspace_3D( sim_params, - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext( + ClimaComms.CPUSingleThreaded(), + ), ) plotfield = ones(cpu_hv_center_space) diff --git a/lib/ClimaCoreTempestRemap/Project.toml b/lib/ClimaCoreTempestRemap/Project.toml index ee6dca01ce..365dd79676 100644 --- a/lib/ClimaCoreTempestRemap/Project.toml +++ b/lib/ClimaCoreTempestRemap/Project.toml @@ -14,7 +14,7 @@ TempestRemap_jll = "8573a8c5-1df0-515e-a024-abad257ee284" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] -ClimaComms = "0.4.2" +ClimaComms = "0.5" ClimaCore = "0.10.25" NCDatasets = "0.11, 0.12" PkgVersion = "0.1, 0.2" diff --git a/perf/Manifest.toml b/perf/Manifest.toml index a4aed99ed3..db2dacd6a7 100644 --- a/perf/Manifest.toml +++ b/perf/Manifest.toml @@ -121,9 +121,9 @@ uuid = "ffab5731-97b5-5995-9138-79e8c1846df0" version = "0.11.10" [[deps.BufferedStreams]] -git-tree-sha1 = "bb065b14d7f941b8617bc323063dbe79f55d16ea" +git-tree-sha1 = "5bcb75a2979e40b29eb250cb26daab67aa8f97f5" uuid = "e1450e63-4bb3-523b-b2a4-4ffa8c0fd77d" -version = "1.1.0" +version = "1.2.0" [[deps.Bzip2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -198,9 +198,9 @@ version = "0.1.7" [[deps.ClimaComms]] deps = ["CUDA", "MPI"] -git-tree-sha1 = "7f3f28296a39cf99cb1372a6f1fc47b0baa1c66d" +git-tree-sha1 = "483971be380aefef7d576797508c7f3159c39775" uuid = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d" -version = "0.4.2" +version = "0.5.0" [[deps.ClimaCore]] deps = ["Adapt", "BlockArrays", "CUDA", "ClimaComms", "CubedSphere", "DataStructures", "DiffEqBase", "DocStringExtensions", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "LinearAlgebra", "PkgVersion", "RecursiveArrayTools", "Requires", "RootSolvers", "Rotations", "SparseArrays", "Static", "StaticArrays", "Statistics", "UnPack"] @@ -228,9 +228,9 @@ version = "0.7.2" [[deps.ClimaTimeSteppers]] deps = ["CUDA", "ClimaComms", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "KernelAbstractions", "Krylov", "LinearAlgebra", "LinearOperators", "SciMLBase", "StaticArrays"] -git-tree-sha1 = "fe71c83dbffc6178b51c280728953d92914d441c" +git-tree-sha1 = "54b602435b0107b6c2dfe7664e0f7ff5fc78fb91" uuid = "595c0a79-7f3d-439a-bc5a-b232dc3bde79" -version = "0.7.6" +version = "0.7.7" [[deps.CloseOpenIntervals]] deps = ["ArrayInterface", "Static"] @@ -354,9 +354,9 @@ version = "2.9.1" [[deps.CubedSphere]] deps = ["Elliptic", "FFTW", "Printf", "ProgressBars", "SpecialFunctions", "TaylorSeries", "Test"] -git-tree-sha1 = "db9c12cb765cc048e158987388287c52baddf57d" +git-tree-sha1 = "131498c78453d02b4821d8b93f6e44595399f19f" uuid = "7445602f-e544-4518-8976-18f8e8ae6cdb" -version = "0.2.2" +version = "0.2.3" [[deps.DEDataArrays]] deps = ["ArrayInterface", "DocStringExtensions", "LinearAlgebra", "RecursiveArrayTools", "SciMLBase", "StaticArrays"] @@ -723,9 +723,9 @@ version = "2.8.1+1" [[deps.HostCPUFeatures]] deps = ["BitTwiddlingConvenienceFunctions", "IfElse", "Libdl", "Static"] -git-tree-sha1 = "734fd90dd2f920a2f1921d5388dcebe805b262dc" +git-tree-sha1 = "d38bd0d9759e3c6cfa19bdccc314eccf8ce596cc" uuid = "3e5b6fbb-0976-4d2c-9146-d79de83f2fb0" -version = "0.1.14" +version = "0.1.15" [[deps.HypergeometricFunctions]] deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] @@ -1306,9 +1306,9 @@ version = "0.12.3" [[deps.Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "a5aef8d4a6e8d81f171b2bd4be5265b01384c74c" +git-tree-sha1 = "5a6ab2f64388fd1175effdf73fe5933ef1e0bac0" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.5.10" +version = "2.7.0" [[deps.Pipe]] git-tree-sha1 = "6842804e7867b115ca9de748a0cf6b364523c16d" @@ -1346,9 +1346,9 @@ version = "1.3.5" [[deps.Plots]] deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "JLFzf", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "PrecompileTools", "Preferences", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "RelocatableFolders", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "UUIDs", "UnicodeFun", "UnitfulLatexify", "Unzip"] -git-tree-sha1 = "ceb1ec8d4fbeb02f8817004837d924583707951b" +git-tree-sha1 = "75ca67b2c6512ad2d0c767a7cfc55e75075f8bbc" uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" -version = "1.38.15" +version = "1.38.16" [[deps.Polyester]] deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Requires", "Static", "StrideArraysCore", "ThreadingUtilities"] @@ -1420,9 +1420,9 @@ version = "1.7.2" [[deps.ProtoBuf]] deps = ["BufferedStreams", "Dates", "EnumX", "TOML", "TranscodingStreams"] -git-tree-sha1 = "aa61ac7a223640e255e8f02388aa5f18230e28f2" +git-tree-sha1 = "e957b28fc98ecd13da4f2bdc7e121832e5d18e3e" uuid = "3349acd9-ac6a-5e09-bcdb-63829b23a429" -version = "1.0.9" +version = "1.0.11" [[deps.Qt5Base_jll]] 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"] @@ -1741,9 +1741,9 @@ version = "1.10.1" [[deps.TaylorSeries]] deps = ["LinearAlgebra", "Markdown", "Requires", "SparseArrays"] -git-tree-sha1 = "87baeec9ad6273ed8040a93fbbbaa039fa955f1f" +git-tree-sha1 = "c274151bde5a608bb329d76160a9344af707bfb4" uuid = "6aa5eb33-94cf-58f4-a9d0-e4b2c4fc25ea" -version = "0.12.2" +version = "0.15.1" [[deps.TempestRemap_jll]] deps = ["Artifacts", "HDF5_jll", "JLLWrappers", "Libdl", "NetCDF_jll", "OpenBLAS32_jll", "Pkg"] diff --git a/src/Fields/mapreduce.jl b/src/Fields/mapreduce.jl index 1b9b058399..a824ee7b24 100644 --- a/src/Fields/mapreduce.jl +++ b/src/Fields/mapreduce.jl @@ -10,7 +10,7 @@ See [`sum`](@ref) for the integral over the full domain. """ local_sum( field::Union{Field, Base.Broadcast.Broadcasted{<:FieldStyle}}, - ::ClimaComms.CPUDevice, + ::ClimaComms.AbstractCPUDevice, ) = Base.reduce( RecursiveApply.radd, Base.Broadcast.broadcasted( @@ -41,14 +41,14 @@ If `v` is a distributed field, this uses a `ClimaComms.allreduce` operation. """ function Base.sum( field::Union{Field, Base.Broadcast.Broadcasted{<:FieldStyle}}, - ::ClimaComms.CPUDevice, + ::ClimaComms.AbstractCPUDevice, ) context = ClimaComms.context(axes(field)) data_sum = DataLayouts.DataF(local_sum(field)) ClimaComms.allreduce!(context, parent(data_sum), +) return data_sum[] end -Base.sum(fn, field::Field, ::ClimaComms.CPUDevice) = +Base.sum(fn, field::Field, ::ClimaComms.AbstractCPUDevice) = Base.sum(Base.Broadcast.broadcasted(fn, field)) Base.sum(field::Union{Field, Base.Broadcast.Broadcasted{<:FieldStyle}}) = Base.sum(field, ClimaComms.device(axes(field))) @@ -61,25 +61,25 @@ Approximate maximum of `v` or `f.(v)` over the domain. If `v` is a distributed field, this uses a `ClimaComms.allreduce` operation. """ -function Base.maximum(fn, field::Field, ::ClimaComms.CPUDevice) +function Base.maximum(fn, field::Field, ::ClimaComms.AbstractCPUDevice) context = ClimaComms.context(axes(field)) data_max = DataLayouts.DataF(mapreduce(fn, max, todata(field))) ClimaComms.allreduce!(context, parent(data_max), max) return data_max[] end -Base.maximum(field::Field, device::ClimaComms.CPUDevice) = +Base.maximum(field::Field, device::ClimaComms.AbstractCPUDevice) = maximum(identity, field, device) Base.maximum(fn, field::Field) = Base.maximum(fn, field, ClimaComms.device(field)) Base.maximum(field::Field) = Base.maximum(field, ClimaComms.device(field)) -function Base.minimum(fn, field::Field, ::ClimaComms.CPUDevice) +function Base.minimum(fn, field::Field, ::ClimaComms.AbstractCPUDevice) context = ClimaComms.context(axes(field)) data_min = DataLayouts.DataF(mapreduce(fn, min, todata(field))) ClimaComms.allreduce!(context, parent(data_min), min) return data_min[] end -Base.minimum(field::Field, device::ClimaComms.CPUDevice) = +Base.minimum(field::Field, device::ClimaComms.AbstractCPUDevice) = minimum(identity, field, device) Base.minimum(fn, field::Field) = Base.minimum(fn, field, ClimaComms.device(field)) @@ -106,7 +106,7 @@ If `v` is a distributed field, this uses a `ClimaComms.allreduce` operation. """ function Statistics.mean( field::Union{Field, Base.Broadcast.Broadcasted{<:FieldStyle}}, - ::ClimaComms.CPUDevice, + ::ClimaComms.AbstractCPUDevice, ) space = axes(field) context = ClimaComms.context(space) @@ -116,7 +116,7 @@ function Statistics.mean( sum_v, area_v = data_combined[] RecursiveApply.rdiv(sum_v, area_v) end -Statistics.mean(fn, field::Field, ::ClimaComms.CPUDevice) = +Statistics.mean(fn, field::Field, ::ClimaComms.AbstractCPUDevice) = Statistics.mean(Base.Broadcast.broadcasted(fn, field)) Statistics.mean(field::Union{Field, Base.Broadcast.Broadcasted{<:FieldStyle}}) = @@ -157,7 +157,7 @@ the power of ``1/p``. """ function LinearAlgebra.norm( field::Field, - ::ClimaComms.CPUDevice, + ::ClimaComms.AbstractCPUDevice, p::Real = 2; normalize = true, ) diff --git a/src/Operators/finitedifference.jl b/src/Operators/finitedifference.jl index bf30f6f851..74bbf41323 100644 --- a/src/Operators/finitedifference.jl +++ b/src/Operators/finitedifference.jl @@ -216,8 +216,8 @@ struct StencilStyle <: AbstractStencilStyle end struct ColumnStencilStyle <: AbstractStencilStyle end struct CUDAColumnStencilStyle <: AbstractStencilStyle end -AbstractStencilStyle(::ClimaComms.CPU) = ColumnStencilStyle -AbstractStencilStyle(::ClimaComms.CUDA) = CUDAColumnStencilStyle +AbstractStencilStyle(::ClimaComms.AbstractCPUDevice) = ColumnStencilStyle +AbstractStencilStyle(::ClimaComms.CUDADevice) = CUDAColumnStencilStyle """ StencilBroadcasted{Style}(op, args[,axes[, work]]) diff --git a/src/Operators/spectralelement.jl b/src/Operators/spectralelement.jl index 5af4673ee3..aad2f26f0a 100644 --- a/src/Operators/spectralelement.jl +++ b/src/Operators/spectralelement.jl @@ -25,7 +25,7 @@ struct CUDASpectralStyle <: AbstractSpectralStyle end import ClimaComms -AbstractSpectralStyle(::ClimaComms.CPUDevice) = SlabBlockSpectralStyle +AbstractSpectralStyle(::ClimaComms.AbstractCPUDevice) = SlabBlockSpectralStyle AbstractSpectralStyle(::ClimaComms.CUDADevice) = CUDASpectralStyle diff --git a/src/Spaces/dss.jl b/src/Spaces/dss.jl index b5df5db645..2bda64b5c8 100644 --- a/src/Spaces/dss.jl +++ b/src/Spaces/dss.jl @@ -566,7 +566,7 @@ end """ function dss_transform!( - ::ClimaComms.CPUDevice, + ::ClimaComms.AbstractCPUDevice, perimeter_data::DataLayouts.VIFH, data::Union{DataLayouts.IJFH, DataLayouts.VIJFH}, ∂ξ∂x::Union{DataLayouts.IJFH, DataLayouts.VIJFH}, @@ -596,7 +596,7 @@ Arguments: Part of [`Spaces.weighted_dss!`](@ref). """ function dss_transform!( - ::ClimaComms.CPUDevice, + ::ClimaComms.AbstractCPUDevice, perimeter_data::DataLayouts.VIFH, data::Union{DataLayouts.VIJFH, DataLayouts.IJFH}, ∂ξ∂x::Union{DataLayouts.VIJFH, DataLayouts.IJFH}, @@ -669,7 +669,7 @@ function dss_transform!( end """ function dss_untransform!( - ::ClimaComms.CPUDevice, + ::ClimaComms.AbstractCPUDevice, perimeter_data::DataLayouts.VIFH, data::Union{DataLayouts.IJFH, DataLayouts.VIJFH}, ∂ξ∂x::Union{DataLayouts.VIJFH, DataLayouts.IJFH}, @@ -697,7 +697,7 @@ Part of [`Spaces.weighted_dss!`](@ref). """ function dss_untransform!( - ::ClimaComms.CPUDevice, + ::ClimaComms.AbstractCPUDevice, perimeter_data::DataLayouts.VIFH, data::Union{DataLayouts.VIJFH, DataLayouts.IJFH}, ∂ξ∂x::Union{DataLayouts.VIJFH, DataLayouts.IJFH}, @@ -763,7 +763,7 @@ function dss_untransform!( end function dss_load_perimeter_data!( - ::ClimaComms.CPUDevice, + ::ClimaComms.AbstractCPUDevice, dss_buffer::DSSBuffer, data::Union{DataLayouts.IJFH, DataLayouts.VIJFH}, perimeter::Perimeter2D{Nq}, @@ -782,7 +782,7 @@ function dss_load_perimeter_data!( end function dss_unload_perimeter_data!( - ::ClimaComms.CPUDevice, + ::ClimaComms.AbstractCPUDevice, data::Union{DataLayouts.IJFH, DataLayouts.VIJFH}, dss_buffer::DSSBuffer, perimeter::Perimeter2D{Nq}, @@ -802,7 +802,7 @@ end """ function dss_local!( - ::ClimaComms.CPUDevice, + ::ClimaComms.AbstractCPUDevice, perimeter_data::DataLayouts.VIFH, perimeter::AbstractPerimeter, topology::Topologies.AbstractTopology, @@ -813,7 +813,7 @@ Performs DSS on local vertices and faces. Part of [`Spaces.weighted_dss!`](@ref). """ function dss_local!( - ::ClimaComms.CPUDevice, + ::ClimaComms.AbstractCPUDevice, perimeter_data::DataLayouts.VIFH, perimeter::Perimeter2D, topology::Topologies.Topology2D, @@ -879,7 +879,7 @@ function dss_local_faces!( end """ function dss_local_ghost!( - ::ClimaComms.CPUDevice, + ::ClimaComms.AbstractCPUDevice, perimeter_data::DataLayouts.VIFH, perimeter::AbstractPerimeter, topology::Topologies.AbstractTopology, @@ -892,7 +892,7 @@ vertices of a unique ghost vertex and stores the value in each of the local vert Part of [`Spaces.weighted_dss!`](@ref). """ function dss_local_ghost!( - ::ClimaComms.CPUDevice, + ::ClimaComms.AbstractCPUDevice, perimeter_data::DataLayouts.VIFH, perimeter::AbstractPerimeter, topology::Topologies.AbstractTopology, @@ -934,7 +934,7 @@ function dss_local_ghost!( end """ dss_ghost!( - device::ClimaComms.CPUDevice, + device::ClimaComms.AbstractCPUDevice, perimeter_data::DataLayouts.VIFH, perimeter::AbstractPerimeter, topology::Topologies.AbstractTopology, @@ -946,7 +946,7 @@ the representative ghost vertex. Part of [`Spaces.weighted_dss!`](@ref). """ function dss_ghost!( - device::ClimaComms.CPUDevice, + device::ClimaComms.AbstractCPUDevice, perimeter_data::DataLayouts.VIFH, perimeter::AbstractPerimeter, topology::Topologies.AbstractTopology, @@ -979,14 +979,17 @@ function dss_ghost!( end """ - fill_send_buffer!(::ClimaComms.CPUDevice, dss_buffer::DSSBuffer) + fill_send_buffer!(::ClimaComms.AbstractCPUDevice, dss_buffer::DSSBuffer) Loads the send buffer from `perimeter_data`. For unique ghost vertices, only data from the representative vertices which store result of "ghost local" DSS are loaded. Part of [`Spaces.weighted_dss!`](@ref). """ -function fill_send_buffer!(::ClimaComms.CPUDevice, dss_buffer::DSSBuffer) +function fill_send_buffer!( + ::ClimaComms.AbstractCPUDevice, + dss_buffer::DSSBuffer, +) (; perimeter_data, send_buf_idx, send_data) = dss_buffer (Np, _, _, Nv, nelems) = size(perimeter_data) Nf = cld(length(parent(perimeter_data)), (Nv * Np * nelems)) @@ -1004,7 +1007,7 @@ function fill_send_buffer!(::ClimaComms.CPUDevice, dss_buffer::DSSBuffer) return nothing end """ - load_from_recv_buffer!(::ClimaComms.CPUDevice, dss_buffer::DSSBuffer) + load_from_recv_buffer!(::ClimaComms.AbstractCPUDevice, dss_buffer::DSSBuffer) Adds data from the recv buffer to the corresponding location in `perimeter_data`. For ghost vertices, this data is added only to the representative vertices. The values are @@ -1012,7 +1015,10 @@ then scattered to other local vertices corresponding to each unique ghost vertex Part of [`Spaces.weighted_dss!`](@ref). """ -function load_from_recv_buffer!(::ClimaComms.CPUDevice, dss_buffer::DSSBuffer) +function load_from_recv_buffer!( + ::ClimaComms.AbstractCPUDevice, + dss_buffer::DSSBuffer, +) (; perimeter_data, recv_buf_idx, recv_data) = dss_buffer (Np, _, _, Nv, nelems) = size(perimeter_data) Nf = cld(length(parent(perimeter_data)), (Nv * Np * nelems)) diff --git a/src/Spaces/pointspace.jl b/src/Spaces/pointspace.jl index 20bf64fec1..d68ab4e13c 100644 --- a/src/Spaces/pointspace.jl +++ b/src/Spaces/pointspace.jl @@ -16,8 +16,10 @@ end ClimaComms.device(space::PointSpace) = ClimaComms.device(space.context) ClimaComms.context(space::PointSpace) = space.context -PointSpace(x::Geometry.LocalGeometry) = PointSpace(ClimaComms.CPUDevice(), x) -PointSpace(x::Geometry.AbstractPoint) = PointSpace(ClimaComms.CPUDevice(), x) +PointSpace(x::Geometry.LocalGeometry) = + PointSpace(ClimaComms.CPUSingleThreaded(), x) +PointSpace(x::Geometry.AbstractPoint) = + PointSpace(ClimaComms.CPUSingleThreaded(), x) function PointSpace(device::ClimaComms.AbstractDevice, x) context = ClimaComms.SingletonCommsContext(device) diff --git a/src/Topologies/interval.jl b/src/Topologies/interval.jl index 56b459a527..0575ed6f34 100644 --- a/src/Topologies/interval.jl +++ b/src/Topologies/interval.jl @@ -43,7 +43,7 @@ function IntervalTopology( IntervalTopology(context, mesh, boundaries) end IntervalTopology(mesh::Meshes.IntervalMesh) = IntervalTopology( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()), mesh, ) diff --git a/src/deprecated.jl b/src/deprecated.jl index 41926cb768..28182d2b47 100644 --- a/src/deprecated.jl +++ b/src/deprecated.jl @@ -4,12 +4,12 @@ using ClimaComms using CUDA Base.@deprecate device(; disablegpu = false) if disablegpu - ClimaComms.CPUDevice() + ClimaComms.CPUSingleThreaded() else ClimaComms.device() end false -Base.@deprecate device_array_type(ctx::ClimaComms.CPUDevice) ClimaComms.array_type( +Base.@deprecate device_array_type(ctx::ClimaComms.AbstractCPUDevice) ClimaComms.array_type( ctx, ) false Base.@deprecate device_array_type(ctx::ClimaComms.CUDADevice) ClimaComms.array_type( diff --git a/test/Fields/field.jl b/test/Fields/field.jl index a18ccb24dd..9600e16312 100644 --- a/test/Fields/field.jl +++ b/test/Fields/field.jl @@ -355,7 +355,7 @@ end @test field isa Fields.PointField @test Fields.field_values(field)[] == coord - if ClimaComms.device(context) isa ClimaComms.CPUDevice + if ClimaComms.device(context) isa ClimaComms.AbstractCPUDevice @test sum(field.x) == FT(π) elseif ClimaComms.device(context) isa ClimaComms.CUDADevice # Not yet supported diff --git a/test/Fields/fielddiffeq.jl b/test/Fields/fielddiffeq.jl index 45f586941b..d016e4ebc0 100644 --- a/test/Fields/fielddiffeq.jl +++ b/test/Fields/fielddiffeq.jl @@ -19,7 +19,7 @@ using LinearAlgebra, IntervalSets Nq = 4 mesh = Meshes.RectilinearMesh(domain, n1, n2) grid_topology = Topologies.Topology2D( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()), mesh, ) quad = Spaces.Quadratures.GLL{Nq}() diff --git a/test/Fields/reduction_cuda.jl b/test/Fields/reduction_cuda.jl index 4870b6eef7..0c34076df4 100644 --- a/test/Fields/reduction_cuda.jl +++ b/test/Fields/reduction_cuda.jl @@ -19,7 +19,8 @@ include("reduction_cuda_utils.jl") @testset "test cuda reduction op on surface of sphere" begin FT = Float64 context = ClimaComms.SingletonCommsContext(ClimaComms.CUDADevice()) - context_cpu = ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()) # CPU context for comparison + context_cpu = + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()) # CPU context for comparison # Set up discretization ne = 72 @@ -87,7 +88,8 @@ end @testset "test cuda reduction op for extruded 3D domain (hollow sphere)" begin FT = Float64 context = ClimaComms.SingletonCommsContext(ClimaComms.CUDADevice()) - context_cpu = ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()) # CPU context for comparison + context_cpu = + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()) # CPU context for comparison R = FT(6.371229e6) npoly = 4 @@ -188,7 +190,8 @@ end @testset "test cuda reduction op for single column" begin FT = Float64 context = ClimaComms.SingletonCommsContext(ClimaComms.CUDADevice()) - context_cpu = ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()) # CPU context for comparison + context_cpu = + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()) # CPU context for comparison z0 = FT(0) z_max = FT(2 * π) diff --git a/test/Hypsography/3dsphere.jl b/test/Hypsography/3dsphere.jl index 06e96f8e07..d7d0edce90 100644 --- a/test/Hypsography/3dsphere.jl +++ b/test/Hypsography/3dsphere.jl @@ -30,7 +30,7 @@ vert_center_space = Spaces.CenterFiniteDifferenceSpace(vertmesh) horzdomain = Domains.SphereDomain(6e6) horzmesh = Meshes.EquiangularCubedSphere(horzdomain, 12) horztopology = Topologies.Topology2D( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()), horzmesh, ) quad = Spaces.Quadratures.GLL{4 + 1}() diff --git a/test/InputOutput/hybrid2dbox.jl b/test/InputOutput/hybrid2dbox.jl index 9cfb98b7a9..8562d0efcd 100644 --- a/test/InputOutput/hybrid2dbox.jl +++ b/test/InputOutput/hybrid2dbox.jl @@ -24,7 +24,7 @@ function hvspace_2D( npoly = 4, ) FT = Float64 - context = ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()) + context = ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()) vertdomain = Domains.IntervalDomain( Geometry.ZPoint{FT}(zlim[1]), Geometry.ZPoint{FT}(zlim[2]); diff --git a/test/InputOutput/hybrid2dbox_stretched.jl b/test/InputOutput/hybrid2dbox_stretched.jl index b00ffc6e30..08aba1ca0f 100644 --- a/test/InputOutput/hybrid2dbox_stretched.jl +++ b/test/InputOutput/hybrid2dbox_stretched.jl @@ -25,7 +25,7 @@ function hvspace_2D( npoly = 4, ) FT = Float64 - context = ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()) + context = ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()) vertdomain = Domains.IntervalDomain( Geometry.ZPoint{FT}(zlim[1]), Geometry.ZPoint{FT}(zlim[2]); diff --git a/test/InputOutput/hybrid2dbox_topography.jl b/test/InputOutput/hybrid2dbox_topography.jl index d0c635976c..b172091aeb 100644 --- a/test/InputOutput/hybrid2dbox_topography.jl +++ b/test/InputOutput/hybrid2dbox_topography.jl @@ -25,7 +25,7 @@ function hvspace_2D( npoly = 4, ) FT = Float64 - context = ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()) + context = ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()) vertdomain = Domains.IntervalDomain( Geometry.ZPoint{FT}(zlim[1]), Geometry.ZPoint{FT}(zlim[2]); diff --git a/test/InputOutput/hybrid3dbox.jl b/test/InputOutput/hybrid3dbox.jl index 62f336c15b..3e92e997e3 100644 --- a/test/InputOutput/hybrid3dbox.jl +++ b/test/InputOutput/hybrid3dbox.jl @@ -45,7 +45,7 @@ function hvspace_3D( Nf_center, Nf_face = 2, 1 #1 + 3 + 1 quad = Spaces.Quadratures.GLL{npoly + 1}() horzmesh = Meshes.RectilinearMesh(horzdomain, xelem, yelem) - context = ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()) + context = ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()) horztopology = Topologies.Topology2D(context, horzmesh) horzspace = Spaces.SpectralElementSpace2D(horztopology, quad) diff --git a/test/InputOutput/hybrid3dcubedsphere.jl b/test/InputOutput/hybrid3dcubedsphere.jl index 60a9a53001..1a3b4edf37 100644 --- a/test/InputOutput/hybrid3dcubedsphere.jl +++ b/test/InputOutput/hybrid3dcubedsphere.jl @@ -11,7 +11,7 @@ using ClimaCore: InputOutput using ClimaComms -const comms_ctx = ClimaComms.context(ClimaComms.CPUDevice()) +const comms_ctx = ClimaComms.context(ClimaComms.CPUSingleThreaded()) pid, nprocs = ClimaComms.init(comms_ctx) filename = ClimaComms.bcast(comms_ctx, tempname(pwd())) if ClimaComms.iamroot(comms_ctx) diff --git a/test/InputOutput/hybrid3dcubedsphere_topography.jl b/test/InputOutput/hybrid3dcubedsphere_topography.jl index 9225214b9c..a03eba871a 100644 --- a/test/InputOutput/hybrid3dcubedsphere_topography.jl +++ b/test/InputOutput/hybrid3dcubedsphere_topography.jl @@ -12,7 +12,7 @@ using ClimaCore: InputOutput using ClimaComms -const comms_ctx = ClimaComms.context(ClimaComms.CPUDevice()) +const comms_ctx = ClimaComms.context(ClimaComms.CPUSingleThreaded()) pid, nprocs = ClimaComms.init(comms_ctx) filename = ClimaComms.bcast(comms_ctx, tempname(pwd())) if ClimaComms.iamroot(comms_ctx) diff --git a/test/Operators/hybrid/3d.jl b/test/Operators/hybrid/3d.jl index 47acd1107b..5dc04f29b6 100644 --- a/test/Operators/hybrid/3d.jl +++ b/test/Operators/hybrid/3d.jl @@ -31,7 +31,7 @@ import ClimaCore.DataLayouts: level horzdomain = Domains.SphereDomain(30.0) horzmesh = Meshes.EquiangularCubedSphere(horzdomain, 4) horztopology = Topologies.Topology2D( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()), horzmesh, ) quad = Spaces.Quadratures.GLL{3 + 1}() @@ -72,7 +72,7 @@ function hvspace_3D( ) horzmesh = Meshes.RectilinearMesh(horzdomain, xelem, yelem) horztopology = Topologies.Topology2D( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()), horzmesh, ) diff --git a/test/Operators/hybrid/dss_opt.jl b/test/Operators/hybrid/dss_opt.jl index 9c5b25790c..c183bae59d 100644 --- a/test/Operators/hybrid/dss_opt.jl +++ b/test/Operators/hybrid/dss_opt.jl @@ -32,7 +32,7 @@ vert_center_space = Spaces.CenterFiniteDifferenceSpace(vertmesh) horzdomain = Domains.SphereDomain(30.0) horzmesh = Meshes.EquiangularCubedSphere(horzdomain, 4) horztopology = Topologies.Topology2D( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()), horzmesh, ) quad = Spaces.Quadratures.GLL{5}() diff --git a/test/Operators/hybrid/extruded_3dbox_cuda.jl b/test/Operators/hybrid/extruded_3dbox_cuda.jl index d3177ed5ec..09861503f0 100644 --- a/test/Operators/hybrid/extruded_3dbox_cuda.jl +++ b/test/Operators/hybrid/extruded_3dbox_cuda.jl @@ -45,7 +45,8 @@ function get_space(context) end @testset "GPU extruded 3d hybrid box strong grad, div and curl" begin - cpu_context = ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()) + cpu_context = + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()) gpu_context = ClimaComms.SingletonCommsContext(ClimaComms.CUDADevice()) device = ClimaComms.device() #ClimaComms.CUDADevice() println("running test on $device device") @@ -105,7 +106,8 @@ end end @testset "GPU extruded 3d hybrid box weak grad, div, curl and wdiv(grad)" begin - cpu_context = ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()) + cpu_context = + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()) gpu_context = ClimaComms.SingletonCommsContext(ClimaComms.CUDADevice()) device = ClimaComms.device() #ClimaComms.CUDADevice() println("running test on $device device") diff --git a/test/Operators/hybrid/extruded_sphere_cuda.jl b/test/Operators/hybrid/extruded_sphere_cuda.jl index 0dec456e8c..ffb1e8102f 100644 --- a/test/Operators/hybrid/extruded_sphere_cuda.jl +++ b/test/Operators/hybrid/extruded_sphere_cuda.jl @@ -41,7 +41,8 @@ function get_space(context) end @testset "GPU extruded sphere strong grad, div and curl" begin - cpu_context = ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()) + cpu_context = + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()) gpu_context = ClimaComms.SingletonCommsContext(ClimaComms.CUDADevice()) device = ClimaComms.device() #ClimaComms.CUDADevice() println("running test on $device device") @@ -90,7 +91,8 @@ end end @testset "GPU extruded sphere weak grad, div, curl, and wdiv(grad)" begin - cpu_context = ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()) + cpu_context = + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()) gpu_context = ClimaComms.SingletonCommsContext(ClimaComms.CUDADevice()) device = ClimaComms.device() #ClimaComms.CUDADevice() println("running test on $device device") diff --git a/test/Operators/hybrid/opt.jl b/test/Operators/hybrid/opt.jl index 93c33e7c56..253fe4925e 100644 --- a/test/Operators/hybrid/opt.jl +++ b/test/Operators/hybrid/opt.jl @@ -227,7 +227,7 @@ function hspace2d(FT) quad = Spaces.Quadratures.GLL{Nq}() hmesh = Meshes.RectilinearMesh(hdomain, 3, 3) htopology = Topologies.Topology2D( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()), hmesh, ) return Spaces.SpectralElementSpace2D(htopology, quad) diff --git a/test/Operators/remapping.jl b/test/Operators/remapping.jl index de5538a31a..880040565f 100644 --- a/test/Operators/remapping.jl +++ b/test/Operators/remapping.jl @@ -27,7 +27,7 @@ function make_space( nq == 1 ? (quad = Quadratures.GL{1}()) : (quad = Quadratures.GLL{nq}()) mesh = Meshes.RectilinearMesh(domain, nxelems, nyelems) topology = Topologies.Topology2D( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()), mesh, ) space = Spaces.SpectralElementSpace2D(topology, quad) diff --git a/test/Operators/spectralelement/benchmark_kernels.jl b/test/Operators/spectralelement/benchmark_kernels.jl index 5f58c116d8..f117447408 100644 --- a/test/Operators/spectralelement/benchmark_kernels.jl +++ b/test/Operators/spectralelement/benchmark_kernels.jl @@ -22,7 +22,7 @@ order of magnitude estimate per problem size. ##### copyto! kernel_copyto!(args) = kernel_copyto!(args, args.device) -kernel_copyto!(args, ::ClimaComms.CPUDevice) = +kernel_copyto!(args, ::ClimaComms.AbstractCPUDevice) = Base.copyto!(args.ϕ_arr, args.ψ_arr) function kernel_copyto!(args, ::ClimaComms.CUDADevice) (; ϕ_arr, ψ_arr) = args diff --git a/test/Operators/spectralelement/benchmark_ops.jl b/test/Operators/spectralelement/benchmark_ops.jl index f11469dd22..afc2dbd0f3 100644 --- a/test/Operators/spectralelement/benchmark_ops.jl +++ b/test/Operators/spectralelement/benchmark_ops.jl @@ -123,7 +123,7 @@ using JET kernel_complicated_field_dss!(kernel_args) # compile+test works kernel_complicated_field2_dss!(kernel_args) # compile+test works # TODO: widen these tests to the GPU. - if kernel_args.device isa ClimaComms.CPUDevice + if kernel_args.device isa ClimaComms.AbstractCPUDevice # Allocation tests p = @allocated kernel_scalar_dss!(kernel_args) @test p == 0 diff --git a/test/Operators/spectralelement/benchmark_times.jl b/test/Operators/spectralelement/benchmark_times.jl index 7391d96e78..b4288f208a 100644 --- a/test/Operators/spectralelement/benchmark_times.jl +++ b/test/Operators/spectralelement/benchmark_times.jl @@ -2,9 +2,9 @@ function get_best_times((; device, float_type)) # To prevent regressions, we test against best times (in nanoseconds). best_times = Dict() best_times[(:CUDADevice, :Float64)] = get_best_times_gpu_float64() - best_times[(:CPUDevice, :Float64)] = get_best_times_cpu_float64() + best_times[(:CPUSingleThreaded, :Float64)] = get_best_times_cpu_float64() best_times[(:CUDADevice, :Float32)] = get_best_times_gpu_float32() - best_times[(:CPUDevice, :Float32)] = get_best_times_cpu_float32() + best_times[(:CPUSingleThreaded, :Float32)] = get_best_times_cpu_float32() return best_times[(nameof(typeof(device)), nameof(float_type))] end diff --git a/test/Operators/spectralelement/benchmark_utils.jl b/test/Operators/spectralelement/benchmark_utils.jl index 58fa5df090..d1c6a9017c 100644 --- a/test/Operators/spectralelement/benchmark_utils.jl +++ b/test/Operators/spectralelement/benchmark_utils.jl @@ -25,7 +25,7 @@ using BenchmarkTools function benchmark_kernel_array!( args, kernel_fun!, - device::ClimaComms.CPUDevice; + device::ClimaComms.AbstractCPUDevice; silent = true, ) (; ϕ_arr, ψ_arr) = args @@ -69,7 +69,12 @@ function benchmark_kernel_array!( return trial end -function benchmark_kernel!(args, kernel_fun!, ::ClimaComms.CPUDevice; silent) +function benchmark_kernel!( + args, + kernel_fun!, + ::ClimaComms.AbstractCPUDevice; + silent, +) kernel_fun!(args) # compile first trial = BenchmarkTools.@benchmark $kernel_fun!($args) if !silent @@ -168,7 +173,7 @@ function setup_kernel_args(ARGS::Vector{String} = ARGS) device = args["device"] == "CUDA" ? ClimaComms.CUDADevice() : - args["device"] == "CPU" ? ClimaComms.CPUDevice() : + args["device"] == "CPU" ? ClimaComms.CPUSingleThreaded() : error("Unknown device: $(args["device"])") context = @@ -258,7 +263,7 @@ function setup_kernel_args(ARGS::Vector{String} = ARGS) f = @. Geometry.Contravariant3Vector(Geometry.WVector(ϕ)) s = size(parent(ϕ)) - array_kernel_args = if device isa ClimaComms.CPUDevice + array_kernel_args = if device isa ClimaComms.AbstractCPUDevice (; ϕ_arr = fill(FT(1), s), ψ_arr = fill(FT(2), s)) else device isa ClimaComms.CUDADevice diff --git a/test/Operators/spectralelement/diffusion2d.jl b/test/Operators/spectralelement/diffusion2d.jl index e9ff2659e3..601cd76b31 100644 --- a/test/Operators/spectralelement/diffusion2d.jl +++ b/test/Operators/spectralelement/diffusion2d.jl @@ -26,7 +26,7 @@ using OrdinaryDiffEq mesh = Meshes.RectilinearMesh(domain, 10, 10) grid_topology = Topologies.Topology2D( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()), mesh, ) diff --git a/test/Operators/spectralelement/opt.jl b/test/Operators/spectralelement/opt.jl index b4a3fa8220..cff2977628 100644 --- a/test/Operators/spectralelement/opt.jl +++ b/test/Operators/spectralelement/opt.jl @@ -139,7 +139,9 @@ end mesh = Meshes.RectilinearMesh(domain, 3, 3) topology = Topologies.Topology2D( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext( + ClimaComms.CPUSingleThreaded(), + ), mesh, ) space = Spaces.SpectralElementSpace2D(topology, quad) @@ -196,7 +198,9 @@ end horzdomain = Domains.RectangleDomain(xdomain, ydomain) horzmesh = Meshes.RectilinearMesh(horzdomain, xelem, yelem) horztopology = Topologies.Topology2D( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext( + ClimaComms.CPUSingleThreaded(), + ), horzmesh, ) diff --git a/test/Operators/spectralelement/rectilinear.jl b/test/Operators/spectralelement/rectilinear.jl index 56fd3df17f..dc2c9b028d 100644 --- a/test/Operators/spectralelement/rectilinear.jl +++ b/test/Operators/spectralelement/rectilinear.jl @@ -16,7 +16,7 @@ domain = Domains.RectangleDomain( Nq = 5 quad = Spaces.Quadratures.GLL{Nq}() -device = ClimaComms.CPUDevice() +device = ClimaComms.CPUSingleThreaded() grid_mesh = Meshes.RectilinearMesh(domain, 17, 16) grid_topology = Topologies.Topology2D(ClimaComms.SingletonCommsContext(device), grid_mesh) diff --git a/test/Operators/spectralelement/rectilinear_cuda.jl b/test/Operators/spectralelement/rectilinear_cuda.jl index 0d64413fab..1de296a85c 100644 --- a/test/Operators/spectralelement/rectilinear_cuda.jl +++ b/test/Operators/spectralelement/rectilinear_cuda.jl @@ -21,7 +21,7 @@ grid_mesh = Meshes.RectilinearMesh(domain, 17, 16) grid_topology_cpu = Topologies.Topology2D( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()), grid_mesh, ) grid_space_cpu = Spaces.SpectralElementSpace2D(grid_topology_cpu, quad) diff --git a/test/Operators/spectralelement/sphere_curl.jl b/test/Operators/spectralelement/sphere_curl.jl index 3a8dbad88c..a18a9b5542 100644 --- a/test/Operators/spectralelement/sphere_curl.jl +++ b/test/Operators/spectralelement/sphere_curl.jl @@ -20,7 +20,7 @@ wcurl = Operators.WeakCurl() mesh = Meshes.EquiangularCubedSphere(domain, Ne) grid_topology = Topologies.Topology2D( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()), mesh, ) @@ -76,7 +76,9 @@ convergence_rate(err, Δh) = for (Ie, Ne) in enumerate(Nes) mesh = Meshes.EquiangularCubedSphere(domain, Ne) grid_topology = Topologies.Topology2D( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext( + ClimaComms.CPUSingleThreaded(), + ), mesh, ) diff --git a/test/Operators/spectralelement/sphere_diffusion.jl b/test/Operators/spectralelement/sphere_diffusion.jl index 19fb2390a7..304d4aae29 100644 --- a/test/Operators/spectralelement/sphere_diffusion.jl +++ b/test/Operators/spectralelement/sphere_diffusion.jl @@ -24,7 +24,7 @@ using StaticArrays, IntervalSets, LinearAlgebra domain = Domains.SphereDomain(R) mesh = Meshes.EquiangularCubedSphere(domain, ne) grid_topology = Topologies.Topology2D( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()), mesh, ) quad = Spaces.Quadratures.GLL{Nq}() diff --git a/test/Operators/spectralelement/sphere_diffusion_vec.jl b/test/Operators/spectralelement/sphere_diffusion_vec.jl index 08de31afa7..dcaeae5306 100644 --- a/test/Operators/spectralelement/sphere_diffusion_vec.jl +++ b/test/Operators/spectralelement/sphere_diffusion_vec.jl @@ -36,7 +36,7 @@ end domain = Domains.SphereDomain(radius) mesh = Meshes.EquiangularCubedSphere(domain, Ne) grid_topology = Topologies.Topology2D( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()), mesh, ) @@ -82,7 +82,9 @@ convergence_rate(err, Δh) = for (Ie, Ne) in enumerate(Nes) mesh = Meshes.EquiangularCubedSphere(domain, Ne) grid_topology = Topologies.Topology2D( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext( + ClimaComms.CPUSingleThreaded(), + ), mesh, ) diff --git a/test/Operators/spectralelement/sphere_divergence.jl b/test/Operators/spectralelement/sphere_divergence.jl index affb52929c..352fe5c840 100644 --- a/test/Operators/spectralelement/sphere_divergence.jl +++ b/test/Operators/spectralelement/sphere_divergence.jl @@ -20,7 +20,7 @@ wdiv = Operators.WeakDivergence() mesh = Meshes.EquiangularCubedSphere(domain, Ne) grid_topology = Topologies.Topology2D( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()), mesh, ) @@ -72,7 +72,9 @@ convergence_rate(err, Δh) = for (Ie, Ne) in enumerate(Nes) mesh = Meshes.EquiangularCubedSphere(domain, Ne) grid_topology = Topologies.Topology2D( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext( + ClimaComms.CPUSingleThreaded(), + ), mesh, ) diff --git a/test/Operators/spectralelement/sphere_geometry.jl b/test/Operators/spectralelement/sphere_geometry.jl index 9b13d50ef0..d4c9de8332 100644 --- a/test/Operators/spectralelement/sphere_geometry.jl +++ b/test/Operators/spectralelement/sphere_geometry.jl @@ -28,7 +28,7 @@ end domain = Domains.SphereDomain(radius) mesh = Meshes.EquiangularCubedSphere(domain, Ne) grid_topology = Topologies.Topology2D( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()), mesh, ) quad = Spaces.Quadratures.GLL{Nq}() diff --git a/test/Operators/spectralelement/sphere_gradient.jl b/test/Operators/spectralelement/sphere_gradient.jl index b2dbf43917..af9db9052c 100644 --- a/test/Operators/spectralelement/sphere_gradient.jl +++ b/test/Operators/spectralelement/sphere_gradient.jl @@ -20,7 +20,7 @@ wgrad = Operators.WeakGradient() mesh = Meshes.EquiangularCubedSphere(domain, Ne) grid_topology = Topologies.Topology2D( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()), mesh, ) @@ -71,7 +71,9 @@ convergence_rate(err, Δh) = for (Ie, Ne) in enumerate(Nes) mesh = Meshes.EquiangularCubedSphere(domain, Ne) grid_topology = Topologies.Topology2D( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext( + ClimaComms.CPUSingleThreaded(), + ), mesh, ) diff --git a/test/Operators/spectralelement/sphere_hyperdiffusion.jl b/test/Operators/spectralelement/sphere_hyperdiffusion.jl index 7ab6640972..1985977f88 100644 --- a/test/Operators/spectralelement/sphere_hyperdiffusion.jl +++ b/test/Operators/spectralelement/sphere_hyperdiffusion.jl @@ -25,7 +25,7 @@ include("sphere_sphericalharmonics.jl") Ne = 16 mesh = Meshes.EquiangularCubedSphere(domain, Ne) grid_topology = Topologies.Topology2D( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()), mesh, ) diff --git a/test/Operators/spectralelement/sphere_hyperdiffusion_vec.jl b/test/Operators/spectralelement/sphere_hyperdiffusion_vec.jl index 40afcc1677..ea91a173ca 100644 --- a/test/Operators/spectralelement/sphere_hyperdiffusion_vec.jl +++ b/test/Operators/spectralelement/sphere_hyperdiffusion_vec.jl @@ -42,7 +42,7 @@ end domain = Domains.SphereDomain(radius) mesh = Meshes.EquiangularCubedSphere(domain, Ne) grid_topology = Topologies.Topology2D( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()), mesh, ) @@ -88,7 +88,9 @@ convergence_rate(err, Δh) = for (Ie, Ne) in enumerate(Nes) mesh = Meshes.EquiangularCubedSphere(domain, Ne) grid_topology = Topologies.Topology2D( - ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()), + ClimaComms.SingletonCommsContext( + ClimaComms.CPUSingleThreaded(), + ), mesh, ) diff --git a/test/Remapping/interpolate_array.jl b/test/Remapping/interpolate_array.jl index 583e42cb76..0dd8398eaa 100644 --- a/test/Remapping/interpolate_array.jl +++ b/test/Remapping/interpolate_array.jl @@ -5,7 +5,7 @@ using ClimaCore: using IntervalSets using Test -device = ClimaComms.CPUDevice() +device = ClimaComms.CPUSingleThreaded() @testset "2D extruded" begin vertdomain = Domains.IntervalDomain( diff --git a/test/Spaces/ddss1_cs.jl b/test/Spaces/ddss1_cs.jl index f6e2e795ac..b1f6f3011e 100644 --- a/test/Spaces/ddss1_cs.jl +++ b/test/Spaces/ddss1_cs.jl @@ -13,7 +13,8 @@ import ClimaCore: @testset "DSS on Equiangular Cubed Sphere mesh (ne = 3, serial run)" begin device = ClimaComms.device() #ClimaComms.CUDADevice() context = ClimaComms.SingletonCommsContext(device) - context_cpu = ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()) + context_cpu = + ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()) println("running test on $device device") diff --git a/test/Spaces/distributed_cuda/ddss_ne32_cs.jl b/test/Spaces/distributed_cuda/ddss_ne32_cs.jl index a9789229b8..57f9037445 100644 --- a/test/Spaces/distributed_cuda/ddss_ne32_cs.jl +++ b/test/Spaces/distributed_cuda/ddss_ne32_cs.jl @@ -14,7 +14,7 @@ import ClimaCore: @testset "DSS on Equiangular Cubed Sphere mesh (ne = 32)" begin device = ClimaComms.device() #ClimaComms.CUDADevice() context_cuda = ClimaComms.MPICommsContext(device) - context_cpu = ClimaComms.MPICommsContext(ClimaComms.CPUDevice()) + context_cpu = ClimaComms.MPICommsContext(ClimaComms.CPUSingleThreaded()) pid_cuda, nprocs_cuda = ClimaComms.init(context_cuda) pid_cpu, nprocs_cpu = ClimaComms.init(context_cpu) diff --git a/test/Spaces/extruded_cuda.jl b/test/Spaces/extruded_cuda.jl index 038c4b738a..fde2cb1e38 100644 --- a/test/Spaces/extruded_cuda.jl +++ b/test/Spaces/extruded_cuda.jl @@ -21,7 +21,8 @@ compare(cpu, gpu, sym) = @testset "CuArray-backed extruded spaces" begin context = SingletonCommsContext( - CUDA.functional() ? ClimaComms.CUDADevice() : ClimaComms.CPUDevice(), + CUDA.functional() ? ClimaComms.CUDADevice() : + ClimaComms.CPUSingleThreaded(), ) collect(TU.all_spaces(Float64; zelem = 10, context)) # make sure we can construct spaces as = collect(TU.all_spaces(Float64; zelem = 10, context)) @@ -29,7 +30,7 @@ compare(cpu, gpu, sym) = end @testset "copyto! with CuArray-backed extruded spaces" begin - cpu_context = SingletonCommsContext(ClimaComms.CPUDevice()) + cpu_context = SingletonCommsContext(ClimaComms.CPUSingleThreaded()) gpu_context = SingletonCommsContext(ClimaComms.CUDADevice()) FT = Float64 diff --git a/test/Spaces/spaces.jl b/test/Spaces/spaces.jl index e7b73e2641..1ef252fffe 100644 --- a/test/Spaces/spaces.jl +++ b/test/Spaces/spaces.jl @@ -93,7 +93,7 @@ end @testset "finite difference space" begin FT = Float64 - context = ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()) + context = ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()) domain = Domains.IntervalDomain( Geometry.ZPoint{FT}(0) .. Geometry.ZPoint{FT}(5), boundary_names = (:bottom, :top), @@ -140,7 +140,7 @@ end @testset "1×1 domain space" begin FT = Float32 - context = ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()) + context = ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()) domain = Domains.RectangleDomain( Geometry.XPoint{FT}(-3) .. Geometry.XPoint{FT}(5), Geometry.YPoint{FT}(-2) .. Geometry.YPoint{FT}(8), diff --git a/test/Topologies/cubedsphere.jl b/test/Topologies/cubedsphere.jl index 0ee36b98ea..46ba619179 100644 --- a/test/Topologies/cubedsphere.jl +++ b/test/Topologies/cubedsphere.jl @@ -2,7 +2,7 @@ using ClimaComms using ClimaCore: Geometry, Domains, Meshes, Topologies using Test -const context = ClimaComms.SingletonCommsContext(ClimaComms.CPUDevice()) +const context = ClimaComms.SingletonCommsContext(ClimaComms.CPUSingleThreaded()) @testset "neighboring element tests" begin @testset "1 element across each panel" begin diff --git a/test/Topologies/rectangle.jl b/test/Topologies/rectangle.jl index 58aef48384..6918c925f2 100644 --- a/test/Topologies/rectangle.jl +++ b/test/Topologies/rectangle.jl @@ -24,7 +24,7 @@ function rectangular_grid( x2boundary = x2periodic ? nothing : (:south, :north), ) mesh = Meshes.RectilinearMesh(domain, n1, n2) - device = ClimaComms.CPUDevice() + device = ClimaComms.CPUSingleThreaded() return Topologies.Topology2D(ClimaComms.SingletonCommsContext(device), mesh) end From 4ac735e665eb11a16285dae2cb291216e32bc764 Mon Sep 17 00:00:00 2001 From: Charles Kawczynski Date: Thu, 22 Jun 2023 13:37:18 -0700 Subject: [PATCH 2/7] Update dependencies --- .dev/Manifest.toml | 4 +- docs/Manifest.toml | 138 ++++++++++++++++++++--------------------- examples/Manifest.toml | 102 ++++++++++++++---------------- perf/Manifest.toml | 110 ++++++++++++++++---------------- 4 files changed, 168 insertions(+), 186 deletions(-) diff --git a/.dev/Manifest.toml b/.dev/Manifest.toml index e4ed271853..06f106e493 100644 --- a/.dev/Manifest.toml +++ b/.dev/Manifest.toml @@ -142,9 +142,9 @@ version = "1.6.0" [[deps.Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "5a6ab2f64388fd1175effdf73fe5933ef1e0bac0" +git-tree-sha1 = "4b2e829ee66d4218e0cef22c0a64ee37cf258c29" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.7.0" +version = "2.7.1" [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] diff --git a/docs/Manifest.toml b/docs/Manifest.toml index b784854212..574c2c2747 100644 --- a/docs/Manifest.toml +++ b/docs/Manifest.toml @@ -49,9 +49,9 @@ version = "0.2.0" [[deps.ArrayInterface]] deps = ["Adapt", "LinearAlgebra", "Requires", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "d3f758863a47ceef2248d136657cb9c033603641" +git-tree-sha1 = "f83ec24f76d4c8f525099b2ac475fc098138ec31" uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "7.4.8" +version = "7.4.11" [[deps.ArrayInterfaceCore]] deps = ["LinearAlgebra", "SnoopPrecompile", "SparseArrays", "SuiteSparse"] @@ -61,9 +61,9 @@ version = "0.1.29" [[deps.ArrayLayouts]] deps = ["FillArrays", "LinearAlgebra", "SparseArrays"] -git-tree-sha1 = "8826f66b370c91648a4351062427ba5391ccf953" +git-tree-sha1 = "1d9e98721e71dcf4db5a7d34f55d8aa07c43468f" uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" -version = "1.0.5" +version = "1.0.6" [[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" @@ -131,9 +131,9 @@ version = "0.1.5" [[deps.BlockArrays]] deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] -git-tree-sha1 = "3ea044977340889bb17c49f11177ab5c7bd3abc9" +git-tree-sha1 = "0ecda033ef5b33c70787407ff5e4f939269b8b36" uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" -version = "0.16.30" +version = "0.16.32" [[deps.Bzip2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -216,10 +216,10 @@ uuid = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d" version = "0.5.0" [[deps.ClimaCore]] -deps = ["Adapt", "BlockArrays", "CUDA", "ClimaComms", "CubedSphere", "DataStructures", "DiffEqBase", "DocStringExtensions", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "LinearAlgebra", "PkgVersion", "RecursiveArrayTools", "Requires", "RootSolvers", "Rotations", "SparseArrays", "Static", "StaticArrays", "Statistics", "UnPack"] +deps = ["Adapt", "BlockArrays", "CUDA", "ClimaComms", "CubedSphere", "DataStructures", "DiffEqBase", "DocStringExtensions", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "LinearAlgebra", "PkgVersion", "RecursiveArrayTools", "Requires", "RootSolvers", "SparseArrays", "Static", "StaticArrays", "Statistics", "UnPack"] path = ".." uuid = "d414da3d-4745-48bb-8d80-42e94e092884" -version = "0.10.39" +version = "0.10.41" [[deps.ClimaCoreMakie]] deps = ["ClimaCore", "Makie"] @@ -243,7 +243,7 @@ version = "0.1.0" deps = ["ClimaComms", "ClimaCore", "Dates", "LinearAlgebra", "NCDatasets", "PkgVersion", "TempestRemap_jll", "Test"] path = "../lib/ClimaCoreTempestRemap" uuid = "d934ef94-cdd4-4710-83d6-720549644b70" -version = "0.3.8" +version = "0.3.9" [[deps.ClimaCoreVTK]] deps = ["ClimaCore", "WriteVTK"] @@ -295,9 +295,9 @@ version = "0.12.10" [[deps.CommonDataModel]] deps = ["CFTime", "DataStructures", "Dates", "Preferences", "Printf"] -git-tree-sha1 = "0404085d3518fc3c8ef0cb32858f6185aa9d8dff" +git-tree-sha1 = "2678b3fc170d582655a14d22867b031b6e43c2d4" uuid = "1fbeeb36-5f17-413c-809b-666fb144f157" -version = "0.2.3" +version = "0.2.4" [[deps.CommonSolve]] git-tree-sha1 = "0eee5eb66b1cf62cd6ad1b460238e60e4b09400c" @@ -410,9 +410,9 @@ uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" [[deps.Distributions]] deps = ["ChainRulesCore", "DensityInterface", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns", "Test"] -git-tree-sha1 = "c72970914c8a21b36bbc244e9df0ed1834a0360b" +git-tree-sha1 = "4ed4a6df2548a72f66e03f3a285cd1f3b573035d" uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" -version = "0.25.95" +version = "0.25.96" [[deps.DocStringExtensions]] deps = ["LibGit2"] @@ -459,11 +459,17 @@ git-tree-sha1 = "bdb1942cd4c45e3c678fd11569d5cccd80976237" uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" version = "1.0.4" +[[deps.ExceptionUnwrapping]] +deps = ["Test"] +git-tree-sha1 = "e90caa41f5a86296e014e148ee061bd6c3edec96" +uuid = "460bff9d-24e4-43bc-9d9f-a8973cb893f4" +version = "0.1.9" + [[deps.Expat_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "bad72f730e9e91c08d9427d5e8db95478a3c323d" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "4558ab818dcceaab612d1bb8c19cee87eda2b83c" uuid = "2e619515-83b5-522b-bb60-26c02a35a201" -version = "2.4.8+0" +version = "2.5.0+0" [[deps.ExponentialUtilities]] deps = ["Adapt", "ArrayInterface", "GPUArraysCore", "GenericSchur", "LinearAlgebra", "Printf", "SnoopPrecompile", "SparseArrays", "libblastrampoline_jll"] @@ -495,9 +501,9 @@ version = "4.4.2+2" [[deps.FFTW]] deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"] -git-tree-sha1 = "06bf20fcecd258eccf9a6ef7b99856a4dfe7b64c" +git-tree-sha1 = "b4fbdd20c889804969571cc589900803edda16b7" uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" -version = "1.7.0" +version = "1.7.1" [[deps.FFTW_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -614,9 +620,9 @@ version = "3.3.8+0" [[deps.GPUArrays]] deps = ["Adapt", "GPUArraysCore", "LLVM", "LinearAlgebra", "Printf", "Random", "Reexport", "Serialization", "Statistics"] -git-tree-sha1 = "a3351bc577a6b49297248aadc23a4add1097c2ac" +git-tree-sha1 = "745847e65e72a475716952f0a8a7258d42338ce9" uuid = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7" -version = "8.7.1" +version = "8.8.0" [[deps.GPUArraysCore]] deps = ["Adapt"] @@ -725,10 +731,10 @@ uuid = "0234f1f7-429e-5d53-9886-15a909be8d59" version = "1.12.2+2" [[deps.HTTP]] -deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] -git-tree-sha1 = "5e77dbf117412d4f164a464d610ee6050cc75272" +deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] +git-tree-sha1 = "2613d054b0e18a3dea99ca1594e9a3960e025da4" uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" -version = "1.9.6" +version = "1.9.7" [[deps.HarfBuzz_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] @@ -898,9 +904,9 @@ version = "0.4.0" [[deps.KernelAbstractions]] deps = ["Adapt", "Atomix", "InteractiveUtils", "LinearAlgebra", "MacroTools", "PrecompileTools", "SparseArrays", "StaticArrays", "UUIDs", "UnsafeAtomics", "UnsafeAtomicsLLVM"] -git-tree-sha1 = "47be64f040a7ece575c2b5f53ca6da7b548d69f4" +git-tree-sha1 = "b48617c5d764908b5fac493cd907cf33cc11eec1" uuid = "63c18a36-062a-441e-b654-da1e3ab1ce7c" -version = "0.9.4" +version = "0.9.6" [[deps.KernelDensity]] deps = ["Distributions", "DocStringExtensions", "FFTW", "Interpolations", "StatsBase"] @@ -1041,10 +1047,10 @@ uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" version = "2.35.0+0" [[deps.Libtiff_jll]] -deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "Pkg", "Zlib_jll", "Zstd_jll"] -git-tree-sha1 = "3eb79b0ca5764d4799c06699573fd8f533259713" +deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "XZ_jll", "Zlib_jll", "Zstd_jll"] +git-tree-sha1 = "2da088d113af58221c52828a80378e16be7d037a" uuid = "89763e89-9b03-5906-acba-b20f662cd828" -version = "4.4.0+0" +version = "4.5.1+1" [[deps.Libuuid_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -1070,9 +1076,9 @@ uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[deps.LinearSolve]] deps = ["ArrayInterface", "DocStringExtensions", "EnumX", "FastLapackInterface", "GPUArraysCore", "InteractiveUtils", "KLU", "Krylov", "LinearAlgebra", "PrecompileTools", "Preferences", "RecursiveFactorization", "Reexport", "Requires", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Sparspak", "SuiteSparse", "UnPack"] -git-tree-sha1 = "d4514497594519b3c20e93a609389fddb4ee39ab" +git-tree-sha1 = "c6a6f78167d7b7c19dfb7148161d7f1962a0b361" uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" -version = "2.1.13" +version = "2.2.1" [[deps.Literate]] deps = ["Base64", "IOCapture", "JSON", "REPL"] @@ -1097,15 +1103,15 @@ version = "1.0.0" [[deps.LoopVectorization]] deps = ["ArrayInterface", "ArrayInterfaceCore", "CPUSummary", "ChainRulesCore", "CloseOpenIntervals", "DocStringExtensions", "ForwardDiff", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "PrecompileTools", "SIMDTypes", "SLEEFPirates", "SpecialFunctions", "Static", "StaticArrayInterface", "ThreadingUtilities", "UnPack", "VectorizationBase"] -git-tree-sha1 = "3bb62b5003bc7d2d49f26663484267dc49fa1bf5" +git-tree-sha1 = "cdd207c26d86952949f1ac65b21baf078cc1937a" uuid = "bdcacae8-1622-11e9-2a5c-532679323890" -version = "0.12.159" +version = "0.12.161" [[deps.MKL_jll]] deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] -git-tree-sha1 = "2ce8695e1e699b68702c03402672a69f54b8aca9" +git-tree-sha1 = "154d7aaa82d24db6d8f7e4ffcfe596f40bff214b" uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" -version = "2022.2.0+0" +version = "2023.1.0+0" [[deps.MPI]] deps = ["Distributed", "DocStringExtensions", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "PrecompileTools", "Requires", "Serialization", "Sockets"] @@ -1115,9 +1121,9 @@ version = "0.20.10" [[deps.MPICH_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] -git-tree-sha1 = "d790fbd913f85e8865c55bf4725aff197c5155c8" +git-tree-sha1 = "8a5b4d2220377d1ece13f49438d71ad20cf1ba83" uuid = "7cb0a576-ebde-5e09-9194-50597f1243b4" -version = "4.1.1+1" +version = "4.1.2+0" [[deps.MPIPreferences]] deps = ["Libdl", "Preferences"] @@ -1127,9 +1133,9 @@ version = "0.1.8" [[deps.MPItrampoline_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] -git-tree-sha1 = "b3dcf8e1c610a10458df3c62038c8cc3a4d6291d" +git-tree-sha1 = "6979eccb6a9edbbb62681e158443e79ecc0d056a" uuid = "f1f71cc9-e9ae-5b93-9b94-4fe0e1ad3748" -version = "5.3.0+0" +version = "5.3.1+0" [[deps.MacroTools]] deps = ["Markdown", "Random"] @@ -1228,9 +1234,9 @@ version = "0.2.4" [[deps.NCDatasets]] deps = ["CFTime", "CommonDataModel", "DataStructures", "Dates", "NetCDF_jll", "NetworkOptions", "Printf"] -git-tree-sha1 = "e201ed836f4486d0a5f593e68b7621b2e24237c5" +git-tree-sha1 = "4263c4220f22e20729329838bf7e94a49d1ac32f" uuid = "85f8d34a-cbdd-5861-8df4-14fed0d494ab" -version = "0.12.16" +version = "0.12.17" [[deps.NLSolversBase]] deps = ["DiffResults", "Distributed", "FiniteDiff", "ForwardDiff"] @@ -1354,9 +1360,9 @@ version = "1.6.0" [[deps.OrdinaryDiffEq]] deps = ["ADTypes", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "ExponentialUtilities", "FastBroadcast", "FastClosures", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "IfElse", "InteractiveUtils", "LineSearches", "LinearAlgebra", "LinearSolve", "Logging", "LoopVectorization", "MacroTools", "MuladdMacro", "NLsolve", "NonlinearSolve", "Polyester", "PreallocationTools", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLNLSolve", "SciMLOperators", "SimpleNonlinearSolve", "SimpleUnPack", "SparseArrays", "SparseDiffTools", "StaticArrayInterface", "StaticArrays", "TruncatedStacktraces"] -git-tree-sha1 = "67a072ae51be0ae71a9173f15ee7593c398b43b8" +git-tree-sha1 = "2aa75defe3eb7fcb0d914c0f7df907dbb8d63d3d" uuid = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" -version = "6.53.1" +version = "6.53.2" [[deps.PCRE2_jll]] deps = ["Artifacts", "Libdl"] @@ -1395,9 +1401,9 @@ version = "0.12.3" [[deps.Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "5a6ab2f64388fd1175effdf73fe5933ef1e0bac0" +git-tree-sha1 = "4b2e829ee66d4218e0cef22c0a64ee37cf258c29" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.7.0" +version = "2.7.1" [[deps.Pipe]] git-tree-sha1 = "6842804e7867b115ca9de748a0cf6b364523c16d" @@ -1520,12 +1526,6 @@ git-tree-sha1 = "6ec7ac8412e83d57e313393220879ede1740f9ee" uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" version = "2.8.2" -[[deps.Quaternions]] -deps = ["LinearAlgebra", "Random", "RealDot"] -git-tree-sha1 = "da095158bdc8eaccb7890f9884048555ab771019" -uuid = "94ee1d12-ae83-5a48-8b1c-48b8ff168ae0" -version = "0.7.4" - [[deps.REPL]] deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" @@ -1557,12 +1557,6 @@ git-tree-sha1 = "1342a47bf3260ee108163042310d26f2be5ec90b" uuid = "c84ed2f1-dad5-54f0-aa8e-dbefe2724439" version = "0.4.5" -[[deps.RealDot]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" -uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" -version = "0.1.0" - [[deps.RecipesBase]] deps = ["PrecompileTools"] git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" @@ -1622,12 +1616,6 @@ git-tree-sha1 = "9fb3462240d2898be5d4acf8925e47f70ec64d07" uuid = "7181ea78-2dcb-4de3-ab41-2b8ab5a31e74" version = "0.3.5" -[[deps.Rotations]] -deps = ["LinearAlgebra", "Quaternions", "Random", "StaticArrays"] -git-tree-sha1 = "54ccb4dbab4b1f69beb255a2c0ca5f65a9c82f08" -uuid = "6038ab10-8711-5258-84ad-4b1120ba62dc" -version = "1.5.1" - [[deps.RuntimeGeneratedFunctions]] deps = ["ExprTools", "SHA", "Serialization"] git-tree-sha1 = "237edc1563bbf078629b4f8d194bd334e97907cf" @@ -1663,15 +1651,15 @@ version = "0.3.3" [[deps.SciMLBase]] deps = ["ADTypes", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables", "TruncatedStacktraces"] -git-tree-sha1 = "ddf57a23d610d30d0c4bd01132f4646a2a77d171" +git-tree-sha1 = "a22a12db91f6a921e28a7ae39a9546eed93fd92e" uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -version = "1.92.5" +version = "1.93.0" [[deps.SciMLNLSolve]] deps = ["DiffEqBase", "LineSearches", "NLsolve", "Reexport", "SciMLBase"] -git-tree-sha1 = "2d00015fa0a190220dc5605406b85073f6634391" +git-tree-sha1 = "9dfc8e9e3d58c0c74f1a821c762b5349da13eccf" uuid = "e9a6253c-8580-4d32-9898-8661bb511710" -version = "0.1.7" +version = "0.1.8" [[deps.SciMLOperators]] deps = ["ArrayInterface", "DocStringExtensions", "Lazy", "LinearAlgebra", "Setfield", "SparseArrays", "StaticArraysCore", "Tricks"] @@ -1717,9 +1705,9 @@ version = "1.1.0" [[deps.SimpleNonlinearSolve]] deps = ["ArrayInterface", "DiffEqBase", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "PrecompileTools", "Reexport", "Requires", "SciMLBase", "StaticArraysCore"] -git-tree-sha1 = "7c55a3e65aad4ce6e610409cdd564b8d590b9726" +git-tree-sha1 = "56aa73a93cdca493af5155a0338a864ed314222b" uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7" -version = "0.1.15" +version = "0.1.16" [[deps.SimpleTraits]] deps = ["InteractiveUtils", "MacroTools"] @@ -1749,9 +1737,9 @@ uuid = "6462fe0b-24de-5631-8697-dd941f90decc" [[deps.SortingAlgorithms]] deps = ["DataStructures"] -git-tree-sha1 = "a4ada03f999bd01b3a25dcaa30b2d929fe537e00" +git-tree-sha1 = "c60ec5c62180f27efea3ba2908480f8055e17cee" uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" -version = "1.1.0" +version = "1.1.1" [[deps.SparseArrays]] deps = ["LinearAlgebra", "Random"] @@ -1759,9 +1747,9 @@ uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" [[deps.SparseDiffTools]] deps = ["ADTypes", "Adapt", "ArrayInterface", "Compat", "DataStructures", "FiniteDiff", "ForwardDiff", "Graphs", "LinearAlgebra", "Reexport", "Requires", "SciMLOperators", "Setfield", "SparseArrays", "StaticArrayInterface", "StaticArrays", "Tricks", "VertexSafeGraphs"] -git-tree-sha1 = "c5144590905924f1d1c6c3e82f9e5a5007459109" +git-tree-sha1 = "4c1a57bcbc0b795fbfdc2009e70f9c2fd2815bfe" uuid = "47a9eef4-7e08-11e9-0b38-333d64bd3804" -version = "2.4.0" +version = "2.4.1" [[deps.Sparspak]] deps = ["Libdl", "LinearAlgebra", "Logging", "OffsetArrays", "Printf", "SparseArrays", "Test"] @@ -2064,6 +2052,12 @@ git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a" uuid = "aed1982a-8fda-507f-9586-7b0439959a61" version = "1.1.34+0" +[[deps.XZ_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "8abe223c2549ea70be752b20a53aa236a7868eb0" +uuid = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800" +version = "5.4.3+0" + [[deps.Xorg_libX11_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] git-tree-sha1 = "5be649d550f3f4b95308bf0183b82e2582876527" diff --git a/examples/Manifest.toml b/examples/Manifest.toml index f06765c173..efd09f6939 100644 --- a/examples/Manifest.toml +++ b/examples/Manifest.toml @@ -208,10 +208,10 @@ uuid = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d" version = "0.5.0" [[deps.ClimaCore]] -deps = ["Adapt", "BlockArrays", "CUDA", "ClimaComms", "CubedSphere", "DataStructures", "DiffEqBase", "DocStringExtensions", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "LinearAlgebra", "PkgVersion", "RecursiveArrayTools", "Requires", "RootSolvers", "Rotations", "SparseArrays", "Static", "StaticArrays", "Statistics", "UnPack"] +deps = ["Adapt", "BlockArrays", "CUDA", "ClimaComms", "CubedSphere", "DataStructures", "DiffEqBase", "DocStringExtensions", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "LinearAlgebra", "PkgVersion", "RecursiveArrayTools", "Requires", "RootSolvers", "SparseArrays", "Static", "StaticArrays", "Statistics", "UnPack"] path = ".." uuid = "d414da3d-4745-48bb-8d80-42e94e092884" -version = "0.10.39" +version = "0.10.41" [[deps.ClimaCorePlots]] deps = ["ClimaCore", "RecipesBase", "StaticArrays", "TriplotBase"] @@ -223,7 +223,7 @@ version = "0.2.5" deps = ["ClimaComms", "ClimaCore", "Dates", "LinearAlgebra", "NCDatasets", "PkgVersion", "TempestRemap_jll", "Test"] path = "../lib/ClimaCoreTempestRemap" uuid = "d934ef94-cdd4-4710-83d6-720549644b70" -version = "0.3.8" +version = "0.3.9" [[deps.ClimaCoreVTK]] deps = ["ClimaCore", "WriteVTK"] @@ -275,9 +275,9 @@ version = "0.12.10" [[deps.CommonDataModel]] deps = ["CFTime", "DataStructures", "Dates", "Preferences", "Printf"] -git-tree-sha1 = "0404085d3518fc3c8ef0cb32858f6185aa9d8dff" +git-tree-sha1 = "2678b3fc170d582655a14d22867b031b6e43c2d4" uuid = "1fbeeb36-5f17-413c-809b-666fb144f157" -version = "0.2.3" +version = "0.2.4" [[deps.CommonSolve]] git-tree-sha1 = "0eee5eb66b1cf62cd6ad1b460238e60e4b09400c" @@ -423,9 +423,9 @@ uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" [[deps.Distributions]] deps = ["ChainRulesCore", "DensityInterface", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns", "Test"] -git-tree-sha1 = "c72970914c8a21b36bbc244e9df0ed1834a0360b" +git-tree-sha1 = "4ed4a6df2548a72f66e03f3a285cd1f3b573035d" uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" -version = "0.25.95" +version = "0.25.96" [[deps.DocStringExtensions]] deps = ["LibGit2"] @@ -455,11 +455,17 @@ git-tree-sha1 = "71c79e77221ab3a29918aaf6db4f217b89138608" uuid = "b305315f-e792-5b7a-8f41-49f472929428" version = "1.0.1" +[[deps.ExceptionUnwrapping]] +deps = ["Test"] +git-tree-sha1 = "e90caa41f5a86296e014e148ee061bd6c3edec96" +uuid = "460bff9d-24e4-43bc-9d9f-a8973cb893f4" +version = "0.1.9" + [[deps.Expat_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "bad72f730e9e91c08d9427d5e8db95478a3c323d" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "4558ab818dcceaab612d1bb8c19cee87eda2b83c" uuid = "2e619515-83b5-522b-bb60-26c02a35a201" -version = "2.4.8+0" +version = "2.5.0+0" [[deps.ExponentialUtilities]] deps = ["Adapt", "ArrayInterfaceCore", "ArrayInterfaceGPUArrays", "GPUArraysCore", "GenericSchur", "LinearAlgebra", "Printf", "SnoopPrecompile", "SparseArrays", "libblastrampoline_jll"] @@ -486,9 +492,9 @@ version = "4.4.2+2" [[deps.FFTW]] deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"] -git-tree-sha1 = "06bf20fcecd258eccf9a6ef7b99856a4dfe7b64c" +git-tree-sha1 = "b4fbdd20c889804969571cc589900803edda16b7" uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" -version = "1.7.0" +version = "1.7.1" [[deps.FFTW_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -587,9 +593,9 @@ version = "3.3.8+0" [[deps.GPUArrays]] deps = ["Adapt", "GPUArraysCore", "LLVM", "LinearAlgebra", "Printf", "Random", "Reexport", "Serialization", "Statistics"] -git-tree-sha1 = "a3351bc577a6b49297248aadc23a4add1097c2ac" +git-tree-sha1 = "745847e65e72a475716952f0a8a7258d42338ce9" uuid = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7" -version = "8.7.1" +version = "8.8.0" [[deps.GPUArraysCore]] deps = ["Adapt"] @@ -674,10 +680,10 @@ uuid = "0234f1f7-429e-5d53-9886-15a909be8d59" version = "1.12.2+2" [[deps.HTTP]] -deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] -git-tree-sha1 = "5e77dbf117412d4f164a464d610ee6050cc75272" +deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] +git-tree-sha1 = "2613d054b0e18a3dea99ca1594e9a3960e025da4" uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" -version = "1.9.6" +version = "1.9.7" [[deps.HarfBuzz_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] @@ -788,9 +794,9 @@ version = "0.2.1+0" [[deps.KernelAbstractions]] deps = ["Adapt", "Atomix", "InteractiveUtils", "LinearAlgebra", "MacroTools", "PrecompileTools", "SparseArrays", "StaticArrays", "UUIDs", "UnsafeAtomics", "UnsafeAtomicsLLVM"] -git-tree-sha1 = "47be64f040a7ece575c2b5f53ca6da7b548d69f4" +git-tree-sha1 = "b48617c5d764908b5fac493cd907cf33cc11eec1" uuid = "63c18a36-062a-441e-b654-da1e3ab1ce7c" -version = "0.9.4" +version = "0.9.6" [[deps.Krylov]] deps = ["LinearAlgebra", "Printf", "SparseArrays"] @@ -944,10 +950,10 @@ uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" version = "2.35.0+0" [[deps.Libtiff_jll]] -deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "Pkg", "Zlib_jll", "Zstd_jll"] -git-tree-sha1 = "3eb79b0ca5764d4799c06699573fd8f533259713" +deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "XZ_jll", "Zlib_jll", "Zstd_jll"] +git-tree-sha1 = "2da088d113af58221c52828a80378e16be7d037a" uuid = "89763e89-9b03-5906-acba-b20f662cd828" -version = "4.4.0+0" +version = "4.5.1+1" [[deps.Libuuid_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -1000,9 +1006,9 @@ version = "0.12.110" [[deps.MKL_jll]] deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] -git-tree-sha1 = "2ce8695e1e699b68702c03402672a69f54b8aca9" +git-tree-sha1 = "154d7aaa82d24db6d8f7e4ffcfe596f40bff214b" uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" -version = "2022.2.0+0" +version = "2023.1.0+0" [[deps.MPI]] deps = ["Distributed", "DocStringExtensions", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "PrecompileTools", "Requires", "Serialization", "Sockets"] @@ -1012,9 +1018,9 @@ version = "0.20.10" [[deps.MPICH_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] -git-tree-sha1 = "d790fbd913f85e8865c55bf4725aff197c5155c8" +git-tree-sha1 = "8a5b4d2220377d1ece13f49438d71ad20cf1ba83" uuid = "7cb0a576-ebde-5e09-9194-50597f1243b4" -version = "4.1.1+1" +version = "4.1.2+0" [[deps.MPIPreferences]] deps = ["Libdl", "Preferences"] @@ -1024,9 +1030,9 @@ version = "0.1.8" [[deps.MPItrampoline_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] -git-tree-sha1 = "b3dcf8e1c610a10458df3c62038c8cc3a4d6291d" +git-tree-sha1 = "6979eccb6a9edbbb62681e158443e79ecc0d056a" uuid = "f1f71cc9-e9ae-5b93-9b94-4fe0e1ad3748" -version = "5.3.0+0" +version = "5.3.1+0" [[deps.MacroTools]] deps = ["Markdown", "Random"] @@ -1097,9 +1103,9 @@ version = "0.2.4" [[deps.NCDatasets]] deps = ["CFTime", "CommonDataModel", "DataStructures", "Dates", "NetCDF_jll", "NetworkOptions", "Printf"] -git-tree-sha1 = "e201ed836f4486d0a5f593e68b7621b2e24237c5" +git-tree-sha1 = "4263c4220f22e20729329838bf7e94a49d1ac32f" uuid = "85f8d34a-cbdd-5861-8df4-14fed0d494ab" -version = "0.12.16" +version = "0.12.17" [[deps.NLSolversBase]] deps = ["DiffResults", "Distributed", "FiniteDiff", "ForwardDiff"] @@ -1115,9 +1121,9 @@ version = "4.5.1" [[deps.NNlib]] deps = ["Adapt", "Atomix", "ChainRulesCore", "GPUArraysCore", "KernelAbstractions", "LinearAlgebra", "Pkg", "Random", "Requires", "Statistics"] -git-tree-sha1 = "99e6dbb50d8a96702dc60954569e9fe7291cc55d" +git-tree-sha1 = "72240e3f5ca031937bd536182cb2c031da5f46dd" uuid = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" -version = "0.8.20" +version = "0.8.21" [[deps.NVTX]] deps = ["Colors", "JuliaNVTXCallbacks_jll", "Libdl", "NVTX_jll"] @@ -1241,9 +1247,9 @@ version = "0.12.3" [[deps.Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "5a6ab2f64388fd1175effdf73fe5933ef1e0bac0" +git-tree-sha1 = "4b2e829ee66d4218e0cef22c0a64ee37cf258c29" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.7.0" +version = "2.7.1" [[deps.Pipe]] git-tree-sha1 = "6842804e7867b115ca9de748a0cf6b364523c16d" @@ -1343,12 +1349,6 @@ git-tree-sha1 = "6ec7ac8412e83d57e313393220879ede1740f9ee" uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" version = "2.8.2" -[[deps.Quaternions]] -deps = ["LinearAlgebra", "Random", "RealDot"] -git-tree-sha1 = "da095158bdc8eaccb7890f9884048555ab771019" -uuid = "94ee1d12-ae83-5a48-8b1c-48b8ff168ae0" -version = "0.7.4" - [[deps.REPL]] deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" @@ -1369,12 +1369,6 @@ git-tree-sha1 = "043da614cc7e95c703498a491e2c21f58a2b8111" uuid = "e6cf234a-135c-5ec9-84dd-332b85af5143" version = "1.5.3" -[[deps.RealDot]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" -uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" -version = "0.1.0" - [[deps.RecipesBase]] deps = ["PrecompileTools"] git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" @@ -1440,12 +1434,6 @@ git-tree-sha1 = "9fb3462240d2898be5d4acf8925e47f70ec64d07" uuid = "7181ea78-2dcb-4de3-ab41-2b8ab5a31e74" version = "0.3.5" -[[deps.Rotations]] -deps = ["LinearAlgebra", "Quaternions", "Random", "StaticArrays"] -git-tree-sha1 = "54ccb4dbab4b1f69beb255a2c0ca5f65a9c82f08" -uuid = "6038ab10-8711-5258-84ad-4b1120ba62dc" -version = "1.5.1" - [[deps.RuntimeGeneratedFunctions]] deps = ["ExprTools", "SHA", "Serialization"] git-tree-sha1 = "237edc1563bbf078629b4f8d194bd334e97907cf" @@ -1526,9 +1514,9 @@ uuid = "6462fe0b-24de-5631-8697-dd941f90decc" [[deps.SortingAlgorithms]] deps = ["DataStructures"] -git-tree-sha1 = "a4ada03f999bd01b3a25dcaa30b2d929fe537e00" +git-tree-sha1 = "c60ec5c62180f27efea3ba2908480f8055e17cee" uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" -version = "1.1.0" +version = "1.1.1" [[deps.SparseArrays]] deps = ["LinearAlgebra", "Random"] @@ -1790,6 +1778,12 @@ git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a" uuid = "aed1982a-8fda-507f-9586-7b0439959a61" version = "1.1.34+0" +[[deps.XZ_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "8abe223c2549ea70be752b20a53aa236a7868eb0" +uuid = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800" +version = "5.4.3+0" + [[deps.Xorg_libX11_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] git-tree-sha1 = "5be649d550f3f4b95308bf0183b82e2582876527" diff --git a/perf/Manifest.toml b/perf/Manifest.toml index db2dacd6a7..dd7e9e54f5 100644 --- a/perf/Manifest.toml +++ b/perf/Manifest.toml @@ -203,10 +203,10 @@ uuid = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d" version = "0.5.0" [[deps.ClimaCore]] -deps = ["Adapt", "BlockArrays", "CUDA", "ClimaComms", "CubedSphere", "DataStructures", "DiffEqBase", "DocStringExtensions", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "LinearAlgebra", "PkgVersion", "RecursiveArrayTools", "Requires", "RootSolvers", "Rotations", "SparseArrays", "Static", "StaticArrays", "Statistics", "UnPack"] +deps = ["Adapt", "BlockArrays", "CUDA", "ClimaComms", "CubedSphere", "DataStructures", "DiffEqBase", "DocStringExtensions", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "LinearAlgebra", "PkgVersion", "RecursiveArrayTools", "Requires", "RootSolvers", "SparseArrays", "Static", "StaticArrays", "Statistics", "UnPack"] path = ".." uuid = "d414da3d-4745-48bb-8d80-42e94e092884" -version = "0.10.39" +version = "0.10.41" [[deps.ClimaCorePlots]] deps = ["ClimaCore", "RecipesBase", "StaticArrays", "TriplotBase"] @@ -218,7 +218,7 @@ version = "0.2.5" deps = ["ClimaComms", "ClimaCore", "Dates", "LinearAlgebra", "NCDatasets", "PkgVersion", "TempestRemap_jll", "Test"] path = "../lib/ClimaCoreTempestRemap" uuid = "d934ef94-cdd4-4710-83d6-720549644b70" -version = "0.3.8" +version = "0.3.9" [[deps.ClimaCoreVTK]] deps = ["ClimaCore", "WriteVTK"] @@ -276,9 +276,9 @@ version = "0.12.10" [[deps.CommonDataModel]] deps = ["CFTime", "DataStructures", "Dates", "Preferences", "Printf"] -git-tree-sha1 = "0404085d3518fc3c8ef0cb32858f6185aa9d8dff" +git-tree-sha1 = "2678b3fc170d582655a14d22867b031b6e43c2d4" uuid = "1fbeeb36-5f17-413c-809b-666fb144f157" -version = "0.2.3" +version = "0.2.4" [[deps.CommonSolve]] git-tree-sha1 = "0eee5eb66b1cf62cd6ad1b460238e60e4b09400c" @@ -436,9 +436,9 @@ uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" [[deps.Distributions]] deps = ["ChainRulesCore", "DensityInterface", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns", "Test"] -git-tree-sha1 = "c72970914c8a21b36bbc244e9df0ed1834a0360b" +git-tree-sha1 = "4ed4a6df2548a72f66e03f3a285cd1f3b573035d" uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" -version = "0.25.95" +version = "0.25.96" [[deps.DocStringExtensions]] deps = ["LibGit2"] @@ -473,11 +473,17 @@ git-tree-sha1 = "bdb1942cd4c45e3c678fd11569d5cccd80976237" uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" version = "1.0.4" +[[deps.ExceptionUnwrapping]] +deps = ["Test"] +git-tree-sha1 = "e90caa41f5a86296e014e148ee061bd6c3edec96" +uuid = "460bff9d-24e4-43bc-9d9f-a8973cb893f4" +version = "0.1.9" + [[deps.Expat_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "bad72f730e9e91c08d9427d5e8db95478a3c323d" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "4558ab818dcceaab612d1bb8c19cee87eda2b83c" uuid = "2e619515-83b5-522b-bb60-26c02a35a201" -version = "2.4.8+0" +version = "2.5.0+0" [[deps.ExponentialUtilities]] deps = ["Adapt", "ArrayInterfaceCore", "ArrayInterfaceGPUArrays", "GPUArraysCore", "GenericSchur", "LinearAlgebra", "Printf", "SnoopPrecompile", "SparseArrays", "libblastrampoline_jll"] @@ -504,9 +510,9 @@ version = "4.4.2+2" [[deps.FFTW]] deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"] -git-tree-sha1 = "06bf20fcecd258eccf9a6ef7b99856a4dfe7b64c" +git-tree-sha1 = "b4fbdd20c889804969571cc589900803edda16b7" uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" -version = "1.7.0" +version = "1.7.1" [[deps.FFTW_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -617,9 +623,9 @@ version = "3.3.8+0" [[deps.GPUArrays]] deps = ["Adapt", "GPUArraysCore", "LLVM", "LinearAlgebra", "Printf", "Random", "Reexport", "Serialization", "Statistics"] -git-tree-sha1 = "a3351bc577a6b49297248aadc23a4add1097c2ac" +git-tree-sha1 = "745847e65e72a475716952f0a8a7258d42338ce9" uuid = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7" -version = "8.7.1" +version = "8.8.0" [[deps.GPUArraysCore]] deps = ["Adapt"] @@ -710,10 +716,10 @@ uuid = "0234f1f7-429e-5d53-9886-15a909be8d59" version = "1.12.2+2" [[deps.HTTP]] -deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] -git-tree-sha1 = "5e77dbf117412d4f164a464d610ee6050cc75272" +deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] +git-tree-sha1 = "2613d054b0e18a3dea99ca1594e9a3960e025da4" uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" -version = "1.9.6" +version = "1.9.7" [[deps.HarfBuzz_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] @@ -835,15 +841,15 @@ uuid = "9c1d0b0a-7046-5b2e-a33f-ea22f176ac7e" version = "0.2.1+0" [[deps.JuliaSyntax]] -git-tree-sha1 = "3379908bd15b3ae86b24de22efbb1e6813864078" +git-tree-sha1 = "3b993680318327a645c0240baf653433a0f09953" uuid = "70703baa-626e-46a2-a12c-08ffd08c73b4" -version = "0.4.3" +version = "0.4.5" [[deps.KernelAbstractions]] deps = ["Adapt", "Atomix", "InteractiveUtils", "LinearAlgebra", "MacroTools", "PrecompileTools", "SparseArrays", "StaticArrays", "UUIDs", "UnsafeAtomics", "UnsafeAtomicsLLVM"] -git-tree-sha1 = "47be64f040a7ece575c2b5f53ca6da7b548d69f4" +git-tree-sha1 = "b48617c5d764908b5fac493cd907cf33cc11eec1" uuid = "63c18a36-062a-441e-b654-da1e3ab1ce7c" -version = "0.9.4" +version = "0.9.6" [[deps.Krylov]] deps = ["LinearAlgebra", "Printf", "SparseArrays"] @@ -997,10 +1003,10 @@ uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" version = "2.35.0+0" [[deps.Libtiff_jll]] -deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "Pkg", "Zlib_jll", "Zstd_jll"] -git-tree-sha1 = "3eb79b0ca5764d4799c06699573fd8f533259713" +deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "XZ_jll", "Zlib_jll", "Zstd_jll"] +git-tree-sha1 = "2da088d113af58221c52828a80378e16be7d037a" uuid = "89763e89-9b03-5906-acba-b20f662cd828" -version = "4.4.0+0" +version = "4.5.1+1" [[deps.Libuuid_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -1059,9 +1065,9 @@ version = "2.3.0" [[deps.MKL_jll]] deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] -git-tree-sha1 = "2ce8695e1e699b68702c03402672a69f54b8aca9" +git-tree-sha1 = "154d7aaa82d24db6d8f7e4ffcfe596f40bff214b" uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" -version = "2022.2.0+0" +version = "2023.1.0+0" [[deps.MPI]] deps = ["Distributed", "DocStringExtensions", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "PrecompileTools", "Requires", "Serialization", "Sockets"] @@ -1071,9 +1077,9 @@ version = "0.20.10" [[deps.MPICH_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] -git-tree-sha1 = "d790fbd913f85e8865c55bf4725aff197c5155c8" +git-tree-sha1 = "8a5b4d2220377d1ece13f49438d71ad20cf1ba83" uuid = "7cb0a576-ebde-5e09-9194-50597f1243b4" -version = "4.1.1+1" +version = "4.1.2+0" [[deps.MPIPreferences]] deps = ["Libdl", "Preferences"] @@ -1083,9 +1089,9 @@ version = "0.1.8" [[deps.MPItrampoline_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] -git-tree-sha1 = "b3dcf8e1c610a10458df3c62038c8cc3a4d6291d" +git-tree-sha1 = "6979eccb6a9edbbb62681e158443e79ecc0d056a" uuid = "f1f71cc9-e9ae-5b93-9b94-4fe0e1ad3748" -version = "5.3.0+0" +version = "5.3.1+0" [[deps.MacroTools]] deps = ["Markdown", "Random"] @@ -1150,9 +1156,9 @@ version = "0.2.4" [[deps.NCDatasets]] deps = ["CFTime", "CommonDataModel", "DataStructures", "Dates", "NetCDF_jll", "NetworkOptions", "Printf"] -git-tree-sha1 = "e201ed836f4486d0a5f593e68b7621b2e24237c5" +git-tree-sha1 = "4263c4220f22e20729329838bf7e94a49d1ac32f" uuid = "85f8d34a-cbdd-5861-8df4-14fed0d494ab" -version = "0.12.16" +version = "0.12.17" [[deps.NLSolversBase]] deps = ["DiffResults", "Distributed", "FiniteDiff", "ForwardDiff"] @@ -1168,9 +1174,9 @@ version = "4.5.1" [[deps.NNlib]] deps = ["Adapt", "Atomix", "ChainRulesCore", "GPUArraysCore", "KernelAbstractions", "LinearAlgebra", "Pkg", "Random", "Requires", "Statistics"] -git-tree-sha1 = "99e6dbb50d8a96702dc60954569e9fe7291cc55d" +git-tree-sha1 = "72240e3f5ca031937bd536182cb2c031da5f46dd" uuid = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" -version = "0.8.20" +version = "0.8.21" [[deps.NVTX]] deps = ["Colors", "JuliaNVTXCallbacks_jll", "Libdl", "NVTX_jll"] @@ -1306,9 +1312,9 @@ version = "0.12.3" [[deps.Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "5a6ab2f64388fd1175effdf73fe5933ef1e0bac0" +git-tree-sha1 = "4b2e829ee66d4218e0cef22c0a64ee37cf258c29" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.7.0" +version = "2.7.1" [[deps.Pipe]] git-tree-sha1 = "6842804e7867b115ca9de748a0cf6b364523c16d" @@ -1436,12 +1442,6 @@ git-tree-sha1 = "6ec7ac8412e83d57e313393220879ede1740f9ee" uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" version = "2.8.2" -[[deps.Quaternions]] -deps = ["LinearAlgebra", "Random", "RealDot"] -git-tree-sha1 = "da095158bdc8eaccb7890f9884048555ab771019" -uuid = "94ee1d12-ae83-5a48-8b1c-48b8ff168ae0" -version = "0.7.4" - [[deps.REPL]] deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" @@ -1462,12 +1462,6 @@ git-tree-sha1 = "043da614cc7e95c703498a491e2c21f58a2b8111" uuid = "e6cf234a-135c-5ec9-84dd-332b85af5143" version = "1.5.3" -[[deps.RealDot]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" -uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" -version = "0.1.0" - [[deps.RecipesBase]] deps = ["PrecompileTools"] git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" @@ -1539,12 +1533,6 @@ git-tree-sha1 = "9fb3462240d2898be5d4acf8925e47f70ec64d07" uuid = "7181ea78-2dcb-4de3-ab41-2b8ab5a31e74" version = "0.3.5" -[[deps.Rotations]] -deps = ["LinearAlgebra", "Quaternions", "Random", "StaticArrays"] -git-tree-sha1 = "54ccb4dbab4b1f69beb255a2c0ca5f65a9c82f08" -uuid = "6038ab10-8711-5258-84ad-4b1120ba62dc" -version = "1.5.1" - [[deps.RuntimeGeneratedFunctions]] deps = ["ExprTools", "SHA", "Serialization"] git-tree-sha1 = "237edc1563bbf078629b4f8d194bd334e97907cf" @@ -1637,9 +1625,9 @@ uuid = "6462fe0b-24de-5631-8697-dd941f90decc" [[deps.SortingAlgorithms]] deps = ["DataStructures"] -git-tree-sha1 = "a4ada03f999bd01b3a25dcaa30b2d929fe537e00" +git-tree-sha1 = "c60ec5c62180f27efea3ba2908480f8055e17cee" uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" -version = "1.1.0" +version = "1.1.1" [[deps.SparseArrays]] deps = ["LinearAlgebra", "Random"] @@ -1798,9 +1786,9 @@ version = "0.1.0" [[deps.TypedSyntax]] deps = ["CodeTracking", "JuliaSyntax"] -git-tree-sha1 = "1b463f065d5b950059b6036ab370ae9013b2d6a6" +git-tree-sha1 = "e38949656d1443d30339d4fc1088fdc49c8f652e" uuid = "d265eb64-f81a-44ad-a842-4247ee1503de" -version = "1.2.0" +version = "1.2.1" [[deps.URIs]] git-tree-sha1 = "074f993b0ca030848b897beff716d93aca60f06a" @@ -1906,6 +1894,12 @@ git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a" uuid = "aed1982a-8fda-507f-9586-7b0439959a61" version = "1.1.34+0" +[[deps.XZ_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "8abe223c2549ea70be752b20a53aa236a7868eb0" +uuid = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800" +version = "5.4.3+0" + [[deps.Xorg_libX11_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] git-tree-sha1 = "5be649d550f3f4b95308bf0183b82e2582876527" From 8bc482c3b742897abf40f859d4640140cdbc2d78 Mon Sep 17 00:00:00 2001 From: Charles Kawczynski Date: Thu, 22 Jun 2023 13:39:16 -0700 Subject: [PATCH 3/7] Use latest ClimaCore names --- examples/hybrid/box/bubble_3d_invariant_rhoe.jl | 4 ++-- src/Fields/indices.jl | 6 +++--- test/Fields/reduction_cuda_distributed.jl | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/hybrid/box/bubble_3d_invariant_rhoe.jl b/examples/hybrid/box/bubble_3d_invariant_rhoe.jl index eccf924951..956068ce51 100644 --- a/examples/hybrid/box/bubble_3d_invariant_rhoe.jl +++ b/examples/hybrid/box/bubble_3d_invariant_rhoe.jl @@ -482,8 +482,8 @@ function bubble_3d_invariant_ρe(ARGS, comms_ctx, ::Type{FT}) where {FT} Plots.GRBackend() dir = - comms_ctx.device isa ClimaComms.CPUDevice ? "bubble_3d_invariant_rhoe" : - "gpu_bubble_3d_invariant_rhoe" + comms_ctx.device isa ClimaComms.AbstractCPUDevice ? + "bubble_3d_invariant_rhoe" : "gpu_bubble_3d_invariant_rhoe" path = joinpath(@__DIR__, "output", dir) mkpath(path) diff --git a/src/Fields/indices.jl b/src/Fields/indices.jl index 4b98169e48..cc53f04f51 100644 --- a/src/Fields/indices.jl +++ b/src/Fields/indices.jl @@ -74,7 +74,7 @@ end function bycolumn( fn, space::Spaces.SpectralElementSpace1D, - ::ClimaComms.CPUDevice, + ::ClimaComms.AbstractCPUDevice, ) Nh = Topologies.nlocalelems(space) Nq = Spaces.Quadratures.degrees_of_freedom(Spaces.quadrature_style(space)) @@ -98,7 +98,7 @@ end function bycolumn( fn, space::Spaces.SpectralElementSpace2D, - ::ClimaComms.CPUDevice, + ::ClimaComms.AbstractCPUDevice, ) Nh = Topologies.nlocalelems(space) Nq = Spaces.Quadratures.degrees_of_freedom(Spaces.quadrature_style(space)) @@ -122,7 +122,7 @@ end bycolumn( fn, space::Spaces.ExtrudedFiniteDifferenceSpace, - device::ClimaComms.CPUDevice, + device::ClimaComms.AbstractCPUDevice, ) = bycolumn(fn, space.horizontal_space, device) diff --git a/test/Fields/reduction_cuda_distributed.jl b/test/Fields/reduction_cuda_distributed.jl index f020c75043..9d5ae378c5 100644 --- a/test/Fields/reduction_cuda_distributed.jl +++ b/test/Fields/reduction_cuda_distributed.jl @@ -20,7 +20,7 @@ include("reduction_cuda_utils.jl") @testset "test distributed cuda reduction op on surface of sphere" begin FT = Float64 context = ClimaComms.context() - context_cpu = ClimaComms.context(ClimaComms.CPUDevice()) # CPU context for comparison + context_cpu = ClimaComms.context(ClimaComms.CPUSingleThreaded()) # CPU context for comparison ClimaComms.init(context) ClimaComms.init(context_cpu) @@ -90,7 +90,7 @@ end @testset "test cuda reduction op for extruded 3D domain (hollow sphere)" begin FT = Float64 context = ClimaComms.context() - context_cpu = ClimaComms.context(ClimaComms.CPUDevice()) # CPU context for comparison + context_cpu = ClimaComms.context(ClimaComms.CPUSingleThreaded()) # CPU context for comparison ClimaComms.init(context) ClimaComms.init(context_cpu) From c498015cc7de6c3786bf69b2234bea4bfe8d504e Mon Sep 17 00:00:00 2001 From: sriharshakandala Date: Thu, 22 Jun 2023 14:21:26 -0700 Subject: [PATCH 4/7] Update byslab function for CPU threading --- src/Fields/indices.jl | 70 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 67 insertions(+), 3 deletions(-) diff --git a/src/Fields/indices.jl b/src/Fields/indices.jl index cc53f04f51..2b0a005785 100644 --- a/src/Fields/indices.jl +++ b/src/Fields/indices.jl @@ -187,13 +187,40 @@ Base.@propagate_inbounds function slab( slab(field, slabidx.v + half, slabidx.h) end -function byslab(fn, space::Spaces.AbstractSpectralElementSpace) +function byslab(fn, space::Spaces.AbstractSpace) + byslab(fn, ClimaComms.device(space), space) +end + +function byslab( + fn, + ::ClimaComms.CPUSingleThreaded, + space::Spaces.AbstractSpectralElementSpace, +) Nh = Topologies.nlocalelems(space.topology)::Int @inbounds for h in 1:Nh fn(SlabIndex(nothing, h)) end end -function byslab(fn, space::Spaces.CenterExtrudedFiniteDifferenceSpace) + +function byslab( + fn, + ::ClimaComms.CPUMultiThreaded, + space::Spaces.AbstractSpectralElementSpace, +) + Nh = Topologies.nlocalelems(space.topology)::Int + @inbounds begin + Threads.@threads for h in 1:Nh + fn(SlabIndex(nothing, h)) + end + end +end + + +function byslab( + fn, + ::ClimaComms.CPUSingleThreaded, + space::Spaces.CenterExtrudedFiniteDifferenceSpace, +) Nh = Topologies.nlocalelems(Spaces.topology(space)) Nv = Spaces.nlevels(space) @inbounds begin @@ -204,7 +231,28 @@ function byslab(fn, space::Spaces.CenterExtrudedFiniteDifferenceSpace) end end end -function byslab(fn, space::Spaces.FaceExtrudedFiniteDifferenceSpace) + +function byslab( + fn, + ::ClimaComms.CPUMultiThreaded, + space::Spaces.CenterExtrudedFiniteDifferenceSpace, +) + Nh = Topologies.nlocalelems(Spaces.topology(space)) + Nv = Spaces.nlevels(space) + @inbounds begin + Threads.@threads for h in 1:Nh + for v in 1:Nv + fn(SlabIndex(v, h)) + end + end + end +end + +function byslab( + fn, + ::ClimaComms.CPUSingleThreaded, + space::Spaces.FaceExtrudedFiniteDifferenceSpace, +) Nh = Topologies.nlocalelems(Spaces.topology(space)) Nv = Spaces.nlevels(space) @inbounds begin @@ -215,3 +263,19 @@ function byslab(fn, space::Spaces.FaceExtrudedFiniteDifferenceSpace) end end end + +function byslab( + fn, + ::ClimaComms.CPUMultiThreaded, + space::Spaces.FaceExtrudedFiniteDifferenceSpace, +) + Nh = Topologies.nlocalelems(Spaces.topology(space)) + Nv = Spaces.nlevels(space) + @inbounds begin + Threads.@threads for h in 1:Nh + for v in 1:Nv + fn(SlabIndex(v - half, h)) + end + end + end +end From 08485e550d530fe9cf26c9342fb54d86e2297dc0 Mon Sep 17 00:00:00 2001 From: Charles Kawczynski Date: Thu, 22 Jun 2023 15:23:42 -0700 Subject: [PATCH 5/7] Remove use of enable_threading() --- examples/hybrid/driver.jl | 3 - examples/hybrid/sphere/README.md | 2 +- src/Fields/Fields.jl | 1 - src/Fields/indices.jl | 60 ++++++++++++------- src/Operators/Operators.jl | 2 +- src/Operators/finitedifference.jl | 4 +- src/interface.jl | 5 +- test/Fields/field.jl | 2 - .../column_benchmark_utils.jl | 1 - 9 files changed, 47 insertions(+), 33 deletions(-) diff --git a/examples/hybrid/driver.jl b/examples/hybrid/driver.jl index 48a1e92e36..8c77d40406 100644 --- a/examples/hybrid/driver.jl +++ b/examples/hybrid/driver.jl @@ -74,9 +74,6 @@ if z_stretch_string == "stretched" test_file_name = "$(z_stretch_string)_$(test_file_name)" end -import ClimaCore: enable_threading -enable_threading() = false - if haskey(ENV, "RESTART_FILE") restart_file_name = ENV["RESTART_FILE"] if is_distributed diff --git a/examples/hybrid/sphere/README.md b/examples/hybrid/sphere/README.md index 12297e7f9b..be0bf5b0d9 100644 --- a/examples/hybrid/sphere/README.md +++ b/examples/hybrid/sphere/README.md @@ -37,7 +37,7 @@ In the runscript, one needs to specify the following environmant variable: * `OUTPUT_DIR`: the directory for jld2 data being saved at; * `RESTART_FILE`: if run from a pre-existing jld2 data saved from a previous simulation. -Meanwhile, to enable multithreads, one needs to change [here](https://github.com/CliMA/ClimaCore.jl/blob/main/examples/hybrid/driver.jl#L51) in `driver.jl` to be `enable_threading() = true`. +Meanwhile, to enable multithreads, one needs to launch with the desired number of threads (e.g., `julia --threads=8`). To use `sphere/held_suarez_rhoe` as an example, one needs to modify [these lines](https://github.com/CliMA/ClimaCore.jl/blob/main/examples/hybrid/sphere/held_suarez_rhoe.jl#L6-L16) into the specific setup. In particular, `dt_save_to_disk=FT(0)` means no jld2 outputs. A non-zero value specifies the frequency in seconds to save the data into jld2 files. diff --git a/src/Fields/Fields.jl b/src/Fields/Fields.jl index f0fc54c2fe..2db86c5318 100644 --- a/src/Fields/Fields.jl +++ b/src/Fields/Fields.jl @@ -1,7 +1,6 @@ module Fields import ClimaComms -import ..enable_threading import ..slab, ..slab_args, ..column, ..column_args, ..level import ..DataLayouts: DataLayouts, AbstractData, DataStyle import ..Domains diff --git a/src/Fields/indices.jl b/src/Fields/indices.jl index 2b0a005785..c056c6566c 100644 --- a/src/Fields/indices.jl +++ b/src/Fields/indices.jl @@ -74,22 +74,30 @@ end function bycolumn( fn, space::Spaces.SpectralElementSpace1D, - ::ClimaComms.AbstractCPUDevice, + ::ClimaComms.CPUSingleThreaded, ) Nh = Topologies.nlocalelems(space) Nq = Spaces.Quadratures.degrees_of_freedom(Spaces.quadrature_style(space)) @inbounds begin - if enable_threading() - Threads.@threads for h in 1:Nh - for i in 1:Nq - fn(ColumnIndex((i,), h)) - end + for h in 1:Nh + for i in 1:Nq + fn(ColumnIndex((i,), h)) end - else - for h in 1:Nh - for i in 1:Nq - fn(ColumnIndex((i,), h)) - end + end + end + return nothing +end +function bycolumn( + fn, + space::Spaces.SpectralElementSpace1D, + ::ClimaComms.CPUMultiThreaded, +) + Nh = Topologies.nlocalelems(space) + Nq = Spaces.Quadratures.degrees_of_freedom(Spaces.quadrature_style(space)) + @inbounds begin + Threads.@threads for h in 1:Nh + for i in 1:Nq + fn(ColumnIndex((i,), h)) end end end @@ -98,22 +106,30 @@ end function bycolumn( fn, space::Spaces.SpectralElementSpace2D, - ::ClimaComms.AbstractCPUDevice, + ::ClimaComms.CPUSingleThreaded, ) Nh = Topologies.nlocalelems(space) Nq = Spaces.Quadratures.degrees_of_freedom(Spaces.quadrature_style(space)) @inbounds begin - if enable_threading() - Threads.@threads for h in 1:Nh - for j in 1:Nq, i in 1:Nq - fn(ColumnIndex((i, j), h)) - end + for h in 1:Nh + for j in 1:Nq, i in 1:Nq + fn(ColumnIndex((i, j), h)) end - else - for h in 1:Nh - for j in 1:Nq, i in 1:Nq - fn(ColumnIndex((i, j), h)) - end + end + end + return nothing +end +function bycolumn( + fn, + space::Spaces.SpectralElementSpace2D, + ::ClimaComms.CPUMultiThreaded, +) + Nh = Topologies.nlocalelems(space) + Nq = Spaces.Quadratures.degrees_of_freedom(Spaces.quadrature_style(space)) + @inbounds begin + Threads.@threads for h in 1:Nh + for j in 1:Nq, i in 1:Nq + fn(ColumnIndex((i, j), h)) end end end diff --git a/src/Operators/Operators.jl b/src/Operators/Operators.jl index ff66a5749e..5ece12aef6 100644 --- a/src/Operators/Operators.jl +++ b/src/Operators/Operators.jl @@ -6,7 +6,7 @@ using StaticArrays, CUDA import Base.Broadcast: Broadcasted -import ..enable_threading, ..slab, ..slab_args, ..column, ..column_args +import ..slab, ..slab_args, ..column, ..column_args import ClimaComms import ..DataLayouts: DataLayouts, Data2D, DataSlab2D import ..Geometry: Geometry, Covariant12Vector, Contravariant12Vector, ⊗ diff --git a/src/Operators/finitedifference.jl b/src/Operators/finitedifference.jl index 74bbf41323..a15cb9cf7e 100644 --- a/src/Operators/finitedifference.jl +++ b/src/Operators/finitedifference.jl @@ -3467,7 +3467,9 @@ function Base.copyto!( space = axes(bc) local_geometry = Spaces.local_geometry_data(space) (Ni, Nj, _, _, Nh) = size(local_geometry) - if enable_threading() && Nh > 1 + context = ClimaComms.context(axes(field_out)) + device = ClimaComms.device(context) + if (device isa ClimaComms.CPUMultiThreaded) && Nh > 1 return _threaded_copyto!(field_out, bc, Ni, Nj, Nh) end return _serial_copyto!(field_out, bc, Ni, Nj, Nh) diff --git a/src/interface.jl b/src/interface.jl index fd20b36fa4..ad5ac98488 100644 --- a/src/interface.jl +++ b/src/interface.jl @@ -10,8 +10,11 @@ Enable the threading runtime by redefining the method at the toplevel your exper enable_threading() = true and running julia with `julia --nthreads=N ...` + +This function is deprecated in version `0.10.42`. +Please use the ClimaComms context for threading. """ -enable_threading() = false +enable_threading() = @warn "Use ClimaComms context for threading" """ slab(data::AbstractData, h::Integer) diff --git a/test/Fields/field.jl b/test/Fields/field.jl index 9600e16312..5068dae33e 100644 --- a/test/Fields/field.jl +++ b/test/Fields/field.jl @@ -669,7 +669,6 @@ convergence_rate(err, Δh) = @test 2 < sum(abs.(cr)) / length(cr) < 2.01 end -ClimaCore.enable_threading() = false # launching threads allocates @testset "Allocation tests for integrals" begin FT = Float64 for space in TU.all_spaces(FT) @@ -695,7 +694,6 @@ ClimaCore.enable_threading() = false # launching threads allocates end nothing end -ClimaCore.enable_threading() = false @testset "ncolumns" begin FT = Float64 diff --git a/test/Operators/finitedifference/column_benchmark_utils.jl b/test/Operators/finitedifference/column_benchmark_utils.jl index 81bb26fa88..b9467127f3 100644 --- a/test/Operators/finitedifference/column_benchmark_utils.jl +++ b/test/Operators/finitedifference/column_benchmark_utils.jl @@ -8,7 +8,6 @@ import OrderedCollections using ClimaCore.Geometry: ⊗ import ClimaCore -ClimaCore.enable_threading() = false import ClimaCore: Domains, Meshes, Spaces, Fields, Operators, Topologies import ClimaCore.Domains: Geometry From 7d4bafef1051a3a483707c313918cca255ffd13c Mon Sep 17 00:00:00 2001 From: Charles Kawczynski Date: Thu, 22 Jun 2023 15:42:14 -0700 Subject: [PATCH 6/7] Fix enable_threading() return false --- src/interface.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/interface.jl b/src/interface.jl index ad5ac98488..160a9ff098 100644 --- a/src/interface.jl +++ b/src/interface.jl @@ -14,7 +14,10 @@ and running julia with `julia --nthreads=N ...` This function is deprecated in version `0.10.42`. Please use the ClimaComms context for threading. """ -enable_threading() = @warn "Use ClimaComms context for threading" +function enable_threading() + @warn "Use ClimaComms context for threading" + return false +end """ slab(data::AbstractData, h::Integer) From ba58b780b8f8ccbf16e088870715893de99ba256 Mon Sep 17 00:00:00 2001 From: Charles Kawczynski Date: Thu, 22 Jun 2023 16:04:04 -0700 Subject: [PATCH 7/7] Ditch multithreading for two DataLayouts --- src/DataLayouts/broadcast.jl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/DataLayouts/broadcast.jl b/src/DataLayouts/broadcast.jl index 69d7308bf5..fc9691c601 100644 --- a/src/DataLayouts/broadcast.jl +++ b/src/DataLayouts/broadcast.jl @@ -536,9 +536,9 @@ function Base.copyto!( dest::VIFH{S, Ni}, bc::Base.Broadcast.Broadcasted{VIFHStyle{Ni, A}}, ) where {S, Ni, A} - if enable_threading() - return _threaded_copyto!(dest, bc) - end + # if enable_threading() + # return _threaded_copyto!(dest, bc) + # end return _serial_copyto!(dest, bc) end @@ -586,8 +586,8 @@ function Base.copyto!( dest::VIJFH{S, Nij}, bc::Base.Broadcast.Broadcasted{VIJFHStyle{Nij, A}}, ) where {S, Nij, A} - if enable_threading() - return _threaded_copyto!(dest, bc) - end + # if enable_threading() + # return _threaded_copyto!(dest, bc) + # end return _serial_copyto!(dest, bc) end