Skip to content

Митяева Дарья. Технология SEQ-MPI. Нахождение минимальных значений по строкам матрицы. Вариант 17#75

Merged
allnes merged 4 commits intolearning-process:masterfrom
daasmit07:mityaeva_d_min_v_rows_matrix_dev
Dec 13, 2025
Merged

Митяева Дарья. Технология SEQ-MPI. Нахождение минимальных значений по строкам матрицы. Вариант 17#75
allnes merged 4 commits intolearning-process:masterfrom
daasmit07:mityaeva_d_min_v_rows_matrix_dev

Conversation

@daasmit07
Copy link
Copy Markdown
Contributor

Задача реализует нахождение минимальных значений по строкам матрицы с использованием параллельных вычислений MPI. Алгоритм распределяет строки матрицы между процессами, каждый процесс находит минимумы для своих строк, затем процесс 0 собирает результаты и рассылает итоговый вектор всем процессам. Входные данные представляют собой вектор формата [количество_строк, количество_столбцов, элементы_матрицы], выходные данные - вектор [количество_строк, минимальные_значения_по_строкам]. Реализация включает SEQ и MPI версии, прошедшие функциональное тестирование и тестирование производительности.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Nov 27, 2025

Codecov Report

❌ Patch coverage is 85.71429% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.55%. Comparing base (92b24d3) to head (b3c1ceb).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...s/mityaeva_d_min_v_rows_matrix/mpi/src/ops_mpi.cpp 89.04% 4 Missing and 4 partials ⚠️
...s/mityaeva_d_min_v_rows_matrix/seq/src/ops_seq.cpp 78.12% 3 Missing and 4 partials ⚠️

❌ Your patch status has failed because the patch coverage (85.71%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #75      +/-   ##
==========================================
- Coverage   94.03%   92.55%   -1.48%     
==========================================
  Files          15       17       +2     
  Lines         486      591     +105     
  Branches      181      234      +53     
==========================================
+ Hits          457      547      +90     
- Misses          0        7       +7     
- Partials       29       37       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, remove unused files

Comment on lines +149 to +150
} catch (...) {
return false;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this try-catch really needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exception handling with try-catch blocks is necessary in both implementations primarily for protection against standard library exceptions. The std::vector::operator[] can throw std::out_of_range if accessed with an invalid index, which could occur if there are calculation errors in determining row and column offsets. Additionally, memory allocation operations like reserve() and push_back() can throw std::bad_alloc when system memory is exhausted, particularly when processing large matrices.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::vector::operator[] can throw std::out_of_range if accessed with an invalid index

This is incorrect. You might be confusing it with std::vector::at.
See the details for the reference:

As for reserve and push_back, but these cases are unlikely in our scenarios. Anyways, I'm ok with the current approach

Comment on lines +79 to +81
} catch (...) {
return false;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question regarding try-catch here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no report

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

@allnes allnes merged commit 96a9d5d into learning-process:master Dec 13, 2025
41 checks passed
AleksndrSakharov pushed a commit to AleksndrSakharov/ppc-2025-processes-informatics that referenced this pull request Dec 16, 2025
… строкам матрицы. Вариант 17 (learning-process#75)

Задача реализует нахождение минимальных значений по строкам матрицы с
использованием параллельных вычислений MPI. Алгоритм распределяет строки
матрицы между процессами, каждый процесс находит минимумы для своих
строк, затем процесс 0 собирает результаты и рассылает итоговый вектор
всем процессам. Входные данные представляют собой вектор формата
[количество_строк, количество_столбцов, элементы_матрицы], выходные
данные - вектор [количество_строк, минимальные_значения_по_строкам].
Реализация включает SEQ и MPI версии, прошедшие функциональное
тестирование и тестирование производительности.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants