12 #include <gsl/gsl_rng.h>
14 #define qsort_openmp qsort
33 MPI_Barrier(MPI_COMM_WORLD);
40 MPI_Comm_rank(MPI_COMM_WORLD, &
ThisTask);
41 MPI_Comm_size(MPI_COMM_WORLD, &
NTask);
57 #pragma omp parallel for
74 MPI_Allreduce(&
PartManager->
NumPart, &TotNumPart2, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD);
80 MPI_Barrier(MPI_COMM_WORLD);
102 assert_all_true(!fail);
126 assert_all_true(!fail);
152 assert_all_true(!fail);
172 if(
P[i].
Type == 0)
return 0;
188 assert_all_true(!fail);
211 const struct CMUnitTest tests[] = {
217 return cmocka_run_group_tests_mpi(tests, NULL, NULL);
void domain_test_id_uniqueness(struct part_manager_type *pman)
int domain_exchange(ExchangeLayoutFunc layoutfunc, const void *layout_userdata, int do_gc, struct DriftData *drift, struct part_manager_type *pman, struct slots_manager_type *sman, int maxiter, MPI_Comm Comm)
#define mymalloc(name, size)
struct part_manager_type PartManager[1]
void slots_setup_id(const struct part_manager_type *pman, struct slots_manager_type *sman)
size_t slots_reserve(int where, int64_t atleast[6], struct slots_manager_type *sman)
void slots_set_enabled(int ptype, size_t elsize, struct slots_manager_type *sman)
void slots_mark_garbage(int i, struct part_manager_type *pman, struct slots_manager_type *sman)
void slots_free(struct slots_manager_type *sman)
void slots_setup_topology(struct part_manager_type *pman, int64_t *NLocal, struct slots_manager_type *sman)
void slots_check_id_consistency(struct part_manager_type *pman, struct slots_manager_type *sman)
struct slots_manager_type SlotsManager[1]
void slots_init(double increase, struct slots_manager_type *sman)
static int test_exchange_layout_func(int i, const void *userdata)
static struct ClockTable Clocks
static void test_exchange_uneven(void **state)
static int test_exchange_layout_func_uneven(int i, const void *userdata)
static void test_exchange_with_garbage(void **state)
static int setup_particles(int64_t NType[6])
static int teardown_particles(void **state)
static void test_exchange(void **state)
static void test_exchange_zero_slots(void **state)
void walltime_init(struct ClockTable *ct)
static enum TransferType ptype