C unit tests for MPI collective helper routines. More...
#include "test_support.h"#include "ParticleMotion.h"#include "ParticleSwarm.h"#include "Boundaries.h"#include "grid.h"#include "statistics_target.h"#include "statistics_accumulator.h"#include "statistics_window.h"#include "io.h"#include "field_catalog.h"#include "les.h"#include <stdlib.h>Go to the source code of this file.
Functions | |
| static void | MarkXPeriodic (UserCtx *user) |
| Marks both x boundary faces as geometric periodic boundaries. | |
| static PetscReal | PeriodicScalarValue (PetscInt i, PetscInt j, PetscInt k, PetscReal offset) |
| Returns a deterministic scalar value for periodic-transfer assertions. | |
| static PetscErrorCode | TestDistributeParticlesCollectiveConsistency (void) |
| Tests collective particle distribution consistency across MPI ranks. | |
| static PetscErrorCode | TestBoundingBoxCollectivesMultiRank (void) |
| Tests multi-rank bounding-box gather and broadcast helpers. | |
| static PetscErrorCode | TestPeriodicCellFieldSynchronizationMultiRank (void) |
| Tests distributed synchronization of persistent cell-centered scalar fields. | |
| static PetscErrorCode | TestPeriodicGeometryValidationMultiRank (void) |
| Tests periodic seam translation discovery when seam nodes are on different ranks. | |
| static PetscErrorCode | TestPeriodicFaceCenterCoordinatesMultiRank (void) |
| Tests translated face-center ghosts when the periodic axis is partitioned. | |
| static PetscErrorCode | TestPeriodicFaceFieldSynchronizationMultiRank (void) |
| Tests persistent I-face synchronization across an MPI-partitioned seam. | |
| static PetscErrorCode | TestPeriodicStaggeredFieldSynchronizationMultiRank (void) |
| Tests persistent Ucont synchronization across an MPI-partitioned seam. | |
| static PetscErrorCode | TestRestartCellIdMigrationMovesParticleToOwner (void) |
| Tests restart fast-path migration using preloaded cell ownership metadata. | |
| static PetscErrorCode | TestSpatialTargetIsDecompositionIndependent (void) |
| Spatial target domains must not depend on how ranks divide the block. | |
| static PetscErrorCode | TestStatisticsCheckpointRoundTripMultiRank (void) |
| Statistics payloads must survive a checkpoint round trip under decomposition. | |
| static PetscErrorCode | TestLESAveragingIsDecompositionIndependent (void) |
| Tests that LES coefficient averaging does not depend on the decomposition. | |
| int | main (int argc, char **argv) |
| Runs the unit-mpi PETSc test binary. | |
C unit tests for MPI collective helper routines.
Definition in file test_mpi_kernels.c.
|
static |
Marks both x boundary faces as geometric periodic boundaries.
Definition at line 24 of file test_mpi_kernels.c.
|
static |
Returns a deterministic scalar value for periodic-transfer assertions.
Definition at line 37 of file test_mpi_kernels.c.
|
static |
Tests collective particle distribution consistency across MPI ranks.
Definition at line 45 of file test_mpi_kernels.c.
|
static |
Tests multi-rank bounding-box gather and broadcast helpers.
Definition at line 78 of file test_mpi_kernels.c.
|
static |
Tests distributed synchronization of persistent cell-centered scalar fields.
Definition at line 123 of file test_mpi_kernels.c.
|
static |
Tests periodic seam translation discovery when seam nodes are on different ranks.
Definition at line 220 of file test_mpi_kernels.c.
|
static |
Tests translated face-center ghosts when the periodic axis is partitioned.
Definition at line 251 of file test_mpi_kernels.c.
|
static |
Tests persistent I-face synchronization across an MPI-partitioned seam.
Definition at line 305 of file test_mpi_kernels.c.
|
static |
Tests persistent Ucont synchronization across an MPI-partitioned seam.
Definition at line 353 of file test_mpi_kernels.c.
|
static |
Tests restart fast-path migration using preloaded cell ownership metadata.
Definition at line 428 of file test_mpi_kernels.c.
|
static |
Spatial target domains must not depend on how ranks divide the block.
The global point count is a function of layout, global dimensions, and periodicity alone. Summing the per-rank counts must therefore reproduce the same analytic totals a single rank computes, with no point counted twice at a decomposition seam and none dropped.
Definition at line 490 of file test_mpi_kernels.c.
|
static |
Statistics payloads must survive a checkpoint round trip under decomposition.
The write path gathers each accumulator into natural ordering before it reaches disk, and the read path scatters it back. That pairing is where a decomposition bug would live, so this drives the whole cycle on more than one rank and requires an exact match: the format stores IEEE doubles, and natural ordering is defined to be independent of how ranks divide the block.
Definition at line 550 of file test_mpi_kernels.c.
|
static |
Tests that LES coefficient averaging does not depend on the decomposition.
The averaged coefficient is a physical property of the block, so splitting the same field across more ranks must not change it. This case catches a wrong communicator, a halo entry counted as if it were owned, or a layout boundary plane included in one decomposition but not another. The reference is computed from the analytic definition over the interior index box rather than from a single-rank run, so the test does not merely compare one decomposition against itself.
Definition at line 682 of file test_mpi_kernels.c.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Runs the unit-mpi PETSc test binary.
Definition at line 758 of file test_mpi_kernels.c.