|
| int | main (int argc, char **argv) |
| |
| | TEST_CASE ("SerializerJSON scalar round-trip") |
| |
| | TEST_CASE ("ArrayPair redistribute — same np round-trip") |
| |
| | TEST_CASE ("ArrayPair redistribute — shuffled partition same np") |
| |
| template<class T > |
| T | MakeTestValue (DNDS::index origIdx, DNDS::rowsize col) |
| |
| | REDIST_TAG_STR (DNDS::real, LayoutStaticFixed, 1) |
| |
| | REDIST_TAG_STR (DNDS::real, LayoutStaticFixed, 3) |
| |
| | REDIST_TAG_STR (DNDS::real, LayoutStaticFixed, 7) |
| |
| | REDIST_TAG_STR (DNDS::real, LayoutDynamic, 1) |
| |
| | REDIST_TAG_STR (DNDS::real, LayoutDynamic, 3) |
| |
| | REDIST_TAG_STR (DNDS::real, LayoutDynamic, 7) |
| |
| | REDIST_TAG_STR (DNDS::real, LayoutCSR, 0) |
| |
| | REDIST_TAG_STR (DNDS::index, LayoutStaticFixed, 1) |
| |
| | REDIST_TAG_STR (DNDS::index, LayoutStaticFixed, 3) |
| |
| | REDIST_TAG_STR (DNDS::index, LayoutStaticFixed, 7) |
| |
| | REDIST_TAG_STR (DNDS::index, LayoutDynamic, 1) |
| |
| | REDIST_TAG_STR (DNDS::index, LayoutDynamic, 3) |
| |
| | REDIST_TAG_STR (DNDS::index, LayoutDynamic, 7) |
| |
| | REDIST_TAG_STR (DNDS::index, LayoutCSR, 0) |
| |
| | REDIST_TAG_STR (uint16_t, LayoutStaticFixed, 1) |
| |
| | REDIST_TAG_STR (uint16_t, LayoutStaticFixed, 3) |
| |
| | REDIST_TAG_STR (uint16_t, LayoutStaticFixed, 7) |
| |
| | REDIST_TAG_STR (uint16_t, LayoutDynamic, 1) |
| |
| | REDIST_TAG_STR (uint16_t, LayoutDynamic, 3) |
| |
| | REDIST_TAG_STR (uint16_t, LayoutDynamic, 7) |
| |
| | REDIST_TAG_STR (uint16_t, LayoutCSR, 0) |
| |
| | REDIST_TAG_STR (int32_t, LayoutStaticFixed, 1) |
| |
| | REDIST_TAG_STR (int32_t, LayoutStaticFixed, 3) |
| |
| | REDIST_TAG_STR (int32_t, LayoutStaticFixed, 7) |
| |
| | REDIST_TAG_STR (int32_t, LayoutDynamic, 1) |
| |
| | REDIST_TAG_STR (int32_t, LayoutDynamic, 3) |
| |
| | REDIST_TAG_STR (int32_t, LayoutDynamic, 7) |
| |
| | REDIST_TAG_STR (int32_t, LayoutCSR, 0) |
| |
| | REDIST_TAG_STR (uint8_t, LayoutStaticFixed, 1) |
| |
| | REDIST_TAG_STR (uint8_t, LayoutStaticFixed, 3) |
| |
| | REDIST_TAG_STR (uint8_t, LayoutStaticFixed, 7) |
| |
| | REDIST_TAG_STR (uint8_t, LayoutDynamic, 1) |
| |
| | REDIST_TAG_STR (uint8_t, LayoutDynamic, 3) |
| |
| | REDIST_TAG_STR (uint8_t, LayoutDynamic, 7) |
| |
| | REDIST_TAG_STR (uint8_t, LayoutCSR, 0) |
| |
| | TEST_CASE_TEMPLATE ("redistribute", Tag, REDIST_ALL_TAGS) |
| |
| template<class T , class L , DNDS::rowsize RS> |
| void | TestDifferentNp (int npWrite, DNDS::index baseSize) |
| |
| | TEST_CASE_TEMPLATE ("redistribute different-np", Tag, REDIST_ALL_TAGS) |
| |
| | TEST_CASE ("SerializerJSON vector round-trip") |
| |
| | TEST_CASE ("SerializerJSON uint8 array round-trip") |
| |
| | TEST_CASE ("SerializerJSON path operations") |
| |
| | TEST_CASE ("SerializerJSON shared pointer deduplication") |
| |
| | TEST_CASE ("SerializerH5 scalar round-trip") |
| |
| | TEST_CASE ("SerializerH5 vector round-trip") |
| |
| | TEST_CASE ("SerializerH5 distributed vector") |
| |
| | TEST_CASE ("SerializerH5 uint8 distributed round-trip") |
| |
| | TEST_CASE ("SerializerH5 path operations") |
| |
| | TEST_CASE ("SerializerH5 string round-trip") |
| |
Doctest-based unit tests for DNDS Serializer classes.
Covers SerializerJSON (per-rank, no MPI needed for logic) and SerializerH5 (parallel HDF5, requires MPI). The JSON tests verify scalar, vector, uint8 (with/without codec), path operations, and shared-pointer deduplication. The H5 tests verify scalar, vector, distributed vector (non-uniform per-rank sizes), uint8 (two-pass read), path operations, and string round-trips.
- Note
- H5 parallel I/O requires all MPI ranks to open the same file. The TmpH5() helper broadcasts rank 0's PID so that the filename is identical across all ranks. FileGuard uses shared=true for H5 files so only rank 0 deletes the file, followed by an MPI_Barrier.
Build: cmake --build . -t dnds_test_serializer -j8 Run: mpirun -np 1 ./dnds_test_serializer (JSON + H5 single rank) mpirun -np 4 ./dnds_test_serializer (H5 distributed tests)
- See also
- DNDS Core Unit Tests for the full test-suite overview.
- Test:
- SerializerJSON scalar/vector/uint8/path/pointer round-trip, SerializerH5 scalar/vector/distributed/uint8/path/string round-trip.
Definition in file test_Serializer.cpp.