From bf8038c2a1b117f24b867ff23cb4fa0739ce44e8 Mon Sep 17 00:00:00 2001 From: kmdeck Date: Tue, 27 Aug 2024 10:41:22 -0700 Subject: [PATCH] fix buildkite --- .buildkite/pipeline.yml | 24 +++++++++++-------- .../performance/profile_allocations.jl | 1 + test/standalone/Soil/climate_drivers.jl | 4 ++-- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index d6f435a180..2cb42b1ded 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -26,7 +26,7 @@ steps: - "julia --project=.buildkite -e 'using Pkg; Pkg.status()'" - echo "--- Instantiate test" - - "julia --project=test -e 'using Pkg; Pkg.develop(;path=\".\"); Pkg.instantiate(;verbose=true)'" + - "julia --project=test -e 'using Pkg; Pkg.develop(;path=\".\"); Pkg.add(\"MPI\"); Pkg.add(\"CUDA\"); Pkg.instantiate(;verbose=true)'" - "julia --project=test -e 'using Pkg; Pkg.status()'" - echo "--- Instantiate lib/ClimaLandSimulations" @@ -63,15 +63,6 @@ steps: command: "julia --color=yes --project=.buildkite experiments/standalone/Soil/richards_comparison.jl" artifact_paths: "experiments/standalone/Soil/cpu/comparison*png" - - label: "Richards comparison to Bonan: GPU" - command: "julia --color=yes --project=.buildkite experiments/standalone/Soil/richards_comparison.jl" - artifact_paths: "experiments/standalone/Soil/gpu/comparison*png" - agents: - slurm_ntasks: 1 - slurm_gres: "gpu:1" - env: - CLIMACOMMS_DEVICE: "CUDA" - - label: "vaira_test" command: "julia --color=yes --project=.buildkite experiments/integrated/fluxnet/run_fluxnet.jl US-Var" artifact_paths: "experiments/integrated/fluxnet/US-Var/out/*png" @@ -134,6 +125,15 @@ steps: env: CLIMACOMMS_DEVICE: "CUDA" + - label: "Richards comparison to Bonan: GPU" + command: "julia --color=yes --project=.buildkite experiments/standalone/Soil/richards_comparison.jl" + artifact_paths: "experiments/standalone/Soil/gpu/comparison*png" + agents: + slurm_ntasks: 1 + slurm_gres: "gpu:1" + env: + CLIMACOMMS_DEVICE: "CUDA" + - group: "ClimaLandSimulations" steps: - label: "Ozark figures Makie" @@ -173,9 +173,13 @@ steps: agents: slurm_ntasks: 1 slurm_gres: "gpu:p100:1" + env: + CLIMACOMMS_DEVICE: "CUDA" - label: "soil/canopy lsm performance on GPU" command: "julia --color=yes --project=.buildkite experiments/integrated/performance/profile_allocations.jl" + env: + CLIMACOMMS_DEVICE: "CUDA" agents: slurm_ntasks: 1 slurm_gres: "gpu:p100:1" diff --git a/experiments/integrated/performance/profile_allocations.jl b/experiments/integrated/performance/profile_allocations.jl index 0236b9248f..88f1aecdce 100644 --- a/experiments/integrated/performance/profile_allocations.jl +++ b/experiments/integrated/performance/profile_allocations.jl @@ -4,6 +4,7 @@ using ClimaCore using Dates using Insolation import ClimaComms +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaUtilities.TimeVaryingInputs: TimeVaryingInput using ClimaLand diff --git a/test/standalone/Soil/climate_drivers.jl b/test/standalone/Soil/climate_drivers.jl index a44f515a3c..bf056e7624 100644 --- a/test/standalone/Soil/climate_drivers.jl +++ b/test/standalone/Soil/climate_drivers.jl @@ -298,11 +298,11 @@ for FT in (Float32, Float64) r_ae = conditions.r_ae expected_water_flux = @. FT(precip(t)) .+ conditions.vapor_flux * (1 - f_ice) * r_ae / (r_soil + r_ae) - @test computed_water_flux == expected_water_flux + @test parent(computed_water_flux) ≈ parent(expected_water_flux) expected_energy_flux = @. R_n + conditions.lhf * r_ae / (r_soil + r_ae) + conditions.shf - @test computed_energy_flux == expected_energy_flux + @test parent(computed_energy_flux) ≈ parent(expected_energy_flux) end end end