Skip to content

Commit

Permalink
Add check that ghosts were created in Comm test
Browse files Browse the repository at this point in the history
  • Loading branch information
streeve committed Sep 23, 2023
1 parent 74ae025 commit d6dee1f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions unit_test/tstComm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ void testHalo()
EXPECT_EQ( rank_host( p ), rank_init_host( p ) );
}

int current_size = -1;
MPI_Comm_size( MPI_COMM_WORLD, &current_size );
// Ghosts should have been created for all but single rank systems.
if ( current_size > 1 )
{
EXPECT_GT( particles.n_ghost, 0 );
}
// Check all ghost particles in the halo region.
for ( std::size_t p = particles.n_local; p < particles.size; ++p )
{
Expand Down

0 comments on commit d6dee1f

Please sign in to comment.