Skip to content

Commit

Permalink
Merge pull request #180 from CliMA/ck/up_deps
Browse files Browse the repository at this point in the history
Update deps and julia version
  • Loading branch information
charleskawczynski authored Jan 19, 2024
2 parents 3d600e0 + 5f1bd59 commit c5a6676
Show file tree
Hide file tree
Showing 16 changed files with 66 additions and 72 deletions.
16 changes: 8 additions & 8 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
agents:
queue: central
slurm_mem: 8G
modules: julia/1.9.3 cuda/12.2
modules: julia/1.10.0 cuda/12.2

env:
JULIA_VERSION: "1.9.3"
JULIA_VERSION: "1.10.0"
OPENBLAS_NUM_THREADS: 1
CUDA_VERSION: "12.2"
OMPI_MCA_opal_warn_on_missing_libcuda: 0
Expand Down Expand Up @@ -58,12 +58,12 @@ steps:
slurm_ntasks: 1
timeout_in_minutes: 60

- label: ":mag::rocket: Constructor flop measurements"
command:
- "julia --project=perf perf/flops.jl"
agents:
slurm_ntasks: 1
timeout_in_minutes: 60
# - label: ":mag::rocket: Constructor flop measurements"
# command:
# - "julia --project=perf perf/flops.jl"
# agents:
# slurm_ntasks: 1
# timeout_in_minutes: 60

- label: ":mag::rocket: JET tests"
command:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/CodeCov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2.2.0
- uses: actions/checkout@v4

- name: Set up Julia
uses: julia-actions/setup-julia@latest
with:
version: 1.9
version: '1.10'

- name: Test with coverage
env:
Expand All @@ -36,7 +36,7 @@ jobs:
if: success()

- name: Submit coverage
uses: codecov/codecov-action@v1.0.7
uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}}
if: success()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/DocCleanUp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: gh-pages

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/JuliaFormatter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v2.2.0
- uses: actions/checkout@v4

- uses: dorny/paths-filter@v2.9.1
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
Expand All @@ -30,7 +30,7 @@ jobs:
- uses: julia-actions/setup-julia@latest
if: steps.filter.outputs.julia_file_change == 'true'
with:
version: 1.9
version: '1.10'

- name: Apply JuliaFormatter
if: steps.filter.outputs.julia_file_change == 'true'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ jobs:
fail-fast: false
matrix:
version:
- '1.6'
- '1.7'
- '1.8'
- '1.9'
- '1.10'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
docbuild:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: 1.9
version: '1.10'
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/invalidations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-invalidations@v1
id: invs_pr

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}
- uses: julia-actions/julia-buildpkg@v1
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CreateParametersExt = "CLIMAParameters"

[compat]
DocStringExtensions = "0.8.1, 0.9"
KernelAbstractions = "0.7, 0.8, 0.9"
KernelAbstractions = "0.9"
Random = "1"
RootSolvers = "0.4"
julia = "1.6"
Expand Down
1 change: 0 additions & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
RootSolvers = "7181ea78-2dcb-4de3-ab41-2b8ab5a31e74"
Thermodynamics = "b60c26fb-14c3-4610-9d3e-2d17fe7ff00c"
UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"

[compat]
julia = "1.7"
9 changes: 3 additions & 6 deletions gpuenv/Project.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
[deps]
CLIMAParameters = "6eacf6c3-8458-43b9-ae03-caf5306d3d53"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
CUDAKernels = "72cfdca4-0801-4ab0-bf6a-d52aa10adc57"
KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
RootSolvers = "7181ea78-2dcb-4de3-ab41-2b8ab5a31e74"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"
Thermodynamics = "b60c26fb-14c3-4610-9d3e-2d17fe7ff00c"

[compat]
CLIMAParameters = "0.8"
CUDA = "3.5"
CUDAKernels = "0.3, 0.4"
KernelAbstractions = "0.7, 0.8"
CUDA = "3.5, 4, 5"
KernelAbstractions = "0.9"
RootSolvers = "0.4"
UnPack = "1.0"
julia = "1.7"
2 changes: 0 additions & 2 deletions perf/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[deps]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
CLIMAParameters = "6eacf6c3-8458-43b9-ae03-caf5306d3d53"
GFlops = "2ea8233c-34d4-5acc-88b4-02f326385bcc"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Expand All @@ -13,4 +12,3 @@ RootSolvers = "7181ea78-2dcb-4de3-ab41-2b8ab5a31e74"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Thermodynamics = "b60c26fb-14c3-4610-9d3e-2d17fe7ff00c"
UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"
3 changes: 1 addition & 2 deletions perf/common.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Test

import UnPack
import BenchmarkTools
import RootSolvers as RS

Expand All @@ -13,7 +12,7 @@ const param_set = TP.ThermodynamicsParameters(FT)

