Evaluate memory footprints of hemera, generate process numbers in notebook

This commit is contained in:
2024-02-13 23:38:55 +01:00
parent 6a02f3bee6
commit 8bbbc72bfc
4 changed files with 90 additions and 9 deletions

View File

@ -18,23 +18,32 @@ input_file = ARGS[1]
df = CSV.read(input_file, DataFrame)
# plotting with process size as x axis
THREADS = []
THREADS = [1]
for threads in THREADS
title_string = "n-photon Compton diagram generation, $threads threads"
title_string = "n-photon Compton diagram generation"
df_filt = filter(:cpu_threads => x -> x == threads, df)
df_filt = filter(:process_name => x -> proc_to_n(x) >= 1, df_filt)
# ns -> s
df_filt.graph_gen_mean = @. df_filt.graph_gen_mean / 1e9
df_filt.graph_gen_std = @. df_filt.graph_gen_std / 1e9
df_filt.process_size = @. proc_to_n(df_filt.process_name)
# B -> MB (not MiB since the log scale is base 10)
df_filt.graph_mem = @. df_filt.graph_mem / 1e6
df_filt.graph_mem_reduced = @. df_filt.graph_mem_reduced / 1e6
@df df_filt scatter(
:process_size,
:graph_gen_mean,
yerror = :graph_gen_std,
label = "graph generation time",
df_filt.process_size = @. proc_to_n(df_filt.process_name)
l = length(df_filt.process_size)
@df df_filt scatter(:process_size, :graph_mem, label = "unreduced graph", markersize = 7)
scatter!(
df_filt[!, :process_size][1:(l - 1)],
df_filt[!, :graph_mem_reduced][1:(l - 1)],
label = "reduced graph",
markershape = :square,
markersize = 7,
)
@ -44,7 +53,41 @@ for threads in THREADS
legend = :outerbottom,
minorgrid = true,
xticks = :process_size,
yticks = [1e-3, 1e-2, 1e-1, 1e-0, 1e1],
#yticks = [1e-3, 1e-1, 1e1, 1e3],
xgrid = false,
xminorticks = false,
legendcolumns = 1,
legend_font_pointsize = 10,
size = (800, 600),
ylabel = "memory footprint (MB)",
xlabel = "process size (#)",
)
savefig("gen_memory_$(threads).pdf")
exit(0)
@df df_filt scatter(
:process_size,
:graph_gen_mean,
yerror = :graph_gen_std,
label = "graph generation time",
markersize = 7,
)
scatter!(
df_filt[!, :process_size][1:(l - 1)],
df_filt[!, :graph_elapsed_reduce][1:(l - 1)],
label = "graph reduction time",
markershape = :square,
markersize = 7,
)
plot!(
title = title_string,
yscale = :log10,
legend = :outerbottom,
minorgrid = true,
xticks = :process_size,
yticks = [1e-3, 1e-1, 1e1, 1e3],
xgrid = false,
xminorticks = false,
legendcolumns = 1,