-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cb5ce32
commit 53d8bb4
Showing
56 changed files
with
955 additions
and
1,135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
## ClimaCoupler Benchmarks Pipeline | ||
|
||
### Purpose | ||
The goal of the benchmarks pipeline is to have concrete comparisons between | ||
analogous simulations of different setups and on different architectures. | ||
This allows us to compare things like performance and allocations across | ||
atmosphere-only vs coupled runs, and on CPU vs GPU. | ||
|
||
This pipeline is triggered manually rather than on a schedule, so that we | ||
can monitor the various metrics after specific changes made to the code. | ||
|
||
### Simulation Setups | ||
#### All simulations | ||
- Timestep: 120 seconds | ||
- Horizontal resolution: 30 spectral elements (~110km) | ||
- Vertical resolution: 63 levels | ||
- Config setup duplicated from ClimaAtmos.jl v0.23.0 | ||
[gpu_aquaplanet_diagedmf.yml](https://github.com/CliMA/ClimaAtmos.jl/blob/v0.23.0/config/gpu_configs/gpu_aquaplanet_diagedmf.yml), | ||
with minor tweaks | ||
|
||
#### CPU ClimaAtmos with diagnostic EDMF | ||
- Atmosphere-only simulation | ||
- Run on 64 CPU threads | ||
|
||
#### CPU AMIP with diagnostic EDMF | ||
- ClimaAtmos coupled to ClimaLand bucket model, with prescribed sea surface | ||
temperature and sea ice | ||
- Run on 64 CPU threads | ||
|
||
#### GPU ClimaAtmos with diagnostic EDMF | ||
- Atmosphere-only simulation | ||
- Run on 4 A100 GPUs sharing 1 node | ||
|
||
#### GPU AMIP with diagnostic EDMF | ||
- ClimaAtmos coupled to ClimaLand bucket model, with prescribed sea surface | ||
temperature and sea ice | ||
- Run on 4 A100 GPUs sharing 1 node | ||
|
||
### Comparison Metrics | ||
- Simulated years per day (SYPD): The number of years of simulation time we | ||
can run in 1 day of walltime | ||
- CPU simulation object allocations: The allocations in GB of the simulation | ||
object, which contains everything needed to run the simulation. | ||
In the atmosphere-only case, this is the `AtmosSimulation` object. | ||
In the coupled case, this is the `CoupledSimulation` object, which includes | ||
all of the component models, coupler fields, and auxiliary objects. More | ||
information on this object can be found in the `Interfacer` docs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
agents: | ||
queue: clima | ||
slurm_time: 24:00:00 | ||
modules: common | ||
|
||
env: | ||
JULIA_NVTX_CALLBACKS: gc | ||
OPENBLAS_NUM_THREADS: 1 | ||
OMPI_MCA_opal_warn_on_missing_libcuda: 0 | ||
SLURM_KILL_BAD_EXIT: 1 | ||
SLURM_GRES_FLAGS: "allow-task-sharing" | ||
BENCHMARK_CONFIG_PATH: "config/benchmark_configs" | ||
|
||
steps: | ||
- label: "init :GPU:" | ||
key: "init_gpu_env" | ||
command: | ||
- echo "--- Instantiate experiments/AMIP" | ||
- julia --project=experiments/AMIP -e 'using Pkg; Pkg.instantiate(;verbose=true)' | ||
- julia --project=experiments/AMIP -e 'using Pkg; Pkg.precompile()' | ||
- julia --project=experiments/AMIP -e 'using Pkg; Pkg.status()' | ||
|
||
- echo "--- Instantiate test env" | ||
- "julia --project=test/ -e 'using Pkg; Pkg.develop(path=\".\")'" | ||
- "julia --project=test/ -e 'using Pkg; Pkg.instantiate(;verbose=true)'" | ||
- "julia --project=test/ -e 'using Pkg; Pkg.precompile()'" | ||
- "julia --project=test/ -e 'using Pkg; Pkg.status()'" | ||
|
||
- echo "--- Download artifacts" | ||
- "julia --project=artifacts -e 'using Pkg; Pkg.instantiate(;verbose=true)'" | ||
- "julia --project=artifacts -e 'using Pkg; Pkg.precompile()'" | ||
- "julia --project=artifacts -e 'using Pkg; Pkg.status()'" | ||
- "julia --project=artifacts artifacts/download_artifacts.jl" | ||
|
||
agents: | ||
slurm_gpus: 1 | ||
slurm_cpus_per_task: 8 | ||
env: | ||
JULIA_NUM_PRECOMPILE_TASKS: 8 | ||
JULIA_MAX_NUM_PRECOMPILE_FILES: 50 | ||
|
||
- wait | ||
|
||
- group: "CPU benchmarks" | ||
steps: | ||
- label: "CPU ClimaAtmos with diagnostic EDMF" | ||
key: "climaatmos_diagedmf" | ||
command: "srun julia --color=yes --project=test/ test/component_model_tests/climaatmos_standalone/atmos_driver.jl --config_file $BENCHMARK_CONFIG_PATH/climaatmos_diagedmf.yml" | ||
artifact_paths: "experiments/AMIP/output/climaatmos/climaatmos_diagedmf_artifacts/*" | ||
env: | ||
BUILD_HISTORY_HANDLE: "" | ||
CLIMACOMMS_DEVICE: "CPU" | ||
agents: | ||
slurm_ntasks_per_node: 64 | ||
slurm_nodes: 1 | ||
slurm_mem_per_cpu: 4GB | ||
|
||
- label: "CPU AMIP with diagnostic EDMF" | ||
key: "amip_diagedmf" | ||
command: "srun julia --color=yes --project=experiments/AMIP/ experiments/AMIP/coupler_driver.jl --config_file $BENCHMARK_CONFIG_PATH/amip_diagedmf.yml" | ||
artifact_paths: "experiments/AMIP/output/amip/amip_diagedmf_artifacts/*" | ||
env: | ||
BUILD_HISTORY_HANDLE: "" | ||
CLIMACOMMS_DEVICE: "CPU" | ||
agents: | ||
slurm_ntasks_per_node: 64 | ||
slurm_nodes: 1 | ||
slurm_mem_per_cpu: 4GB | ||
|
||
- group: "GPU benchmarks" | ||
steps: | ||
- label: "GPU ClimaAtmos with diagnostic EDMF" | ||
key: "gpu_climaatmos_diagedmf" | ||
command: "srun julia --threads=3 --color=yes --project=test/ test/component_model_tests/climaatmos_standalone/atmos_driver.jl --config_file $BENCHMARK_CONFIG_PATH/gpu_climaatmos_diagedmf.yml" | ||
artifact_paths: "experiments/AMIP/output/climaatmos/gpu_climaatmos_diagedmf_artifacts/*" | ||
agents: | ||
slurm_gpus_per_task: 1 | ||
slurm_cpus_per_task: 4 | ||
slurm_ntasks: 2 | ||
slurm_mem: 16GB | ||
|
||
- label: "GPU AMIP with diagnostic EDMF" | ||
key: "gpu_amip_diagedmf" | ||
command: "srun julia --threads=3 --color=yes --project=experiments/AMIP/ experiments/AMIP/coupler_driver.jl --config_file $BENCHMARK_CONFIG_PATH/gpu_amip_diagedmf.yml" | ||
artifact_paths: "experiments/AMIP/output/amip/gpu_amip_diagedmf_artifacts/*" | ||
agents: | ||
slurm_gpus_per_task: 1 | ||
slurm_cpus_per_task: 4 | ||
slurm_ntasks: 2 | ||
slurm_mem: 16GB | ||
|
||
- group: "Generate output table" | ||
steps: | ||
- label: "Compare AMIP/Atmos-only with diagnostic EDMF" | ||
key: "compare_amip_climaatmos_amip_diagedmf" | ||
command: "julia --color=yes --project=experiments/AMIP/ experiments/AMIP/user_io/benchmarks.jl --cpu_run_name_coupled amip_diagedmf --cpu_run_name_atmos climaatmos_diagedmf --gpu_run_name_coupled gpu_amip_diagedmf --gpu_run_name_atmos gpu_climaatmos_diagedmf --mode_name amip --build_id $BUILDKITE_BUILD_NUMBER" | ||
artifact_paths: "experiments/AMIP/output/compare_amip_climaatmos_amip_diagedmf/*" | ||
depends_on: | ||
- "climaatmos_diagedmf" | ||
- "amip_diagedmf" | ||
- "gpu_climaatmos_diagedmf" | ||
- "gpu_amip_diagedmf" | ||
|
||
- label: ":envelope: Slack report: CPU/GPU AMIP/Atmos-only table" | ||
depends_on: | ||
- "compare_amip_climaatmos_amip_diagedmf" | ||
command: | ||
- slack-upload -c "#coupler-report" -f experiments/AMIP/output/compare_amip_climaatmos_amip_diagedmf/table.txt -m txt -n compare_amip_climaatmos_amip_diagedmf_table -x "Coupler CPU/GPU Comparison Table" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FLOAT_TYPE: "Float32" | ||
anim: false | ||
atmos_config_file: "config/gpu_configs/gpu_aquaplanet_diagedmf.yml" | ||
dt_cpl: 120 | ||
dt_save_state_to_disk: "Inf" | ||
dt_save_to_sol: "Inf" | ||
energy_check: false | ||
job_id: "amip_diagedmf" | ||
land_albedo_type: "map_temporal" | ||
mode_name: "amip" | ||
mono_surface: false | ||
monthly_checkpoint: false | ||
run_name: "amip_diagedmf" | ||
start_date: "19790301" | ||
t_end: "12hours" | ||
turb_flux_partition: "CombinedStateFluxes" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FLOAT_TYPE: "Float32" | ||
approximate_linear_solve_iters: 2 | ||
dt: 120secs | ||
dt_cloud_fraction: 1hours | ||
dt_rad: 1hours | ||
dt_save_state_to_disk: "Inf" | ||
dt_save_to_sol: "Inf" | ||
dz_bottom: 30.0 | ||
dz_top: 3000.0 | ||
edmfx_detr_model: "Generalized" | ||
edmfx_entr_model: "Generalized" | ||
edmfx_nh_pressure: true | ||
edmfx_sgs_diffusive_flux: true | ||
edmfx_sgs_mass_flux: true | ||
edmfx_upwinding: first_order | ||
h_elem: 30 | ||
idealized_insolation: false | ||
implicit_diffusion: true | ||
job_id: "climaatmos_diagedmf" | ||
moist: equil | ||
output_default_diagnostics: false | ||
precip_model: 0M | ||
prognostic_tke: true | ||
rad: allskywithclear | ||
surface_setup: DefaultMoninObukhov | ||
t_end: 12hours | ||
toml: [toml/diagnostic_edmfx_box.toml] | ||
turbconv: diagnostic_edmfx | ||
z_elem: 63 | ||
z_max: 55000.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FLOAT_TYPE: "Float32" | ||
anim: false | ||
atmos_config_file: "config/gpu_configs/gpu_aquaplanet_diagedmf.yml" | ||
dt_cpl: 120 | ||
dt_save_state_to_disk: "Inf" | ||
dt_save_to_sol: "Inf" | ||
energy_check: false | ||
job_id: "gpu_amip_diagedmf" | ||
land_albedo_type: "map_temporal" | ||
mode_name: "amip" | ||
mono_surface: false | ||
monthly_checkpoint: false | ||
run_name: "gpu_amip_diagedmf" | ||
start_date: "19790301" | ||
t_end: "12hours" | ||
turb_flux_partition: "CombinedStateFluxes" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FLOAT_TYPE: "Float32" | ||
approximate_linear_solve_iters: 2 | ||
dt: 120secs | ||
dt_cloud_fraction: 1hours | ||
dt_rad: 1hours | ||
dt_save_state_to_disk: "Inf" | ||
dt_save_to_sol: "Inf" | ||
dz_bottom: 30.0 | ||
dz_top: 3000.0 | ||
edmfx_detr_model: "Generalized" | ||
edmfx_entr_model: "Generalized" | ||
edmfx_nh_pressure: true | ||
edmfx_sgs_diffusive_flux: true | ||
edmfx_sgs_mass_flux: true | ||
edmfx_upwinding: first_order | ||
h_elem: 30 | ||
idealized_insolation: false | ||
implicit_diffusion: true | ||
job_id: "gpu_climaatmos_diagedmf" | ||
moist: equil | ||
output_default_diagnostics: false | ||
precip_model: 0M | ||
prognostic_tke: true | ||
rad: allskywithclear | ||
surface_setup: DefaultMoninObukhov | ||
t_end: 12hours | ||
toml: [toml/diagnostic_edmfx_box.toml] | ||
turbconv: diagnostic_edmfx | ||
z_elem: 63 | ||
z_max: 55000.0 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.