-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove duplicate code in scaling plots, add debug prints
Update post_processing/plot_gpu_scaling_utils.jl Co-authored-by: Nat Efrat-Henrici <60049837+nefrathenrici@users.noreply.github.com>
- Loading branch information
1 parent
9c3a382
commit 0b57467
Showing
3 changed files
with
47 additions
and
38 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,37 @@ | ||
using JLD2 | ||
function get_jld2data(output_dir, job_id, s) | ||
FT = Float64 | ||
nprocs_clima_atmos = Int[] | ||
ncols_per_process = Int[] | ||
walltime_clima_atmos = FT[] | ||
found = false | ||
for foldername in readdir(output_dir) | ||
if occursin(job_id, foldername) && occursin(s, foldername) | ||
nprocs_string = split(split(foldername, s)[end], "process")[1] | ||
file = joinpath( | ||
output_dir, | ||
foldername, | ||
"output_active", | ||
"scaling_data_$(nprocs_string)_processes.jld2", | ||
) | ||
if !isfile(file) | ||
@show readdir(output_dir) | ||
@show readdir(dirname(file)) | ||
end | ||
dict = load(file) | ||
push!(nprocs_clima_atmos, Int(dict["nprocs"])) | ||
push!(ncols_per_process, Int(dict["ncols_per_process"])) | ||
push!(walltime_clima_atmos, FT(dict["walltime"])) | ||
else | ||
@show occursin(job_id, foldername) | ||
@show occursin(s, foldername) | ||
end | ||
end | ||
if !found | ||
@show readdir(output_dir) | ||
end | ||
@show nprocs_clima_atmos | ||
@show ncols_per_process | ||
@show walltime_clima_atmos | ||
return (; nprocs_clima_atmos, ncols_per_process, walltime_clima_atmos) | ||
end |
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