From 9058a4513b7a39c11093d99efe306d34e1c00205 Mon Sep 17 00:00:00 2001 From: DJDavies2 Date: Mon, 29 Apr 2024 12:34:05 +0100 Subject: [PATCH 1/2] Sort output for test_iProbe. --- tests/mpi/eckit_test_mpi.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/mpi/eckit_test_mpi.cc b/tests/mpi/eckit_test_mpi.cc index cb900e2d6..6356864b0 100644 --- a/tests/mpi/eckit_test_mpi.cc +++ b/tests/mpi/eckit_test_mpi.cc @@ -8,6 +8,7 @@ * does it submit to any jurisdiction. */ +#include #include #include @@ -1000,6 +1001,8 @@ CASE("test_iProbe") { --count; } + std::sort(data.begin(), data.begin() + nproc); + for (int i = 0; i < nproc; i++) { EXPECT(i == data[i]); } From 47dc81c8f1f6fc9c449151bf4d4265985c57f00b Mon Sep 17 00:00:00 2001 From: DJDavies2 Date: Fri, 3 May 2024 15:30:53 +0100 Subject: [PATCH 2/2] Updates following review comment. --- tests/mpi/eckit_test_mpi.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/mpi/eckit_test_mpi.cc b/tests/mpi/eckit_test_mpi.cc index 6356864b0..6ce7e5961 100644 --- a/tests/mpi/eckit_test_mpi.cc +++ b/tests/mpi/eckit_test_mpi.cc @@ -956,6 +956,8 @@ CASE("test_probe") { --count; } + std::sort(begin(data), end(data)); + for (int i = 0; i < nproc; i++) { EXPECT(i == data[i]); } @@ -1001,7 +1003,7 @@ CASE("test_iProbe") { --count; } - std::sort(data.begin(), data.begin() + nproc); + std::sort(begin(data), end(data)); for (int i = 0; i < nproc; i++) { EXPECT(i == data[i]);