HW2: RC3 - A small exchange optimization
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
* make tests
|
||||
* mpirun -np <N> ./out/tests
|
||||
*
|
||||
* Note:
|
||||
* Yes each process runs the entire test suite!!
|
||||
*
|
||||
* \author
|
||||
* Christos Choutouridis AEM:8997
|
||||
* <cchoutou@ece.auth.gr>
|
||||
@@ -15,7 +18,11 @@
|
||||
#include <mpi.h>
|
||||
#include <random>
|
||||
#include "distsort.hpp"
|
||||
/*
|
||||
* Global fixtures
|
||||
*/
|
||||
|
||||
// MPI handler for the test session
|
||||
MPI_t<> ts_mpi;
|
||||
|
||||
// Mersenne seeded from hw if possible. range: [type_min, type_max]
|
||||
@@ -27,17 +34,11 @@ protected:
|
||||
static void SetUpTestSuite() {
|
||||
int argc = 0;
|
||||
char** argv = nullptr;
|
||||
MPI_Init(&argc, &argv);
|
||||
|
||||
int rank, size;
|
||||
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
|
||||
MPI_Comm_size(MPI_COMM_WORLD, &size);
|
||||
ts_mpi.rank(rank);
|
||||
ts_mpi.size(size);
|
||||
ts_mpi.init(&argc, &argv);
|
||||
}
|
||||
|
||||
static void TearDownTestSuite() {
|
||||
MPI_Finalize();
|
||||
ts_mpi.finalize();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user