Repository navigation
Serializer chunked - #1669
Serializer chunked#1669feldergast wants to merge 5 commits into
Conversation
Serialization: - Add chunked_buffer, a caller-owned, reusable buffer made of chunks that grow from a minimum to a maximum size as needed. Data is stored densely, so it is byte-identical to packing into a single buffer. - Add serializer::start_packing(chunked_buffer&) and start_unpacking(const chunked_buffer&) overloads. Packing into a chunked_buffer does not require a sizing pass. Both report PACK and UNPACK modes, so serialize_order() code is unaffected. - Factor pointer tracking out of ser_packer/ser_unpacker into ser_pack_tracker/ser_unpack_tracker, which packer() and unpacker() now return, and share the pack/unpack operations between the fixed and growable packers and unpackers. MPI transfers: - Comms::broadcast(), send() and recv() serialize into chunked_buffers and send one message per chunk, receiving directly into chunked buffers. Sizes are 64-bit, and the sender's chunk size is sent with the data. all_gather() remains contiguous, with a 64-bit size exchange and an overflow check. - Rank sync (serial and parallel skip) sends RankSyncQueue data as chunks using persistent chunked send and receive buffers. The header now has a 64-bit size and the chunk size. - Add the --mpi-max-message-size option (default 256MiB) to set the maximum MPI message size, using UnitAlgebra sizes in bytes. Tests: - Add chunked_buffer tests and chunked variants of the serialization tests. - Add coreTestPayloadComponent and testsuite_default_Payload, which check large payloads exchanged between ranks with several message sizes and thread counts.
- Correct the setMaxMessageSize comment: broadcast/send/recv send the sender's chunk size with the data, but rank sync requires every rank to use the same mpi-max-message-size. Add matching comments at the rank sync check and where the size is set in main. - Receive the remaining chunks of rank sync transfers in parallel skip without blocking, so transfers from different ranks overlap and each is deserialized as soon as it is complete. The request vector for the remaining chunks is kept per receive pair and reused. - Document that Comms::all_gather is deliberately not chunked, and check for overflow before narrowing its counts and displacements. - Check the variant index in serializer::active() and throw std::logic_error on a mismatch, instead of relying on __builtin_unreachable().
testsuite_default_Payload.py, test_Payload.py and its reference file were not listed in EXTRA_DIST, so they would have been left out of distributions.
…phase Some simulations send much more data during init() and setup() than during the run phase. The rank sync buffers grow to fit the largest transfer and kept that size for the whole run. After setup(), force a rank exchange of the events sent during setup(), which were previously transferred at the first sync of the run phase, and then release the send and receive buffers and reset them to their initial sizes. Every rank does this at the same point, so the sizes the senders and receivers track stay consistent. Thread 0 does the exchange while the other threads wait, as for untimed data. The serial skip event exchange and the parallel skip thread 0 exchange are factored out so they are shared with the existing exchanges. Add setup_events and setup_payload parameters to the payload test component, and Payload tests with much larger transfers during init and setup than during the run phase.
|
Status Flag 'Pre-Test Inspection' - Auto Inspected - Inspection is Not Necessary for this Pull Request. |
|
Status Flag 'Pull Request AutoTester' - Failure: Timed out waiting for job SST__Autotest_OSX-15-XC16_OMPI-4.1.6_PY3.10_sst-elements to start: Total Wait = 303
|
active() had a deduced return type and is defined after the member templates that use it. Clang checks those non-dependent calls when the templates are parsed and reports that a function with a deduced return type cannot be used before it is defined. Give active() an explicit return type, using an alias for the variant type.
|
Status Flag 'Pre-Test Inspection' - Auto Inspected - Inspection is Not Necessary for this Pull Request. |
|
Status Flag 'Pull Request AutoTester' - Failure: Timed out waiting for job SST__Autotest_OSX-15-XC16_OMPI-4.1.6_PY3.10_sst-elements to start: Total Wait = 303
|
|
Status Flag 'Pull Request AutoTester' - Failure: Timed out waiting for job SST__Autotest_OSX-15-XC16_OMPI-4.1.6_PY3.10_sst-elements to start: Total Wait = 303
|
|
Status Flag 'Pull Request AutoTester' - Failure: Timed out waiting for job SST__Autotest_OSX-15-XC16_OMPI-4.1.6_PY3.10_sst-elements to start: Total Wait = 303
|
Adds new serializer pack/unpack modes that can be run without the sizer. They use a new chunked buffer type that will allocate space in chunks as needed for the data. This new mode is now used in objectComms and in the Sync objects. They set a maximum MPI message size that is used as the chunk size in the new buffers. This allows all MPI communications to handle over 2GB of data (sync transfers could not handle this before).
Fixes #958