add results
This commit is contained in:
35
lab10/jacobi/plot_res.py
Normal file
35
lab10/jacobi/plot_res.py
Normal file
@@ -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")
|
||||
|
||||
6
lab10/jacobi/results/jacobi_12.txt
Normal file
6
lab10/jacobi/results/jacobi_12.txt
Normal file
@@ -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
|
||||
6
lab10/jacobi/results/jacobi_16.txt
Normal file
6
lab10/jacobi/results/jacobi_16.txt
Normal file
@@ -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
|
||||
6
lab10/jacobi/results/jacobi_18.txt
Normal file
6
lab10/jacobi/results/jacobi_18.txt
Normal file
@@ -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
|
||||
6
lab10/jacobi/results/jacobi_2.txt
Normal file
6
lab10/jacobi/results/jacobi_2.txt
Normal file
@@ -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
|
||||
6
lab10/jacobi/results/jacobi_24.txt
Normal file
6
lab10/jacobi/results/jacobi_24.txt
Normal file
@@ -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
|
||||
6
lab10/jacobi/results/jacobi_32.txt
Normal file
6
lab10/jacobi/results/jacobi_32.txt
Normal file
@@ -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
|
||||
6
lab10/jacobi/results/jacobi_36.txt
Normal file
6
lab10/jacobi/results/jacobi_36.txt
Normal file
@@ -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
|
||||
6
lab10/jacobi/results/jacobi_4.txt
Normal file
6
lab10/jacobi/results/jacobi_4.txt
Normal file
@@ -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
|
||||
6
lab10/jacobi/results/jacobi_48.txt
Normal file
6
lab10/jacobi/results/jacobi_48.txt
Normal file
@@ -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
|
||||
6
lab10/jacobi/results/jacobi_6.txt
Normal file
6
lab10/jacobi/results/jacobi_6.txt
Normal file
@@ -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
|
||||
6
lab10/jacobi/results/jacobi_8.txt
Normal file
6
lab10/jacobi/results/jacobi_8.txt
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user