Skip to content

Commit a3c91e9

Browse files
authored
Merge pull request #1598 from CliMA/js/add-benchmarks
add prognostic EDMF benchmarks to output table
2 parents 7df0754 + 5cf0178 commit a3c91e9

File tree

2 files changed

+48
-7
lines changed

2 files changed

+48
-7
lines changed

.buildkite/benchmarks/pipeline.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ steps:
4040
slurm_gpus_per_task: 1
4141
slurm_cpus_per_task: 4
4242
slurm_ntasks: 1
43-
slurm_mem: 16GB
44-
43+
slurm_mem: 16GB
44+
4545
- label: "GPU AMIP with prognostic EDMF + 1M + integrated land (30 helems)"
4646
key: "gpu_amip_progedmf_1M_land_he30"
4747
command: "srun julia --threads=3 --color=yes --project=experiments/ClimaEarth/ experiments/ClimaEarth/run_amip.jl --config_file $BENCHMARK_CONFIG_PATH/amip_progedmf_1m_land_he30.yml --job_id gpu_amip_progedmf_1M_land_he30"
@@ -52,7 +52,7 @@ steps:
5252
slurm_gpus_per_task: 1
5353
slurm_cpus_per_task: 4
5454
slurm_ntasks: 1
55-
slurm_mem: 16GB
55+
slurm_mem: 16GB
5656

5757
- group: "GPU benchmarks"
5858
steps:
@@ -107,19 +107,29 @@ steps:
107107
slurm_cpus_per_task: 4
108108
slurm_ntasks: 2
109109
slurm_mem: 16GB
110-
110+
111111

112112
- group: "Generate output table"
113113
steps:
114114
- label: "Compare AMIP/Atmos-only with diagnostic EDMF"
115115
key: "compare_amip_climaatmos_amip_diagedmf"
116-
command: "julia --color=yes --project=experiments/ClimaEarth/ experiments/ClimaEarth/user_io/benchmarks.jl --gpu_job_id_coupled gpu_amip_diagedmf --gpu_job_id_coupled_io gpu_amip_diagedmf_io --gpu_job_id_atmos_diagedmf gpu_climaatmos_diagedmf --gpu_job_id_atmos gpu_climaatmos --build_id $BUILDKITE_BUILD_NUMBER"
116+
command: |
117+
julia --color=yes --project=experiments/ClimaEarth/ experiments/ClimaEarth/user_io/benchmarks.jl \
118+
--gpu_job_id_coupled gpu_amip_diagedmf \
119+
--gpu_job_id_coupled_io gpu_amip_diagedmf_io \
120+
--gpu_job_id_atmos_diagedmf gpu_climaatmos_diagedmf \
121+
--gpu_job_id_atmos gpu_climaatmos \
122+
--gpu_job_id_coupled_progedmf_coarse gpu_amip_progedmf_1M_land_he16 \
123+
--gpu_job_id_coupled_progedmf_fine gpu_amip_progedmf_1M_land_he30 \
124+
--build_id $BUILDKITE_BUILD_NUMBER
117125
artifact_paths: "experiments/ClimaEarth/output/compare_amip_climaatmos_amip_diagedmf/*"
118126
depends_on:
119127
- "gpu_climaatmos"
120128
- "gpu_climaatmos_diagedmf"
121129
- "gpu_amip_diagedmf"
122130
- "gpu_amip_diagedmf_io"
131+
- "gpu_amip_progedmf_1M_land_he16"
132+
- "gpu_amip_progedmf_1M_land_he30"
123133

124134
- label: ":envelope: Slack report: GPU AMIP/Atmos-only table"
125135
depends_on:

experiments/ClimaEarth/user_io/benchmarks.jl

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ function argparse_settings()
3939
help = "The name of the GPU atmos-only run we want to compare."
4040
arg_type = String
4141
default = nothing
42+
"--gpu_job_id_coupled_progedmf_coarse"
43+
help = "The name of the coarser GPU coupled with prognostic EDMF + 1M run we want to compare."
44+
arg_type = String
45+
default = nothing
46+
"--gpu_job_id_coupled_progedmf_fine"
47+
help = "The name of the finer GPU coupled with prognostic EDMF + 1M run we want to compare."
48+
arg_type = String
49+
default = nothing
4250
"--coupler_output_dir"
4351
help = "Directory to save output files."
4452
arg_type = String
@@ -73,6 +81,12 @@ function get_run_info(parsed_args, run_type)
7381
elseif run_type == "atmos"
7482
gpu_job_id = parsed_args["gpu_job_id_atmos"]
7583
mode_name = "climaatmos"
84+
elseif run_type == "coupled_progedmf_coarse"
85+
gpu_job_id = parsed_args["gpu_job_id_coupled_progedmf_coarse"]
86+
mode_name = "amip"
87+
elseif run_type == "coupled_progedmf_fine"
88+
gpu_job_id = parsed_args["gpu_job_id_coupled_progedmf_fine"]
89+
mode_name = "amip"
7690
else
7791
error("Invalid run type: $run_type")
7892
end
@@ -131,8 +145,10 @@ else
131145
end
132146

133147
# Read in run info for each of the cases we want to compare
134-
run_info_coupled = get_run_info(parsed_args, "coupled")
148+
run_info_coupled_progedmf_coarse = get_run_info(parsed_args, "coupled_progedmf_coarse")
149+
run_info_coupled_progedmf_fine = get_run_info(parsed_args, "coupled_progedmf_fine")
135150
run_info_coupled_io = get_run_info(parsed_args, "coupled_io")
151+
run_info_coupled = get_run_info(parsed_args, "coupled")
136152
run_info_atmos_diagedmf = get_run_info(parsed_args, "atmos_diagedmf")
137153
run_info_atmos = get_run_info(parsed_args, "atmos")
138154

@@ -144,6 +160,16 @@ data = [
144160
]
145161

146162
# Append data to the table for each of the cases we want to compare
163+
data = append_table_data(
164+
data,
165+
"Coupled with progedmf + 1M (16 helem)",
166+
run_info_coupled_progedmf_coarse...,
167+
)
168+
data = append_table_data(
169+
data,
170+
"Coupled with progedmf + 1M (30 helem)",
171+
run_info_coupled_progedmf_fine...,
172+
)
147173
data = append_table_data(data, "Coupled with diag. EDMF + IO", run_info_coupled_io...)
148174
data = append_table_data(data, "Coupled with diag. EDMF", run_info_coupled...)
149175
data = append_table_data(data, "Atmos with diag. EDMF", run_info_atmos_diagedmf...)
@@ -155,5 +181,10 @@ mkpath(table_output_dir)
155181
table_path = joinpath(table_output_dir, "table.txt")
156182
open(table_path, "w") do f
157183
# Output the table, including lines before and after the header
158-
PrettyTables.pretty_table(f, data, header = headers, hlines = [0, 3, 5, 7, 9, 11])
184+
PrettyTables.pretty_table(
185+
f,
186+
data,
187+
header = headers,
188+
hlines = [0, 3, 5, 7, 9, 11, 13, 15],
189+
)
159190
end

0 commit comments

Comments
 (0)