Skip to content

Commit 7c68763

Browse files
Merge pull request #3701 from CliMA/ne/config
Fix and test `TargetJobConfig`, remove duplicate config values
2 parents e5de2e1 + 9c9b30b commit 7c68763

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

config/gpu_configs/gpu_aquaplanet_dyamond_ws_1process.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ vert_diff: "DecayWithHeightDiffusion"
1717
implicit_diffusion: true
1818
approximate_linear_solve_iters: 2
1919
surface_setup: "DefaultMoninObukhov"
20-
rayleigh_sponge: true
2120
dt: "90secs"
2221
t_end: "1days"
2322
toml: [toml/longrun_aquaplanet.toml]

config/gpu_configs/gpu_aquaplanet_dyamond_ws_2process.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ vert_diff: "DecayWithHeightDiffusion"
1717
implicit_diffusion: true
1818
approximate_linear_solve_iters: 2
1919
surface_setup: "DefaultMoninObukhov"
20-
rayleigh_sponge: true
2120
dt: "90secs"
2221
t_end: "1days"
2322
toml: [toml/longrun_aquaplanet.toml]

src/compat.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,3 @@ else
9696
WallTimeInfo = ClimaUtilities.OnlineLogging.WallTimeInfo
9797
report_walltime = ClimaUtilities.OnlineLogging.report_walltime
9898
end
99-

src/solver/yaml_helper.jl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,10 @@ Given a job id string, returns the configuration for that job.
3333
Does not include the default configuration dictionary.
3434
"""
3535
function config_from_target_job(target_job)
36-
for (job_id, config) in configs_per_config_id()
37-
if job_id == target_job
38-
return config
39-
end
36+
# get(configs_per_config_id(), target_job, error("")) doesn't work for some reason
37+
for (job_id, config_tuple) in configs_per_config_id()
38+
job_id == target_job && return config_tuple.config
4039
end
41-
error("Could not find job with id $target_job")
4240
end
4341

4442
ContainerType(T) = Union{Tuple{<:T, Vararg{T}}, Vector{<:T}}

test/config.jl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,17 @@ import ClimaComms
33
ClimaComms.@import_required_backends
44
import ClimaAtmos as CA
55

6-
include(joinpath("..", "perf", "common.jl"))
6+
include(joinpath(pkgdir(CA), "perf", "common.jl"))
7+
8+
@testset "TargetJobConfig" begin
9+
dry_barowave_file =
10+
joinpath(pkgdir(CA), "config", "model_configs", "baroclinic_wave.yml")
11+
target_job_config = TargetJobConfig("baroclinic_wave")
12+
file_config = CA.AtmosConfig(dry_barowave_file)
13+
@test file_config.parsed_args == target_job_config.parsed_args
14+
@test file_config.toml_dict.data == target_job_config.toml_dict.data
15+
@test file_config.comms_ctx == target_job_config.comms_ctx
16+
end
717

818
function extract_job_ids(folder_path)
919
job_id_dict = Dict()

0 commit comments

Comments
 (0)