Skip to content

Commit

Permalink
Merge pull request #2766 from CliMA/gb/fix_move
Browse files Browse the repository at this point in the history
Do not move output outside of buildkite climaatmos-ci
  • Loading branch information
Sbozzolo authored Mar 8, 2024
2 parents b29e90f + bb85916 commit f9e4838
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion examples/hybrid/driver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ if ClimaComms.iamroot(config.comms_ctx)
if path == :self_reference
make_plots(Val(Symbol(reference_job_id)), simulation.output_dir)
else

main_job_path = joinpath(path, reference_job_id)
nc_dir = joinpath(main_job_path, "nc_files")
if ispath(nc_dir)
Expand Down
2 changes: 1 addition & 1 deletion regression_tests/move_output.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ job_ids = getindex.(split.(lines, "\""), 2)
@assert count(x -> occursin("OrderedDict", x), all_lines) == length(job_ids) + 1
@assert length(job_ids) 0 # safety net

if haskey(ENV, "BUILDKITE_COMMIT") && haskey(ENV, "BUILDKITE_BRANCH")
if get(ENV, "BUILDKITE_PIPELINE_SLUG", nothing) == "climaatmos-ci"
commit = ENV["BUILDKITE_COMMIT"]
branch = ENV["BUILDKITE_BRANCH"]
# Note: cluster_data_prefix is also defined in compute_mse.jl
Expand Down
5 changes: 4 additions & 1 deletion regression_tests/self_reference_or_path.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ function sorted_dataset_folder(; dir = pwd())
end

function self_reference_or_path()
if get(ENV, "BUILDKITE_PIPELINE_SLUG", nothing) != "climaatmos-ci"
return :self_reference
end

# Note: cluster_data_prefix is also defined in move_output.jl
cluster_data_prefix = "/central/scratch/esm/slurm-buildkite/climaatmos-main"
Expand Down Expand Up @@ -86,7 +89,7 @@ function get_main_branch_buildkite_path()
# TODO: Combine this method with `self_reference_or_path`, above.
cluster_data_prefix = "/central/scratch/esm/slurm-buildkite/climaatmos-main"
if !ispath(cluster_data_prefix)
if haskey(ENV, "BUILDKITE_COMMIT") || haskey(ENV, "BUILDKITE_BRANCH")
if get(ENV, "BUILDKITE_PIPELINE_SLUG", nothing) == "climaatmos-ci"
error("No path found for comparison against main")
else
@warn "Buildkite reference data is not available locally; skipping \
Expand Down

0 comments on commit f9e4838

Please sign in to comment.