Skip to content

Commit

Permalink
Merge pull request #1126 from DLR-AMR/fix-quick_TODO
Browse files Browse the repository at this point in the history
Fix a small TODO
  • Loading branch information
jmark authored Jul 15, 2024
2 parents ea80f13 + 098c743 commit 5e1d6ac
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/t8_cmesh/t8_cmesh_partition.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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));
Expand Down

0 comments on commit 5e1d6ac

Please sign in to comment.