diff --git a/lab10/jacobi/plot_res.py b/lab10/jacobi/plot_res.py new file mode 100644 index 0000000..4a3c486 --- /dev/null +++ b/lab10/jacobi/plot_res.py @@ -0,0 +1,35 @@ +import matplotlib.pyplot as plt +import os +import re + +# Pfad zum Verzeichnis mit den Dateien +data_dir = "resluts/" # ggf. anpassen + +threads = [1, 2,4,6,8,12,16,18,24,32,36,48] +times = [] +speedups = [] + + +plt.figure(figsize=(10, 5)) +plt.plot(threads, speedups, marker='o', label="Speedup") +# plt.plot(threads, threads, linestyle='--', label="Ideal (Linear Speedup)") +plt.title("Speedup") +plt.xlabel("Threads") +plt.ylabel("Speedup") +plt.grid(True) +plt.legend() +# plt.tight_layout() +plt.savefig("speedup_plot.png") + +# --- Plot 2: Performance --- +plt.figure(figsize=(10, 5)) +plt.plot(threads, times, marker='o') +plt.title("Performance") +plt.xlabel("Threads") +plt.ylabel("Performance (ms)") +plt.grid(True) +# plt.tight_layout() +plt.savefig("performance_plot.png") + +print("Plots gespeichert: speedup_plot.png und performance_plot.png") + diff --git a/lab10/jacobi/results/jacobi_12.txt b/lab10/jacobi/results/jacobi_12.txt new file mode 100644 index 0000000..9780592 --- /dev/null +++ b/lab10/jacobi/results/jacobi_12.txt @@ -0,0 +1,6 @@ +Starting serial benchmark +Serial benchmark finished, time=175344ms +Parallel benchmark finished, time=15256.1ms +Serial time: 175344ms +Parallel time: 15256.1ms +Speedup: 11.4934 diff --git a/lab10/jacobi/results/jacobi_16.txt b/lab10/jacobi/results/jacobi_16.txt new file mode 100644 index 0000000..3255197 --- /dev/null +++ b/lab10/jacobi/results/jacobi_16.txt @@ -0,0 +1,6 @@ +Starting serial benchmark +Serial benchmark finished, time=176163ms +Parallel benchmark finished, time=13512.1ms +Serial time: 176163ms +Parallel time: 13512.1ms +Speedup: 13.0374 diff --git a/lab10/jacobi/results/jacobi_18.txt b/lab10/jacobi/results/jacobi_18.txt new file mode 100644 index 0000000..4cd8e8b --- /dev/null +++ b/lab10/jacobi/results/jacobi_18.txt @@ -0,0 +1,6 @@ +Starting serial benchmark +Serial benchmark finished, time=175784ms +Parallel benchmark finished, time=13073.2ms +Serial time: 175784ms +Parallel time: 13073.2ms +Speedup: 13.4461 diff --git a/lab10/jacobi/results/jacobi_2.txt b/lab10/jacobi/results/jacobi_2.txt new file mode 100644 index 0000000..7dc08fb --- /dev/null +++ b/lab10/jacobi/results/jacobi_2.txt @@ -0,0 +1,6 @@ +Starting serial benchmark +Serial benchmark finished, time=175246ms +Parallel benchmark finished, time=89030.8ms +Serial time: 175246ms +Parallel time: 89030.8ms +Speedup: 1.96838 diff --git a/lab10/jacobi/results/jacobi_24.txt b/lab10/jacobi/results/jacobi_24.txt new file mode 100644 index 0000000..3bcb7b6 --- /dev/null +++ b/lab10/jacobi/results/jacobi_24.txt @@ -0,0 +1,6 @@ +Starting serial benchmark +Serial benchmark finished, time=175063ms +Parallel benchmark finished, time=10036.8ms +Serial time: 175063ms +Parallel time: 10036.8ms +Speedup: 17.4421 diff --git a/lab10/jacobi/results/jacobi_32.txt b/lab10/jacobi/results/jacobi_32.txt new file mode 100644 index 0000000..67a3f11 --- /dev/null +++ b/lab10/jacobi/results/jacobi_32.txt @@ -0,0 +1,6 @@ +Starting serial benchmark +Serial benchmark finished, time=176290ms +Parallel benchmark finished, time=9845.38ms +Serial time: 176290ms +Parallel time: 9845.38ms +Speedup: 17.9058 diff --git a/lab10/jacobi/results/jacobi_36.txt b/lab10/jacobi/results/jacobi_36.txt new file mode 100644 index 0000000..2c9a976 --- /dev/null +++ b/lab10/jacobi/results/jacobi_36.txt @@ -0,0 +1,6 @@ +Starting serial benchmark +Serial benchmark finished, time=175294ms +Parallel benchmark finished, time=8423.65ms +Serial time: 175294ms +Parallel time: 8423.65ms +Speedup: 20.8097 diff --git a/lab10/jacobi/results/jacobi_4.txt b/lab10/jacobi/results/jacobi_4.txt new file mode 100644 index 0000000..32a1d40 --- /dev/null +++ b/lab10/jacobi/results/jacobi_4.txt @@ -0,0 +1,6 @@ +Starting serial benchmark +Serial benchmark finished, time=176663ms +Parallel benchmark finished, time=45182.7ms +Serial time: 176663ms +Parallel time: 45182.7ms +Speedup: 3.90997 diff --git a/lab10/jacobi/results/jacobi_48.txt b/lab10/jacobi/results/jacobi_48.txt new file mode 100644 index 0000000..77a6ee9 --- /dev/null +++ b/lab10/jacobi/results/jacobi_48.txt @@ -0,0 +1,6 @@ +Starting serial benchmark +Serial benchmark finished, time=175588ms +Parallel benchmark finished, time=7676.71ms +Serial time: 175588ms +Parallel time: 7676.71ms +Speedup: 22.8728 diff --git a/lab10/jacobi/results/jacobi_6.txt b/lab10/jacobi/results/jacobi_6.txt new file mode 100644 index 0000000..0216106 --- /dev/null +++ b/lab10/jacobi/results/jacobi_6.txt @@ -0,0 +1,6 @@ +Starting serial benchmark +Serial benchmark finished, time=175424ms +Parallel benchmark finished, time=30198.1ms +Serial time: 175424ms +Parallel time: 30198.1ms +Speedup: 5.8091 diff --git a/lab10/jacobi/results/jacobi_8.txt b/lab10/jacobi/results/jacobi_8.txt new file mode 100644 index 0000000..5b055a0 --- /dev/null +++ b/lab10/jacobi/results/jacobi_8.txt @@ -0,0 +1,6 @@ +Starting serial benchmark +Serial benchmark finished, time=175615ms +Parallel benchmark finished, time=22710.1ms +Serial time: 175615ms +Parallel time: 22710.1ms +Speedup: 7.73292