diff --git a/test/mpi/main.cc b/test/mpi/main.cc index 98922c0c50..b719f366f0 100644 --- a/test/mpi/main.cc +++ b/test/mpi/main.cc @@ -7,6 +7,7 @@ #include #include +#include #include #include "test_mpi.h" @@ -602,7 +603,17 @@ int main(int argc, char *argv[]) } if (has_onesided) { - test->set_colls(onesided_colls); + std::vector os_colls(onesided_colls.size()); + std::vector::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);