Skip to content

Commit

Permalink
fix buildkite
Browse files Browse the repository at this point in the history
  • Loading branch information
kmdeck committed Oct 3, 2024
1 parent f780e36 commit 81b5536
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 27 deletions.
36 changes: 20 additions & 16 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -67,15 +67,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"
Expand Down Expand Up @@ -134,7 +125,16 @@ steps:
artifact_paths: "experiments/standalone/Soil/artifacts/gpu/*png"
agents:
slurm_ntasks: 1
slurm_gres: "gpu:1"
slurm_gpus: 1
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_gpus: 1
env:
CLIMACOMMS_DEVICE: "CUDA"

Expand Down Expand Up @@ -176,21 +176,25 @@ steps:
command: "julia --color=yes --project=test test/runtests.jl"
agents:
slurm_ntasks: 1
slurm_gres: "gpu:p100:1"
slurm_gpus: 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"
slurm_gpus: 1
artifact_paths: "experiments/integrated/performance/flame*html"

- label: "Global Bucket on GPU (functional albedo)"
key: "global_bucket_function_gpu"
command: "julia --color=yes --project=.buildkite experiments/standalone/Bucket/global_bucket_function.jl"
agents:
slurm_ntasks: 1
slurm_gres: "gpu:p100:1"
slurm_gpus: 1
env:
CLIMACOMMS_DEVICE: "CUDA"
artifact_paths: "experiments/standalone/Bucket/artifacts/*gpu*"
Expand All @@ -200,7 +204,7 @@ steps:
command: "julia --color=yes --project=.buildkite experiments/standalone/Bucket/bucket_era5.jl"
agents:
slurm_ntasks: 1
slurm_gres: "gpu:p100:1"
slurm_gpus: 1
env:
CLIMACOMMS_DEVICE: "CUDA"
artifact_paths: "experiments/standalone/Bucket/artifacts_staticmap/*gpu*"
Expand All @@ -210,7 +214,7 @@ steps:
command: "julia --color=yes --project=.buildkite experiments/standalone/Bucket/global_bucket_temporalmap.jl"
agents:
slurm_ntasks: 1
slurm_gres: "gpu:p100:1"
slurm_gpus: 1
env:
CLIMACOMMS_DEVICE: "CUDA"
artifact_paths: "experiments/standalone/Bucket/artifacts_temporalmap/*gpu*"
Expand Down
6 changes: 3 additions & 3 deletions experiments/integrated/global/global_soil_canopy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ function zenith_angle(
start_date;
latitude = ClimaCore.Fields.coordinate_field(surface_space).lat,
longitude = ClimaCore.Fields.coordinate_field(surface_space).long,
insol_params::Insolation.Parameters.InsolationParameters{FT} = earth_param_set.insol_params,
) where {FT}
insol_params::Insolation.Parameters.InsolationParameters{_FT} = earth_param_set.insol_params,
) where {_FT}
# This should be time in UTC
current_datetime = start_date + Dates.Second(round(t))

# Orbital Data uses Float64, so we need to convert to our sim FT
d, δ, η_UTC =
FT.(
_FT.(
Insolation.helper_instantaneous_zenith_angle(
current_datetime,
start_date,
Expand Down
10 changes: 6 additions & 4 deletions experiments/integrated/performance/profile_allocations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -62,8 +63,9 @@ function set_initial_conditions(land, t0)
)

for i in 1:2
S_l = S_l_ini[i]
Y.canopy.hydraulics.ϑ_l.:($i) .=
augmented_liquid_fraction.(canopy_params.ν, S_l_ini[i])
augmented_liquid_fraction.(canopy_params.ν, S_l)
end

Y.canopy.energy.T = FT(297.5)
Expand Down Expand Up @@ -137,14 +139,14 @@ function zenith_angle(
t,
start_date;
cd_field = sfc_cds,
insol_params::Insolation.Parameters.InsolationParameters{FT} = earth_param_set.insol_params,
) where {FT}
insol_params::Insolation.Parameters.InsolationParameters{_FT} = earth_param_set.insol_params,
) where {_FT}
# This should be time in UTC
current_datetime = start_date + Dates.Second(round(t))

# Orbital Data uses Float64, so we need to convert to our sim FT
d, δ, η_UTC =
FT.(
_FT.(
Insolation.helper_instantaneous_zenith_angle(
current_datetime,
start_date,
Expand Down
1 change: 0 additions & 1 deletion ext/CreateParametersExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ function LP.LandParameters(toml_dict::CP.AbstractTOMLDict)
insol_params,
)
end
Base.broadcastable(ps::LP.LandParameters) = tuple(ps)

"""
AutotrophicRespirationParameters(FT; kwargs...)
Expand Down
1 change: 1 addition & 0 deletions src/shared_utilities/Parameters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Base.@kwdef struct LandParameters{FT, TP, SFP, IP} <: ALP
end

Base.eltype(::LandParameters{FT}) where {FT} = FT
Base.broadcastable(ps::LandParameters) = tuple(ps)

# wrapper methods:
P_ref(ps::ALP) = ps.MSLP
Expand Down
6 changes: 3 additions & 3 deletions src/standalone/Vegetation/radiation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct ConstantGFunction{FT} <: AbstractGFunction{FT}
end

# Make the ConstantGFunction broadcastable
Base.broadcastable(G::ConstantGFunction) = Ref(G)
Base.broadcastable(G::ConstantGFunction) = tuple(G)

"""
CLMGFunction
Expand All @@ -38,7 +38,7 @@ struct CLMGFunction{FT} <: AbstractGFunction{FT}
end

# Make the CLMGFunction broadcastable
Base.broadcastable(G::CLMGFunction) = Ref(G)
Base.broadcastable(G::CLMGFunction) = tuple(G)

"""
BeerLambertParameters{FT <: AbstractFloat}
Expand Down Expand Up @@ -106,7 +106,7 @@ Base.@kwdef struct TwoStreamParameters{
"Typical wavelength per NIR photon (m)"
λ_γ_NIR::FT
"Number of layers to partition the canopy into when integrating the
absorption over the canopy vertically. Unrelated to the number of layers in
absorption over the canopy vertically. Unrelated to the number of layers in
the vertical discretization of the canopy for the plant hydraulics model.
(Constant, and should eventually move to ClimaParams)"
n_layers::UInt64
Expand Down

0 comments on commit 81b5536

Please sign in to comment.