Skip to content

Conversation

@gsvval
Copy link

@gsvval gsvval commented Oct 29, 2025

Описание

  • Задача: Сумма элементов матрицы по столбцам
  • Вариант: 12
  • Технология: SEQ, MPI
  • Описание вашей реализации и отчёта.
    SEQ: Создается вектор сумм столбцом входной матрицы. Итерируясь по матрице, каждый очередной ее элемент добавляется к соответствующей сумме
    MPI: Строки входной матрицы поровну распределяются по процессам. Если число строк не кратно количество процессов, нераспределенные n строк распределяются в первые n процессов. Каждый процесс вычисляет суммы столбцов локальной матрица. После чего локальные суммы всех процессов собираются и суммируются на корневом процессе.

Чек-лист

  • Статус CI: Все CI-задачи (сборка, тесты, генерация отчёта) успешно проходят на моей ветке в моем форке
  • Директория и именование задачи: Я создал директорию с именем <фамилия>_<первая_буква_имени>_<короткое_название_задачи>
  • Полное описание задачи: Я предоставил полное описание задачи в теле pull request
  • clang-format: Мои изменения успешно проходят clang-format локально в моем форке (нет ошибок форматирования)
  • clang-tidy: Мои изменения успешно проходят clang-tidy локально в моем форке (нет предупреждений/ошибок)
  • Функциональные тесты: Все функциональные тесты успешно проходят локально на моей машине
  • Тесты производительности: Все тесты производительности успешно проходят локально на моей машине
  • Ветка: Я работаю в ветке, названной точно так же, как директория моей задачи (например, nesterov_a_vector_sum), а не в master
  • Правдивое содержание: Я подтверждаю, что все сведения, указанные в этом pull request, являются точными и достоверными

@gsvval
Copy link
Author

gsvval commented Oct 29, 2025

Отправила ПР, т.к. локально проверить не могу, по какой-то причине нет доступных раннеров:
https://github.com/gsvval/ppc-2025-processes-informatics/actions/runs/18918876144
image
@allnes
@aobolensk

@aobolensk
Copy link
Member

Отправила ПР, т.к. локально проверить не могу, по какой-то причине нет доступных раннеров: https://github.com/gsvval/ppc-2025-processes-informatics/actions/runs/18918876144 image @allnes @aobolensk

That could be related to the major outage of Microsoft Azure yesterday. Now that should be OK

@gsvval gsvval marked this pull request as draft October 30, 2025 15:45
@codecov-commenter
Copy link

codecov-commenter commented Oct 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.30%. Comparing base (d090c42) to head (48c593f).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #11      +/-   ##
==========================================
+ Coverage   94.73%   95.30%   +0.56%     
==========================================
  Files          15       17       +2     
  Lines         456      511      +55     
  Branches      166      190      +24     
==========================================
+ Hits          432      487      +55     
  Partials       24       24              

☔ 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.

@aobolensk aobolensk marked this pull request as ready for review October 31, 2025 18:31
@aobolensk aobolensk marked this pull request as draft October 31, 2025 18:31
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 65 to 66
MPI_Bcast(counts.data(), static_cast<int>(counts.size()), MPI_INT, 0, MPI_COMM_WORLD);
MPI_Bcast(displs.data(), static_cast<int>(displs.size()), MPI_INT, 0, MPI_COMM_WORLD);

Choose a reason for hiding this comment

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

P0 Badge Broadcast uses uninitialized counts buffer

counts is only filled on rank 0 but other ranks keep it empty. The subsequent MPI_Bcast(counts.data(), counts.size(), MPI_INT, 0, MPI_COMM_WORLD) therefore broadcasts wsize elements from the root while receivers provide count=0 and a null buffer, which violates MPI’s requirement that all ranks pass the same element count and leaves no storage for the incoming data. On multi‑process runs this results in an MPI error or crash and counts[rank] is undefined before MPI_Scatterv. The vector should be resized to wsize (and populated via the broadcast) before calling MPI_Bcast.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants