Skip to content

Commit

Permalink
Add downgrade workflow, fix lower bounds
Browse files Browse the repository at this point in the history
This commit adds the downgrade github action and cleans up some incorrect lower
bounds. I also removed a couple of packages that could be trivially removed.
  • Loading branch information
Sbozzolo committed Nov 11, 2024
1 parent aa95d03 commit 3f2adb2
Show file tree
Hide file tree
Showing 16 changed files with 82 additions and 55 deletions.
2 changes: 0 additions & 2 deletions .buildkite/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ ClimaCoreTempestRemap = "d934ef94-cdd4-4710-83d6-720549644b70"
ClimaCoreVTK = "c8b6d40d-e815-466f-95ae-c48aefa668fa"
ClimaTimeSteppers = "595c0a79-7f3d-439a-bc5a-b232dc3bde79"
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
CountFlops = "1db9610d-79e1-487a-8d40-77f3295c7593"
CubedSphere = "7445602f-e544-4518-8976-18f8e8ae6cdb"
DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def"
Expand All @@ -33,7 +32,6 @@ Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
NVTX = "5da4648a-3479-48b8-97b9-01cb529c0a1f"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
OrdinaryDiffEqSSPRK = "669c94d9-1f4b-4b64-b377-1aa079aa2388"
OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a"
PProf = "e4faabce-9ead-11e9-39d9-4379958e3056"
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/downgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Downgrade
on:
pull_request:
push:
branches:
- main
tags: '*'

# Needed to allow julia-actions/cache to delete old caches that it has created
permissions:
actions: write
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
version: ['1.9', '1.10', '1.11']
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-downgrade-compat@v1
with:
skip: Dates, InteractiveUtils, LinearAlgebra, Logging, Random, Test, SparseArrays, Statistics
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
41 changes: 16 additions & 25 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
ClimaComms = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d"
CubedSphere = "7445602f-e544-4518-8976-18f8e8ae6cdb"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
GaussQuadrature = "d54b0c1a-921d-58e0-8e36-89d8069c0969"
GilbertCurves = "88fa7841-ef32-4516-bb70-c6ec135699d9"
Expand Down Expand Up @@ -42,64 +41,57 @@ Adapt = "3, 4"
Aqua = "0.8"
ArgParse = "1"
AssociatedLegendrePolynomials = "1"
BandedMatrices = "0.17, 1"
BandedMatrices = "1"
BenchmarkTools = "1"
BlockArrays = "0.16, 1"
BlockArrays = "1"
ClimaComms = "0.6"
Combinatorics = "1"
CountFlops = "0.1"
CubedSphere = "0.2, 0.3"
CUDA = "5"
CUDA = "5.5"
Dates = "1"
DataStructures = "0.18"
DocStringExtensions = "0.8, 0.9"
FastBroadcast = "0.3"
ForwardDiff = "0.10"
GaussQuadrature = "0.5"
DataStructures = "0.18.13"
FastBroadcast = "0.3.1"
ForwardDiff = "0.10.15"
GaussQuadrature = "0.5.5"
GilbertCurves = "0.1"
HDF5 = "0.16, 0.17"
HDF5 = "0.16.10, 0.17"
InteractiveUtils = "1"
IntervalSets = "0.5, 0.6, 0.7"
JET = "0.9"
JET = "0.8.28, 0.9"
Krylov = "0.9"
KrylovKit = "0.6, 0.7, 0.8"
LinearAlgebra = "1"
LazyBroadcast = "0.1"
LazyBroadcast = "0.1.4"
Logging = "1"
MPI = "0.20"
MultiBroadcastFusion = "0.3, 0.4"
MultiBroadcastFusion = "0.3.1, 0.4"
NVTX = "0.3"
OrderedCollections = "1"
PkgVersion = "0.1, 0.2, 0.3"
PrettyTables = "2"
Random = "1"
RecursiveArrayTools = "2, 3"
RecursiveArrayTools = "3.1"
RootSolvers = "0.3, 0.4"
SafeTestsets = "0.1"
SparseArrays = "1"
StaticArrays = "1"
StaticArrays = "1.6"
Statistics = "1"
StatsBase = "0.34"
TerminalLoggers = "0.1"
Test = "1"
Unrolled = "0.1"
Unrolled = "0.1.2"
julia = "1.9"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
AssociatedLegendrePolynomials = "2119f1ac-fb78-50f5-8cc0-dda848ebdb19"
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
CountFlops = "1db9610d-79e1-487a-8d40-77f3295c7593"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898"
Krylov = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
Krylov = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7"
LazyBroadcast = "9dccce8e-a116-406d-9fcc-a88ed4f510c8"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
Expand All @@ -108,5 +100,4 @@ TerminalLoggers = "5d786b92-1e48-4d6f-9151-6b4477ca9bed"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Aqua", "ArgParse", "AssociatedLegendrePolynomials", "BenchmarkTools", "Combinatorics", "CountFlops", "Dates", "FastBroadcast", "Krylov", "JET", "LazyBroadcast", "Logging", "MPI", "OrderedCollections", "PrettyTables", "Random", "SafeTestsets", "StatsBase", "TerminalLoggers", "Test"]

