diff --git a/lab06/HPC-Lab-06.pdf b/lab06/HPC-Lab-06.pdf index a313bc2..f8d123b 100644 Binary files a/lab06/HPC-Lab-06.pdf and b/lab06/HPC-Lab-06.pdf differ diff --git a/lab06/diff.png b/lab06/diff.png new file mode 100644 index 0000000..e2b0d09 Binary files /dev/null and b/lab06/diff.png differ diff --git a/lab06/dyn.png b/lab06/dyn.png new file mode 100644 index 0000000..f558cd7 Binary files /dev/null and b/lab06/dyn.png differ diff --git a/lab06/plot_scaling.py b/lab06/plot_scaling.py new file mode 100644 index 0000000..2bf1ce7 --- /dev/null +++ b/lab06/plot_scaling.py @@ -0,0 +1,36 @@ +import json +import math +import matplotlib.pyplot as plt +import pandas + +# Path to the benchmark results JSON +plot_diff = "./results/diff_theads.csv" +plot_dyn = "./results/dyn_n.csv" + + +data_diff = pandas.read_csv(plot_diff) +data_dyn = pandas.read_csv(plot_dyn) + +plt.figure(figsize=(8, 5)) +plt.plot( + data_diff["threads"], + data_diff["time"], + color="blue", +) +plt.xlabel("threads") +plt.ylabel("time") +plt.grid(True) +plt.tight_layout() +plt.savefig("diff.png") + +plt.figure(figsize=(8, 5)) +plt.plot( + data_dyn["max_n"], + data_dyn["time"], + color="red", +) +plt.xlabel("n") +plt.ylabel("time") +plt.grid(True) +plt.tight_layout() +plt.savefig("dyn.png") diff --git a/lab06/results/diff_theads.csv b/lab06/results/diff_theads.csv index f4b126a..6e44264 100644 --- a/lab06/results/diff_theads.csv +++ b/lab06/results/diff_theads.csv @@ -1,13 +1,13 @@ threads,max_n,time -1,10000000,374.345 -2,10000000,617.139 -3,10000000,742.098 -4,10000000,839.706 -5,10000000,931.158 -6,10000000,947.318 -7,10000000,995.98 -8,10000000,1009.99 -9,10000000,1102.99 -10,10000000,1072.84 -11,10000000,1127.79 -12,10000000,1134.81 +1,10000000,372.132 +2,10000000,597.529 +3,10000000,970.832 +4,10000000,1073.46 +5,10000000,1227.53 +6,10000000,1275.92 +7,10000000,1373.25 +8,10000000,1367.9 +9,10000000,1402.15 +10,10000000,1471.25 +11,10000000,1475.36 +12,10000000,1520.45