Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ build/
!**/src/test/**/build/

### IntelliJ IDEA ###
.idea
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![Review Assignment Due Date](https://classroom.github.com/assets/deadline-readme-button-22041afd0340ce965d47ae6ef1cefeee28c7c493a6346c4f15d667ab976d596c.svg)](https://classroom.github.com/a/AwTYhPar)
# Лабораторная работа № 1: определение достижимости параллелизма и реализация параллельных алгоритмов.

Шаги выполнения:
Expand All @@ -7,8 +8,8 @@
4) С помощью инструментов (ThreadSanitizer && Helgrind для С++, JCStress тесты для Java) проанализировать программу на предмет отсутствия ошибок синхронизации данных. Если ошибок не нашлось, то внести их и найти.
5) Эксперименты и анализ результатов:\
Проведите эксперименты, измеряя производительность параллельной реализации алгоритма на различных объемах входных данных. Сравните результаты с последовательной версией и опишите полученные выводы.
* Постройте график зависимости времени выполнения параллельной версий алгоритма от выделенных ресурсов.
* Постройте график зависимости времени выполнения параллельной и последовательной версий алгоритма в зависимости от объема входных данных.\
* Постройте график зависимости времени выполнения параллельной версий алгоритма от выделенных ресурсов. Смотрите [раздел с экспериментом 7](results/experiments.md/#эксперимент-7-количество-потоков-ресурсов)
* Постройте график зависимости времени выполнения параллельной и последовательной версий алгоритма в зависимости от объема входных данных. Смотрите [раздел с экспериментом 8](results/experiments.md/#эксперимент-8-сравнение-последовательной-и-параллельной-реализаций)\
\
**Загрузить графики в отдельную директорию в репозитории** \
**Для построения графиков можно воспользоваться чем угодно**
21 changes: 20 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
kotlin("jvm") version "1.9.20"
java
application
}

Expand All @@ -12,6 +13,8 @@ repositories {

dependencies {
testImplementation(kotlin("test"))
testImplementation("org.openjdk.jcstress:jcstress-core:0.16")
testAnnotationProcessor("org.openjdk.jcstress:jcstress-core:0.16")
}

tasks.test {
Expand All @@ -24,4 +27,20 @@ kotlin {

application {
mainClass.set("MainKt")
}
}

// JCStress runner task: runs JCStress tests located on the test runtime classpath
// Use: ./gradlew jcstress [-PjcstressArgs="-v -m quick"]
tasks.register<JavaExec>("jcstress") {
group = "verification"
description = "Run JCStress stress tests"
mainClass.set("org.openjdk.jcstress.Main")
classpath = sourceSets.test.get().runtimeClasspath
dependsOn("testClasses")

val argsProp = project.findProperty("jcstressArgs") as String?
if (!argsProp.isNullOrBlank()) {
args = argsProp.split("\\s+".toRegex())
}
}

128 changes: 128 additions & 0 deletions results/brokenParallelBFSConcurrencyTestResults/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@

<html>
<head>
<title>Java Concurrency Stress test report</title>
<style type="text/css">
* { font-family: Arial; }
table { font-size: 9pt; }
a { color: #000000; }
.progress { padding: 0px; }
.header { text-align: left; }
.section1 { font-size: 12pt; background-color: #BDB76B; color: #000000; font-weight: bold;}
.section2 { font-size: 12pt; background-color: #F0E68C; color: #000000; font-weight: bold;}
.cell1 { background-color: #FAFAD2; }
.cell2 { background-color: #EEE8AA; }
.passedProgress { background-color: #00AA00; color: #FFFFFF; text-align: center; font-weight: bold; }
.failedProgress { background-color: #FF0000; color: #FFFFFF; text-align: center; font-weight: bold; }
.passed { color: #00AA00; text-align: center; font-weight: bold; }
.failed { color: #FF0000; text-align: center; font-weight: bold; }
.interesting { color: #0000FF; text-align: center; font-weight: bold; }
.spec { color: #AAAA00; text-align: center; font-weight: bold; }
.endResult { font-size: 48pt; text-align: center; font-weight: bold; }
</style>
</head>
<body>
<table width="100%" cellspacing="20">
<tr>
<td>
<p class="endResult passed">
100%
</p>
<table width="100%" cellpadding="3" cellspacing="0">
<tr><td width="100%" class="passedProgress">&nbsp;</td></tr>
<tr><td nowrap><b>Overall pass rate:</b> 1/1&nbsp;</td></tr>
</table>
<br>
</td>
<td width=100>
<table>
<tr>
<td nowrap>java.specification.name</td>
<td nowrap>Java Platform API Specification</td>
</tr>
<tr>
<td nowrap>java.specification.vendor</td>
<td nowrap>Oracle Corporation</td>
</tr>
<tr>
<td nowrap>java.specification.version</td>
<td nowrap>21</td>
</tr>
<tr>
<td nowrap>java.vendor</td>
<td nowrap>Oracle Corporation</td>
</tr>
<tr>
<td nowrap>java.version</td>
<td nowrap>21.0.2</td>
</tr>
<tr>
<td nowrap>java.vm.name</td>
<td nowrap>OpenJDK 64-Bit Server VM</td>
</tr>
<tr>
<td nowrap>java.vm.vendor</td>
<td nowrap>Oracle Corporation</td>
</tr>
<tr>
<td nowrap>java.vm.version</td>
<td nowrap>21.0.2+13-58</td>
</tr>
<tr>
<td nowrap>os.arch</td>
<td nowrap>aarch64</td>
</tr>
<tr>
<td nowrap>os.name</td>
<td nowrap>Mac OS X</td>
</tr>
<tr>
<td nowrap>os.version</td>
<td nowrap>14.4</td>
</tr>
</table>
</td>
</tr>
</table>
<hr>
<h3>FAILED tests</h3>
<p>Strong asserts were violated. Correct implementations should have no assert failures here.</p>
<table cellspacing=0 cellpadding=3 width="100%">
</table>
None!
<br>
<br>
<hr>
<h3>ERROR tests</h3>
<p>Tests break for some reason, other than failing the assert. Correct implementations should have none.</p>
<table cellspacing=0 cellpadding=3 width="100%">
</table>
None!
<br>
<br>
<hr>
<h3>INTERESTING tests</h3>
<p>Some interesting behaviors observed. This is for the plain curiosity.</p>
<table cellspacing=0 cellpadding=3 width="100%">
<tr class="cell2">
<td>&nbsp;&nbsp;&nbsp;<a href="org.itmo.BFSConcurrencyTest.html">org.itmo.BFSConcurrencyTest</a></td>
<td>10<sup>1</sup></td><td class="passed">PASSED</td>
<td class="interesting">INTERESTING</td>
<td class="passed"></td>
</tr>
</table>
<br>
<hr>
<h3>All tests</h3>
<p></p>
<table cellspacing=0 cellpadding=3 width="100%">
<tr class="cell1">
<td>&nbsp;&nbsp;&nbsp;<a href="org.itmo.BFSConcurrencyTest.html">org.itmo.BFSConcurrencyTest</a></td>
<td>10<sup>1</sup></td><td class="passed">PASSED</td>
<td class="interesting">INTERESTING</td>
<td class="passed"></td>
</tr>
</table>
<br>
</body>
</html>
Loading