Skip to content

Commit 4ea28e3

Browse files
committed
Fix slack-message
"$()" does not seem to be allowed in yaml
1 parent 3cac40f commit 4ea28e3

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

.buildkite/amip/pipeline.yml

-1
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,3 @@ steps:
7070
find experiments/ClimaEarth/output/amip/amip_artifacts/ -type f -name 'bias*.png' -print0 | while IFS= read -r -d '' file; do
7171
slack-upload -c "#coupler-report" -f "$$file" -m png -n "$$(basename "$$file" .png)" -x "$$(basename "$$file" .png)"
7272
done
73-
- 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"

experiments/ClimaEarth/run_amip.jl

+10-7
Original file line numberDiff line numberDiff line change
@@ -808,15 +808,18 @@ walltime_per_atmos_step = es.walltime / n_atmos_steps
808808

809809
## Save the SYPD and allocation information
810810
if ClimaComms.iamroot(comms_ctx)
811-
sypd_filename = joinpath(dir_paths.artifacts, "sypd.txt")
812-
write(sypd_filename, "$sypd")
811+
open(joinpath(dir_paths.artifacts, "sypd.txt"), "w") do sypd_filename
812+
println(sypd_filename, "$sypd")
813+
end
813814

814-
walltime_per_atmos_step_filename = joinpath(dir_paths.artifacts, "walltime_per_atmos_step.txt")
815-
write(walltime_per_atmos_step_filename, "$(walltime_per_atmos_step)")
815+
open(joinpath(dir_paths.artifacts, "walltime_per_atmos_step.txt"), "w") do walltime_per_atmos_step_filename
816+
println(walltime_per_atmos_step_filename, "$(walltime_per_atmos_step)")
817+
end
816818

817-
cpu_max_rss_GB = Utilities.show_memory_usage(comms_ctx)
818-
cpu_max_rss_filename = joinpath(dir_paths.artifacts, "max_rss_cpu.txt")
819-
write(cpu_max_rss_filename, cpu_max_rss_GB)
819+
open(joinpath(dir_paths.artifacts, "max_rss_cpu.txt"), "w") do cpu_max_rss_filename
820+
cpu_max_rss_GB = Utilities.show_memory_usage(comms_ctx)
821+
println(cpu_max_rss_filename, cpu_max_rss_GB)
822+
end
820823
end
821824

822825
#=

test/component_model_tests/climaatmos_standalone/atmos_driver.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ sypd = CA.simulated_years_per_day(es)
7171
comms_ctx = atmos_config.comms_ctx
7272
if ClimaComms.iamroot(comms_ctx)
7373
open(joinpath(output_dir, "sypd.txt"), "w") do sypd_filename
74-
write(sypd_filename, "$sypd")
74+
println(sypd_filename, "$sypd")
7575
end
7676

7777
open(joinpath(output_dir, "max_rss_cpu.txt"), "w") do cpu_max_rss_filename
7878
cpu_max_rss_GB = Utilities.show_memory_usage(comms_ctx)
79-
write(cpu_max_rss_filename, cpu_max_rss_GB)
79+
println(cpu_max_rss_filename, cpu_max_rss_GB)
8080
end
8181
end

0 commit comments

Comments
 (0)