-
Notifications
You must be signed in to change notification settings - Fork 163
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
Соловьев Алексей. Задача 2. Вариант 12. Топология сети Звезда. #327
base: master
Are you sure you want to change the base?
Соловьев Алексей. Задача 2. Вариант 12. Топология сети Звезда. #327
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #327 +/- ##
==========================================
+ Coverage 96.31% 96.33% +0.01%
==========================================
Files 437 439 +2
Lines 11236 11283 +47
Branches 4739 4759 +20
==========================================
+ Hits 10822 10869 +47
Misses 136 136
Partials 278 278 ☔ View full report in Codecov by Sentry. |
#include "core/perf/include/perf.hpp" | ||
#include "mpi/solovev_a_star_topology/include/ops_mpi.hpp" | ||
|
||
std::vector<int> generate_random_vector(size_t size) { |
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.
this function should also be used in a func_tests to generate a random vector for tests
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
|
||
#include "mpi/solovev_a_star_topology/include/ops_mpi.hpp" | ||
|
||
std::vector<int> generate_random_vector(size_t size) { |
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.
Make it either static or wrap with namespace
testMpiTaskParallel.post_processing(); | ||
if (world.rank() == 0) { | ||
for (size_t i = 0; i < input.size(); ++i) { | ||
ASSERT_EQ(output[i], input[i]); |
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.
Add checks of received data on each data
#include <vector> | ||
|
||
#include "mpi/solovev_a_star_topology/include/ops_mpi.hpp" | ||
|
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.
Please, add tests that verify data transfer order
|
||
TEST(solovev_a_star_topology_mpi, Test_order) { | ||
boost::mpi::communicator world; | ||
if (world.size() > 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.
check in validation please
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.
add a test to check the first condition in validation, that is, so that its input and output data are of different sizes but not empty
, and delete the library random in the implementation of func_test and perf_test
Нулевой процесс, который является root процессом, получает на вход вектор целых чисел, который записывается в переменную input_, затем передаёт эту переменную всем остальным процессам, в свою очередь остальные процессы принимают эту переменную и передают её обратно в нулевой процесс, при получении этих данных нулевой процесс записывает их в переменную res, которая изначально инициализируется как вектор нулей такого же размера как и входные данные. В тестах происходит поэлементное сравнение входных данных и итогового результата.