diff --git a/src/t8_cmesh/t8_cmesh_partition.cxx b/src/t8_cmesh/t8_cmesh_partition.cxx index cca7f2b0a0..1f7bad8bd8 100644 --- a/src/t8_cmesh/t8_cmesh_partition.cxx +++ b/src/t8_cmesh/t8_cmesh_partition.cxx @@ -1759,7 +1759,6 @@ t8_cmesh_offset_random (sc_MPI_Comm comm, const t8_gloidx_t num_trees, const int return shmem_array; } -/* TODO: Check that percent is the same on each process */ t8_shmem_array_t t8_cmesh_offset_percent (const t8_cmesh_t cmesh, sc_MPI_Comm comm, const int percent) { @@ -1769,6 +1768,11 @@ t8_cmesh_offset_percent (const t8_cmesh_t cmesh, sc_MPI_Comm comm, const int per const t8_gloidx_t *old_partition; int mpirank, mpisize, mpiret; int created = 0; +#if T8_ENABLE_DEBUG + int total = 0; + sc_MPI_Allreduce (&percent, &total, 1, sc_MPI_INT, sc_MPI_SUM, comm); + T8_ASSERT (total == 100); +#endif T8_ASSERT (t8_cmesh_is_committed (cmesh)); T8_ASSERT (t8_cmesh_comm_is_valid (cmesh, comm));