Skip to content

Commit

Permalink
Merge pull request #929 from CliMA/gb/walltime
Browse files Browse the repository at this point in the history
Add walltime per atmos step
  • Loading branch information
Sbozzolo committed Aug 15, 2024
2 parents f3c6840 + 7671978 commit fec0d6f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .buildkite/amip/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,4 @@ steps:
find experiments/ClimaEarth/output/amip/amip_artifacts/ -type f -name 'bias*.png' -print0 | while IFS= read -r -d '' file; do
slack-upload -c "#coupler-report" -f "$$file" -m png -n "$$(basename "$$file" .png)" -x "$$(basename "$$file" .png)"
done
- SYPD="$(cat experiments/ClimaEarth/output/amip/amip_artifacts/sypd.txt)"; WALL="$(cat experiments/ClimaEarth/output/amip/amip_artifacts/walltime_per_atmos_step.txt)"; slack-message -c "#coupler-report" -x "SYPD: $SYPD Walltime per Atmos step: $WALL"
6 changes: 6 additions & 0 deletions experiments/ClimaEarth/run_amip.jl
Original file line number Diff line number Diff line change
Expand Up @@ -836,13 +836,19 @@ ClimaComms.iamroot(comms_ctx) && @show(walltime)
## Use ClimaAtmos calculation to show the simulated years per day of the simulation (SYPD)
es = CA.EfficiencyStats(tspan, walltime)
sypd = CA.simulated_years_per_day(es)
n_atmos_steps = atmos_sim.integrator.step
walltime_per_atmos_step = es.walltime / n_atmos_steps
@info "SYPD: $sypd"
@info "Walltime per Atmos step: $(walltime_per_atmos_step)"

## Save the SYPD and allocation information
if ClimaComms.iamroot(comms_ctx)
sypd_filename = joinpath(dir_paths.artifacts, "sypd.txt")
write(sypd_filename, "$sypd")

walltime_per_atmos_step_filename = joinpath(dir_paths.artifacts, "walltime_per_atmos_step.txt")
write(walltime_per_atmos_step_filename, "$(walltime_per_atmos_step)")

cpu_max_rss_GB = Utilities.show_memory_usage(comms_ctx)
cpu_max_rss_filename = joinpath(dir_paths.artifacts, "max_rss_cpu.txt")
write(cpu_max_rss_filename, cpu_max_rss_GB)
Expand Down

0 comments on commit fec0d6f

Please sign in to comment.