Skip to content

Commit

Permalink
TEST: fix one-sided tests always running (openucx#836)
Browse files Browse the repository at this point in the history
* TEST: fix one-sided tests always running

* TEST: sort list of collectives

---------

Co-authored-by: ferrol aderholdt <[email protected]>
  • Loading branch information
2 people authored and nsarka committed Oct 24, 2023
1 parent 64f3c5c commit c95097e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test/mpi/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <getopt.h>
#include <sstream>
#include <algorithm>
#include <chrono>
#include "test_mpi.h"

Expand Down Expand Up @@ -602,7 +603,17 @@ int main(int argc, char *argv[])
}

if (has_onesided) {
test->set_colls(onesided_colls);
std::vector<ucc_coll_type_t> os_colls(onesided_colls.size());
std::vector<ucc_coll_type_t>::iterator it_start;

std::sort(colls.begin(), colls.end());
std::sort(onesided_colls.begin(), onesided_colls.end());

it_start = std::set_intersection(
colls.begin(), colls.end(), onesided_colls.begin(),
onesided_colls.end(), os_colls.begin());
os_colls.resize(it_start - os_colls.begin());
test->set_colls(os_colls);
for (auto inpl : inplace) {
for (auto pers : persistent) {
test->set_triggered(false);
Expand Down

0 comments on commit c95097e

Please sign in to comment.