ArrayType = Array{FT}
profiles = TD.TestedProfiles.PhaseEquilProfiles(param_set, ArrayType)
UnPack.@unpack e_int, T, ρ, p, θ_liq_ice, q_tot = profiles
(; e_int, T, ρ, p, θ_liq_ice, q_tot) = profiles

function thermo_state_ρeq()
ts = TD.PhaseEquil_ρeq.(param_set, ρ, e_int, q_tot)
Expand Down
1 change: 0 additions & 1 deletion perf/common_micro_bm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import PrettyTables
import OrderedCollections
using JET
using Test
import UnPack
import BenchmarkTools

import Thermodynamics as TD
Expand Down
4 changes: 1 addition & 3 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ ReportMetrics = "c1654acf-408b-4272-96ce-66c258df8a6c"
RootSolvers = "7181ea78-2dcb-4de3-ab41-2b8ab5a31e74"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Thermodynamics = "b60c26fb-14c3-4610-9d3e-2d17fe7ff00c"
UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"

[compat]
CLIMAParameters = "0.8"
KernelAbstractions = "0.7, 0.8"
KernelAbstractions = "0.9"
RootSolvers = "0.4"
UnPack = "1.0"
julia = "1.7"
43 changes: 21 additions & 22 deletions test/relations.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Test

