diff --git a/charts/bfs_time_vs_size_advanced.png b/charts/bfs_time_vs_size_advanced.png new file mode 100644 index 0000000..bb3c200 Binary files /dev/null and b/charts/bfs_time_vs_size_advanced.png differ diff --git a/charts/bfs_time_vs_size_advanced_normal.png b/charts/bfs_time_vs_size_advanced_normal.png new file mode 100644 index 0000000..cbc1efa Binary files /dev/null and b/charts/bfs_time_vs_size_advanced_normal.png differ diff --git a/charts/bfs_time_vs_threads_advanced.png b/charts/bfs_time_vs_threads_advanced.png new file mode 100644 index 0000000..a00ad3d Binary files /dev/null and b/charts/bfs_time_vs_threads_advanced.png differ diff --git a/charts/bfs_time_vs_threads_advanced_normal.png b/charts/bfs_time_vs_threads_advanced_normal.png new file mode 100644 index 0000000..a46c2ba Binary files /dev/null and b/charts/bfs_time_vs_threads_advanced_normal.png differ diff --git a/plot_bfs_performance.py b/plot_bfs_performance.py new file mode 100644 index 0000000..2e8755d --- /dev/null +++ b/plot_bfs_performance.py @@ -0,0 +1,43 @@ +import pandas as pd +import matplotlib.pyplot as plt +import seaborn as sns + +# Читаем CSV +df = pd.read_csv("tmp/results.csv") + +# --- График 1: Serial vs Parallel (разные потоки) --- +plt.figure(figsize=(12,6)) + +serial_df = df[df['Type'] == 'Serial'] +parallel_df = df[df['Type'] == 'Parallel'] +threads = sorted(parallel_df['Threads'].unique()) + +plt.plot(serial_df['Vertices'], serial_df['Time_ms'], label='Serial BFS', marker='o', linewidth=2, color='black') + +for t in threads: + t_df = parallel_df[parallel_df['Threads'] == t] + plt.plot(t_df['Vertices'], t_df['Time_ms'], marker='o', linestyle='--', label=f'Parallel BFS ({t} threads)') + +plt.xlabel('Number of vertices') +plt.ylabel('Time (ms)') +plt.title('BFS Performance: Serial vs Parallel') +plt.legend() +plt.grid(True) +plt.savefig('bfs_time_vs_size_advanced.png') +plt.show() + + +# --- График 2: Влияние числа потоков на время Parallel BFS --- +plt.figure(figsize=(12,6)) +max_v = 50000 +parallel_maxv = parallel_df[parallel_df['Vertices'] == 50000] +plt.plot(parallel_maxv['Threads'], parallel_maxv['Time_ms'], marker='o', linestyle='-', color='red') +plt.xlabel('Number of threads') +plt.ylabel('Time (ms)') +plt.title(f'Parallel BFS Scaling with Number of Threads (V={max_v})') +plt.xticks(parallel_maxv['Threads']) +plt.grid(True) +plt.savefig('bfs_time_vs_threads_advanced.png') +plt.show() + + diff --git a/results/index.html b/results/index.html new file mode 100644 index 0000000..c3b206c --- /dev/null +++ b/results/index.html @@ -0,0 +1,135 @@ + + +
+|
+ +50% + +
+ |
+
+
|
+
Strong asserts were violated. Correct implementations should have no assert failures here.
+| org.itmo.IncorrectParallelBFSStressTest | +104 | FAILED | ++ | + |
Tests break for some reason, other than failing the assert. Correct implementations should have none.
+Some interesting behaviors observed. This is for the plain curiosity.
+| org.itmo.IncorrectParallelBFSStressTest | +104 | FAILED | ++ | + |
| org.itmo.ParallelBFSStressTest | +104 | PASSED | ++ | + |
null
+| java.specification.name | +Java Platform API Specification | +
| java.specification.vendor | +Oracle Corporation | +
| java.specification.version | +11 | +
| java.vendor | +Homebrew | +
| java.version | +11.0.27 | +
| java.vm.name | +OpenJDK 64-Bit Server VM | +
| java.vm.vendor | +Homebrew | +
| java.vm.version | +11.0.27+0 | +
| os.arch | +aarch64 | +
| os.name | +Mac OS X | +
| os.version | +15.7.1 | +
| Compilation Mode | +Scheduling Class | +Java Options | +Status | +Observed States | +|
|---|---|---|---|---|---|
| + | false | +true | +|||
| + | Forbidden | +Acceptable | +|||
| + | Race detected, incorrect BFS result | +Correct traversal | +|||
split + bfsActor: Interpreter + |
+bfsActor: package group free, core group free + |
+
+[-Dfile.encoding=UTF-8, -Duser.country=RU, -Duser.language=ru, -Duser.variant, -XX:+UseBiasedLocking]+ |
+FAILED | +14 | +2338 | +
split + bfsActor: Interpreter + |
+bfsActor: package group free, core group free + |
+
+[-Dfile.encoding=UTF-8, -Duser.country=RU, -Duser.language=ru, -Duser.variant, -XX:-UseBiasedLocking]+ |
+FAILED | +14 | +2264 | +
split + bfsActor: C1 + |
+bfsActor: package group free, core group free + |
+
+[-Dfile.encoding=UTF-8, -Duser.country=RU, -Duser.language=ru, -Duser.variant, -XX:+UseBiasedLocking]+ |
+FAILED | +13 | +2339 | +
split + bfsActor: C1 + |
+bfsActor: package group free, core group free + |
+
+[-Dfile.encoding=UTF-8, -Duser.country=RU, -Duser.language=ru, -Duser.variant, -XX:-UseBiasedLocking]+ |
+FAILED | +10 | +2675 | +
split + bfsActor: C2 + |
+bfsActor: package group free, core group free + |
+
+[-Dfile.encoding=UTF-8, -Duser.country=RU, -Duser.language=ru, -Duser.variant, -XX:+UseBiasedLocking]+ |
+FAILED | +13 | +2265 | +
split + bfsActor: C2 + |
+bfsActor: package group free, core group free + |
+
+[-Dfile.encoding=UTF-8, -Duser.country=RU, -Duser.language=ru, -Duser.variant, -XX:+UseBiasedLocking, -XX:+StressLCM, -XX:+StressGCM]+ |
+FAILED | +99 | +12401 | +
split + bfsActor: C2 + |
+bfsActor: package group free, core group free + |
+
+[-Dfile.encoding=UTF-8, -Duser.country=RU, -Duser.language=ru, -Duser.variant, -XX:-UseBiasedLocking]+ |
+FAILED | +12 | +2673 | +
split + bfsActor: C2 + |
+bfsActor: package group free, core group free + |
+
+[-Dfile.encoding=UTF-8, -Duser.country=RU, -Duser.language=ru, -Duser.variant, -XX:-UseBiasedLocking, -XX:+StressLCM, -XX:+StressGCM]+ |
+FAILED | +69 | +11284 | +
+split
+ bfsActor: Interpreter
+
+ bfsActor: package group free, core group free
+
+
+[-Dfile.encoding=UTF-8, -Duser.country=RU, -Duser.language=ru, -Duser.variant, -XX:-UseBiasedLocking]
+
+ ++ + + diff --git a/results/org.itmo.ParallelBFSStressTest.html b/results/org.itmo.ParallelBFSStressTest.html new file mode 100644 index 0000000..af5f8b1 --- /dev/null +++ b/results/org.itmo.ParallelBFSStressTest.html @@ -0,0 +1,197 @@ + + + +
null
+| java.specification.name | +Java Platform API Specification | +
| java.specification.vendor | +Oracle Corporation | +
| java.specification.version | +11 | +
| java.vendor | +Homebrew | +
| java.version | +11.0.27 | +
| java.vm.name | +OpenJDK 64-Bit Server VM | +
| java.vm.vendor | +Homebrew | +
| java.vm.version | +11.0.27+0 | +
| os.arch | +aarch64 | +
| os.name | +Mac OS X | +
| os.version | +15.7.1 | +
| Compilation Mode | +Scheduling Class | +Java Options | +Status | +Observed States | +
|---|---|---|---|---|
| + | true | +|||
| + | Acceptable | +|||
| + | Correct traversal | +|||
split + bfsActor: Interpreter + |
+bfsActor: package group free, core group free + |
+
+[-Dfile.encoding=UTF-8, -Duser.country=RU, -Duser.language=ru, -Duser.variant, -XX:+UseBiasedLocking]+ |
+OK | +2204 | +
split + bfsActor: Interpreter + |
+bfsActor: package group free, core group free + |
+
+[-Dfile.encoding=UTF-8, -Duser.country=RU, -Duser.language=ru, -Duser.variant, -XX:-UseBiasedLocking]+ |
+OK | +2315 | +
split + bfsActor: C1 + |
+bfsActor: package group free, core group free + |
+
+[-Dfile.encoding=UTF-8, -Duser.country=RU, -Duser.language=ru, -Duser.variant, -XX:+UseBiasedLocking]+ |
+OK | +2278 | +
split + bfsActor: C1 + |
+bfsActor: package group free, core group free + |
+
+[-Dfile.encoding=UTF-8, -Duser.country=RU, -Duser.language=ru, -Duser.variant, -XX:-UseBiasedLocking]+ |
+OK | +2278 | +
split + bfsActor: C2 + |
+bfsActor: package group free, core group free + |
+
+[-Dfile.encoding=UTF-8, -Duser.country=RU, -Duser.language=ru, -Duser.variant, -XX:+UseBiasedLocking]+ |
+OK | +2204 | +
split + bfsActor: C2 + |
+bfsActor: package group free, core group free + |
+
+[-Dfile.encoding=UTF-8, -Duser.country=RU, -Duser.language=ru, -Duser.variant, -XX:+UseBiasedLocking, -XX:+StressLCM, -XX:+StressGCM]+ |
+OK | +11575 | +
split + bfsActor: C2 + |
+bfsActor: package group free, core group free + |
+
+[-Dfile.encoding=UTF-8, -Duser.country=RU, -Duser.language=ru, -Duser.variant, -XX:-UseBiasedLocking]+ |
+OK | +2278 | +
split + bfsActor: C2 + |
+bfsActor: package group free, core group free + |
+
+[-Dfile.encoding=UTF-8, -Duser.country=RU, -Duser.language=ru, -Duser.variant, -XX:-UseBiasedLocking, -XX:+StressLCM, -XX:+StressGCM]+ |
+OK | +11427 | +