test = ["Aqua", "ArgParse", "AssociatedLegendrePolynomials", "BenchmarkTools", "CountFlops", "Dates", "FastBroadcast", "Krylov", "JET", "LazyBroadcast", "Logging", "PrettyTables", "Random", "SafeTestsets", "StatsBase", "TerminalLoggers", "Test"]
8 changes: 4 additions & 4 deletions src/Domains/Domains.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Domains

import ..Geometry: Geometry, float_type
using IntervalSets
import IntervalSets
export RectangleDomain

"""
Expand Down Expand Up @@ -62,7 +62,7 @@ function IntervalDomain(
end
IntervalDomain(promote(coord_min, coord_max)..., boundary_names)
end
IntervalDomain(coords::ClosedInterval; kwargs...) =
IntervalDomain(coords::IntervalSets.ClosedInterval; kwargs...) =
IntervalDomain(coords.left, coords.right; kwargs...)

"""
Expand Down Expand Up @@ -130,8 +130,8 @@ Construct a `RectangularDomain` in the horizontal.
If a given x1 or x2 boundary is not periodic, then `x1boundary` or `x2boundary` boundary name keyword arguments must be supplied.
"""
function RectangleDomain(
x1::ClosedInterval{X1CT},
x2::ClosedInterval{X2CT};
x1::IntervalSets.ClosedInterval{X1CT},
x2::IntervalSets.ClosedInterval{X2CT};
x1periodic = false,
x2periodic = false,
x1boundary::BCTagType = nothing,
Expand Down
1 change: 0 additions & 1 deletion src/Meshes/Meshes.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module Meshes

import RootSolvers
using DocStringExtensions

export RectilinearMesh,
EquiangularCubedSphere,
Expand Down
2 changes: 0 additions & 2 deletions src/Topologies/Topologies.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
module Topologies

using DocStringExtensions

import ClimaComms, Adapt

import ..ClimaCore
Expand Down
14 changes: 12 additions & 2 deletions src/Topologies/dss.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using DocStringExtensions
using .DataLayouts: CartesianFieldIndex

const DSSTypesAll = Union{
Expand All @@ -24,7 +23,18 @@ const DSSWeightTypes = Union{DataLayouts.IJFH, DataLayouts.IJHF}
DSSBuffer{G, D, A, B}
# Fields
$(DocStringExtensions.FIELDS)
- `graph_context`: ClimaComms graph context for communication
- `perimeter_data`: Perimeter `DataLayout` object: typically a
`VIFH{TT,Nv,Np,Nh}` or `VIHF{TT,Nv,Np,Nh}`, where `TT` is the transformed
type, `Nv` is the number of vertical levels, and `Np` is the length of the
perimeter
- `send_date`: send buffer `AbstractVector{FT}`
- `recv_data`: recv buffer `AbstractVector{FT}`
- `send_buf_idx`: indexing array for loading send buffer from `perimeter_data`
- `recv_buf_idx`: indexing array for loading (and summing) data from recv buffer to
- `internal_elems`: internal local elements (lidx)
- `perimeter_elems`: local elements (lidx) located on process boundary
"""
struct DSSBuffer{S, G, D, A, B, VI}
"ClimaComms graph context for communication"
Expand Down
4 changes: 2 additions & 2 deletions src/Topologies/topology2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ function _Topology2D(
end
end
end
# 6).
# 6).
comm_vertex_lengths = zeros(Int, length(send_elem_pids))
ghost_vertex_neighbor_loc = Int[]
ghost_vertex_comm_idx_offset = ones(Int, length(ghost_vertex_offset))
Expand Down Expand Up @@ -492,7 +492,7 @@ function _Topology2D(
end
unique!(perimeter_elems)
internal_elems = setdiff(1:length(local_elem_gidx), perimeter_elems)
# 7).
# 7).
comm_face_lengths = zeros(Int, length(send_elem_pids))
ghost_face_neighbor_loc = Vector{Int}(undef, length(ghost_faces))
ghost_face_gcidx = zeros(Int, length(ghost_faces))
Expand Down
4 changes: 2 additions & 2 deletions test/Fields/convergence_field_integrals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ using JET

using ClimaComms
ClimaComms.@import_required_backends
using OrderedCollections
import DataStructures
using StaticArrays, IntervalSets
import ClimaCore
import ClimaCore.Utilities: PlusHalf
Expand Down Expand Up @@ -51,7 +51,7 @@ convergence_rate(err, Δh) =

@testset "Definite column integrals bycolumn" begin
FT = Float64
results = OrderedCollections.OrderedDict()
results = DataStructures.OrderedDict()
∫y_analytic = 1 - cos(1) - (0 - cos(0))
function col_field_copy(y)
col_copy = similar(y[Fields.ColumnIndex((1, 1), 1)])
Expand Down
1 change: 0 additions & 1 deletion test/Fields/unit_field.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ using JET

using ClimaComms
ClimaComms.@import_required_backends
using OrderedCollections
using StaticArrays, IntervalSets
import ClimaCore
import ClimaCore.InputOutput
Expand Down
1 change: 0 additions & 1 deletion test/Fields/utils_field_multi_broadcast_fusion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ using BenchmarkTools

using ClimaComms
ClimaComms.@import_required_backends
using OrderedCollections
using StaticArrays, IntervalSets
import ClimaCore
import ClimaCore.Utilities: PlusHalf
Expand Down
4 changes: 2 additions & 2 deletions test/Geometry/axistensor_conversion_benchmarks.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Test, StaticArrays
#! format: off
import Random, BenchmarkTools, StatsBase,
OrderedCollections, LinearAlgebra, Combinatorics, CountFlops
DataStructures, LinearAlgebra, CountFlops
using ClimaCore.Geometry:Geometry, AbstractAxis, CovariantAxis,
AxisVector, ContravariantAxis, LocalAxis, CartesianAxis, AxisTensor,
Covariant1Vector, Covariant13Vector, UVVector, UWVector, UVector,
Expand Down Expand Up @@ -150,7 +150,7 @@ compare(x::T, y::T) where {T <: AxisTensor} = compare(components(x), components(

function test_optimized_functions(::Type{FT}; print_method_info=false) where {FT}
@info "Testing optimized functions with $FT"
benchmarks = OrderedCollections.OrderedDict()
benchmarks = DataStructures.OrderedDict()
for f in (
Geometry.project,
Geometry.transform,
Expand Down
10 changes: 5 additions & 5 deletions test/Operators/finitedifference/benchmark_stencils_utils.jl
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ClimaComms.@import_required_backends
using StaticArrays, IntervalSets, LinearAlgebra
import BenchmarkTools
import StatsBase
import OrderedCollections
import DataStructures
using ClimaCore.Geometry:
import ClimaCore.DataLayouts

Expand Down Expand Up @@ -348,8 +348,8 @@ function benchmark_operators_column(bm; z_elems, helem, Nq, compile::Bool = fals
FT = bm.float_type
device = ClimaComms.device()
@show device
trials = OrderedCollections.OrderedDict()
t_min = OrderedCollections.OrderedDict()
trials = DataStructures.OrderedDict()
t_min = DataStructures.OrderedDict()

cspace = TU.ColumnCenterFiniteDifferenceSpace(FT; zelem=z_elems)
fspace = Spaces.FaceFiniteDifferenceSpace(cspace)
Expand All @@ -367,8 +367,8 @@ function benchmark_operators_sphere(bm; z_elems, helem, Nq, compile::Bool = fals
FT = bm.float_type
device = ClimaComms.device()
@show device
trials = OrderedCollections.OrderedDict()
t_min = OrderedCollections.OrderedDict()
trials = DataStructures.OrderedDict()
t_min = DataStructures.OrderedDict()

cspace = TU.CenterExtrudedFiniteDifferenceSpace(FT; zelem=z_elems, helem, Nq, horizontal_layout_type)
fspace = Spaces.FaceExtrudedFiniteDifferenceSpace(cspace)
Expand Down
2 changes: 1 addition & 1 deletion test/Operators/spectralelement/benchmark_ops.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function benchmark_all(kernel_args = setup_kernel_args(ARGS))
#! format: on
silent = true # see BenchmarkTools.@benchmark output with `silent = false`

bm = OrderedCollections.OrderedDict()
bm = DataStructures.OrderedDict()
for (k, ka) in kernels
# key = (Symbol(k), Symbol(ka))
key = Symbol(k)
Expand Down
8 changes: 4 additions & 4 deletions test/Operators/spectralelement/benchmark_times.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function get_best_times((; device, float_type))
end

function get_best_times_cpu_float64()
best_times = OrderedCollections.OrderedDict()
best_times = DataStructures.OrderedDict()
best_times[:kernel_spectral_wdiv!] = 87042.2667
best_times[:kernel_spectral_grad!] = 77839.3543
best_times[:kernel_spectral_grad_norm!] = 105859.9405
Expand All @@ -22,7 +22,7 @@ function get_best_times_cpu_float64()
return best_times
end
function get_best_times_cpu_float32()
best_times = OrderedCollections.OrderedDict()
best_times = DataStructures.OrderedDict()
best_times[:kernel_spectral_wdiv!] = 79922.8909
best_times[:kernel_spectral_grad!] = 74736.2011
best_times[:kernel_spectral_grad_norm!] = 101959.6227
Expand All @@ -35,7 +35,7 @@ function get_best_times_cpu_float32()
return best_times
end
function get_best_times_gpu_float64()
best_times = OrderedCollections.OrderedDict()
best_times = DataStructures.OrderedDict()
best_times[:kernel_spectral_wdiv!] = 21750.2493
best_times[:kernel_spectral_grad!] = 21046.113
best_times[:kernel_spectral_grad_norm!] = 53723.9003
Expand All @@ -48,7 +48,7 @@ function get_best_times_gpu_float64()
return best_times
end
function get_best_times_gpu_float32()
best_times = OrderedCollections.OrderedDict()
best_times = DataStructures.OrderedDict()
best_times[:kernel_spectral_wdiv!] = 26606.9483
best_times[:kernel_spectral_grad!] = 20715.8317
best_times[:kernel_spectral_grad_norm!] = 52673.6528
Expand Down
1 change: 0 additions & 1 deletion test/Operators/spectralelement/benchmark_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using LinearAlgebra: ×
import PrettyTables
import LinearAlgebra as LA
import OrderedCollections
import ClimaCore.DataLayouts
import ClimaCore.Operators as Operators
import ClimaCore.Domains as Domains
Expand Down

0 comments on commit 3f2adb2

Please sign in to comment.