using UnPack
using Random
import RootSolvers as RS
using LinearAlgebra
Expand Down Expand Up @@ -69,8 +68,8 @@ compare_moisture(param_set, ts::PhaseNonEquil, q_pt::PhasePartition) = all((
_kappa_d = FT(TP.kappa_d(param_set))

profiles = TestedProfiles.PhaseEquilProfiles(param_set, ArrayType)
@unpack T, p, e_int, ρ, θ_liq_ice, phase_type = profiles
@unpack q_tot, q_liq, q_ice, q_pt, RH, e_kin, e_pot = profiles
(; T, p, e_int, ρ, θ_liq_ice, phase_type) = profiles
(; q_tot, q_liq, q_ice, q_pt, RH, e_kin, e_pot) = profiles

# Test state for thermodynamic consistency (with ideal gas law)
T_idgl = TD.air_temperature_from_ideal_gas_law.(param_set, p, ρ, q_pt)
Expand Down Expand Up @@ -503,8 +502,8 @@ end
FT = eltype(ArrayType)
param_set = TP.ThermodynamicsParameters(FT)
profiles = TestedProfiles.PhaseEquilProfiles(param_set, ArrayType)
@unpack T, p, e_int, ρ, θ_liq_ice, phase_type = profiles
@unpack q_tot, q_liq, q_ice, q_pt, RH, e_kin, e_pot = profiles
(; T, p, e_int, ρ, θ_liq_ice, phase_type) = profiles
(; q_tot, q_liq, q_ice, q_pt, RH, e_kin, e_pot) = profiles

RH_sat_mask = or.(RH .> 1, RH .≈ 1)
RH_unsat_mask = .!or.(RH .> 1, RH .≈ 1)
Expand Down Expand Up @@ -879,8 +878,8 @@ end
FT = eltype(ArrayType)
param_set = TP.ThermodynamicsParameters(FT)
profiles = TestedProfiles.PhaseEquilProfiles(param_set, ArrayType)
@unpack T, p, e_int, ρ, θ_liq_ice, phase_type = profiles
@unpack q_tot, q_liq, q_ice, q_pt, RH, e_kin, e_pot = profiles
(; T, p, e_int, ρ, θ_liq_ice, phase_type) = profiles
(; q_tot, q_liq, q_ice, q_pt, RH, e_kin, e_pot) = profiles

@test_throws ErrorException TD.saturation_adjustment.(
RS.NewtonsMethod,
Expand Down Expand Up @@ -989,8 +988,8 @@ end
param_set = TP.ThermodynamicsParameters(FT)

profiles = TestedProfiles.PhaseDryProfiles(param_set, ArrayType)
@unpack T, p, e_int, h, ρ, θ_liq_ice, phase_type = profiles
@unpack q_tot, q_liq, q_ice, q_pt, RH, e_kin, e_pot = profiles
(; T, p, e_int, h, ρ, θ_liq_ice, phase_type) = profiles
(; q_tot, q_liq, q_ice, q_pt, RH, e_kin, e_pot) = profiles

# PhaseDry
ts = PhaseDry.(param_set, e_int, ρ)
Expand Down Expand Up @@ -1051,8 +1050,8 @@ end


profiles = TestedProfiles.PhaseEquilProfiles(param_set, ArrayType)
@unpack T, p, e_int, h, ρ, θ_liq_ice, phase_type = profiles
@unpack q_tot, q_liq, q_ice, q_pt, RH, e_kin, e_pot = profiles
(; T, p, e_int, h, ρ, θ_liq_ice, phase_type) = profiles
(; q_tot, q_liq, q_ice, q_pt, RH, e_kin, e_pot) = profiles

# PhaseEquil
ts =
Expand Down Expand Up @@ -1266,8 +1265,8 @@ end
@test all(compare_moisture.(param_set, ts, q_pt))

profiles = TestedProfiles.PhaseEquilProfiles(param_set, ArrayType)
@unpack T, p, e_int, ρ, θ_liq_ice, phase_type = profiles
@unpack q_tot, q_liq, q_ice, q_pt, RH, e_kin, e_pot = profiles
(; T, p, e_int, ρ, θ_liq_ice, phase_type) = profiles
(; q_tot, q_liq, q_ice, q_pt, RH, e_kin, e_pot) = profiles

# Test that relative humidity is 1 for saturated conditions
q_sat = q_vap_saturation.(param_set, T, ρ, Ref(phase_type))
Expand Down Expand Up @@ -1349,8 +1348,8 @@ end
param_set = TP.ThermodynamicsParameters(FT)

profiles = TestedProfiles.PhaseDryProfiles(param_set, ArrayType)
@unpack T, p, e_int, ρ, θ_liq_ice, phase_type = profiles
@unpack q_tot, q_liq, q_ice, q_pt, RH, e_kin, e_pot = profiles
(; T, p, e_int, ρ, θ_liq_ice, phase_type) = profiles
(; q_tot, q_liq, q_ice, q_pt, RH, e_kin, e_pot) = profiles

θ_dry = dry_pottemp.(param_set, T, ρ)
ts_dry = PhaseDry.(param_set, e_int, ρ)
Expand All @@ -1360,8 +1359,8 @@ end
ts_dry_pθ = PhaseDry_pθ.(param_set, p, θ_dry)

profiles = TestedProfiles.PhaseEquilProfiles(param_set, ArrayType)
@unpack T, p, e_int, ρ, θ_liq_ice, phase_type = profiles
@unpack q_tot, q_liq, q_ice, q_pt, RH, e_kin, e_pot = profiles
(; T, p, e_int, ρ, θ_liq_ice, phase_type) = profiles
(; q_tot, q_liq, q_ice, q_pt, RH, e_kin, e_pot) = profiles

ρu = FT[1.0, 2.0, 3.0]
@test typeof.(internal_energy.(ρ, ρ .* e_int, Ref(ρu), e_pot)) ==
Expand Down Expand Up @@ -1489,8 +1488,8 @@ end
FT = eltype(ArrayType)
param_set = TP.ThermodynamicsParameters(FT)
profiles = TestedProfiles.PhaseEquilProfiles(param_set, ArrayType)
@unpack T, p, e_int, ρ, θ_liq_ice, phase_type = profiles
@unpack q_tot, q_liq, q_ice, q_pt, RH, e_kin, e_pot = profiles
(; T, p, e_int, ρ, θ_liq_ice, phase_type) = profiles
(; q_tot, q_liq, q_ice, q_pt, RH, e_kin, e_pot) = profiles

# PhasePartition test is noisy, so do this only once:
ts_dry = PhaseDry(param_set, first(e_int), first(ρ))
Expand Down Expand Up @@ -1657,7 +1656,7 @@ end
FT = eltype(ArrayType)
param_set = TP.ThermodynamicsParameters(FT)
profiles = TestedProfiles.PhaseEquilProfiles(param_set, ArrayType)
@unpack T, q_pt, z, phase_type = profiles
(; T, q_pt, z, phase_type) = profiles
@test all(z .≈ (nt.z for nt in profiles))
@test all(T .≈ (nt.T for nt in profiles))
@test all(getproperty.(q_pt, :tot) .≈ (nt.q_pt.tot for nt in profiles))
Expand All @@ -1677,7 +1676,7 @@ end
FT = eltype(ArrayType)
param_set = TP.ThermodynamicsParameters(FT)
profiles = TestedProfiles.PhaseEquilProfiles(param_set, ArrayType)
@unpack p, ρ, e_int, h, θ_liq_ice, q_tot, T, phase_type = profiles
(; p, ρ, e_int, h, θ_liq_ice, q_tot, T, phase_type) = profiles
T_guess = T .+ (FT(0.2) .* randn(FT, length(T)))
args = (q_tot, 40, FT(1e-1))
ts =
Expand Down Expand Up @@ -1714,7 +1713,7 @@ TD.solution_type() = RS.VerboseSolution()
FT = eltype(ArrayType)
param_set = TP.ThermodynamicsParameters(FT)
profiles = TestedProfiles.PhaseEquilProfiles(param_set, ArrayType)
@unpack ρ, e_int, q_tot = profiles
(; ρ, e_int, q_tot) = profiles
ts = PhaseEquil_ρeq.(param_set, ρ, e_int, q_tot)
data = TD.DataCollection.get_data()
TD.DataCollection.print_summary(data)
Expand Down
Loading

0 comments on commit c5a6676

Please sign in to comment.