-
Notifications
You must be signed in to change notification settings - Fork 59
Гусева Алена. Технология SEQ-MPI. Сумма элементов матрицы по столбцам. Вариант 12 #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Отправила ПР, т.к. локально проверить не могу, по какой-то причине нет доступных раннеров: |
That could be related to the major outage of Microsoft Azure yesterday. Now that should be OK |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this 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".
5b308b8 to
b57dede
Compare
b57dede to
0c5de27
Compare
Update to current upstream after git reset
|
Подскажите, пожалуйста, как лишние Labels убрать? Делала git reset и push --force после pull'a хотфиксов. В списке измененных файлов только моя директория и мои файлы |
No worries, fixed manually |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Report is not attached
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added with the last commit
| if (rank == 0) { | ||
| GetOutput() = global_sums; | ||
| } else { | ||
| GetOutput() = {-1}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Output is not actually required to be initialized for other ranks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed that
Actualize repo's state
…termidiate vector for global sums
| local_sums[(i + shift) % columns] += local_buff[i]; | ||
| } | ||
|
|
||
| std::vector<double> global_sums(columns, 0.0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можно использовать MPI_Reduce сразу для GetOutput()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed that
| auto &matrix = std::get<2>(GetInput()); | ||
| auto &columns = std::get<1>(GetInput()); | ||
| auto &rows = std::get<0>(GetInput()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можно распаковать кортеж в три переменные одной строкой
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed that


Описание
SEQ: Создается вектор сумм столбцом входной матрицы. Итерируясь по матрице, каждый очередной ее элемент добавляется к соответствующей сумме.
MPI: Элементы входной матрицы поровну распределяются по процессам. Если число элементов не кратно числу процессов, нераспределенные
nэлементов дораспределяются по первымnпроцессам. Рассчитываются массивы количеств и смещений дляMPI_Scatterv()и локальный сдвигshiftдля корректного суммирования текущих элементов с соответствующими элементами локального результирующего вектора (для случаев, когда границы распределенных диапазонов не соответствуют границам строк матрицы). Когда локальные результаты вычислены, они собираются на корневом процессе функцией MPI_Reduce.Чек-лист
<фамилия>_<первая_буква_имени>_<короткое_название_задачи>clang-formatлокально в моем форке (нет ошибок форматирования)clang-tidyлокально в моем форке (нет предупреждений/ошибок)nesterov_a_vector_sum), а не вmaster