Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete unused code #3409

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ steps:
julia --color=yes --project=examples examples/hybrid/driver.jl --config_file $CONFIG_PATH/sphere_baroclinic_wave_conservation_ft64.yml
--job_id sphere_baroclinic_wave_conservation_ft64
artifact_paths: "sphere_baroclinic_wave_conservation_ft64/output_active/*"

- label: ":computer: baroclinic wave check conservation with sources"
command: >
julia --color=yes --project=examples examples/hybrid/driver.jl --config_file $CONFIG_PATH/sphere_baroclinic_wave_conservation_source.yml
Expand Down Expand Up @@ -352,7 +352,7 @@ steps:
artifact_paths: "aquaplanet_rhoe_equil_clearsky_tvinsol_0M_slabocean/output_active/*"
agents:
slurm_mem: 20GB

- label: ":computer: aquaplanet (ρe_tot) slabocean equilmoist allsky radiation monin_obukhov varying insolation float64"
command: >
julia --color=yes --project=examples examples/hybrid/driver.jl
Expand All @@ -361,7 +361,7 @@ steps:
artifact_paths: "aquaplanet_rhoe_equil_clearsky_tvinsol_0M_slabocean_ft64/output_active/*"
agents:
slurm_mem: 20GB

- label: ":computer: aquaplanet (ρe_tot) rcemipii with diagnostic edmf"
command: >
julia --color=yes --project=examples examples/hybrid/driver.jl
Expand Down
57 changes: 0 additions & 57 deletions reproducibility_tests/self_reference_or_path.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,60 +81,3 @@ function self_reference_or_path()
end
return path
end

"""
get_main_branch_buildkite_path()

Return the folder of the most recent buildkite run that contains a `ref_counter.jl` file,
and therefore also contains hdf5 files with output data.

This is very similar to `self_reference_or_path`, except that it always returns a path, not
`:self_reference`. Functionality could be merged in a future PR.
"""
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 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 \
comparison against main"
return ""
end
end

buildkite_paths = readdir(cluster_data_prefix; join = true)
filter!(buildkite_paths) do path
isdir(path)
end
if isempty(buildkite_paths)
@warn("no buildkite paths found")
return ""
end
sort!(
buildkite_paths;
by = f -> Dates.unix2datetime(stat(f).mtime),
rev = true,
) # most recent build first

# Find ref counters
ref_counters = -ones(Int, length(buildkite_paths))
for (i, path) in enumerate(buildkite_paths)
ref_counter_file_main = joinpath(path, "ref_counter.jl")
if isfile(ref_counter_file_main) # set ref_counter value if file exists.
ref_counters[i] =
parse(Int, first(readlines(ref_counter_file_main)))
end
end
if all(ref_counters .== -1)
@warn("No `ref_counter.jl` files found")
return ""
end

most_recent_max_counter_ind = argmax(ref_counters)
main_branch_data_path = buildkite_paths[most_recent_max_counter_ind]
@info "Comparing PR profiles against main with commit id: \
$(basename(main_branch_data_path))"
return main_branch_data_path
end
Loading