-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce MPI communication overhead #4414
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Re-order struct data members to reduce padding. New sizes in bytes: sizeof(Particle): 624 -> 592 sizeof(ParticleLocal): 48 -> 40 sizeof(ParticleProperties): 328 -> 304 sizeof(StoredParticleProperty): 24 -> 16
Since the size of Array and Vector objects is known at compile time, it doesn't have to be communicated. This spares an integer and a prefix code during MPI communication operations, thus reducing the serialization buffer size by 33% for Vector3i (from 24 to 16 bytes) and by 22% for Vector3d (from 36 to 28 bytes).
Change the Boost serialization object class info to elide two short ints (version for Utils::detail::Storage and Utils::Array), thus reducing the serialization buffer size by 25% for Vector3i (from 16 to 12 bytes) and by 14% for Vector3d (from 28 to 24 bytes).
Since Array and Vector objects are not communicated by pointers, it is not necessary for Boost to track double deserialization.
jngrad
force-pushed
the
fix-4415
branch
2 times, most recently
from
January 3, 2022 15:47
52c7295
to
d525961
Compare
jngrad
changed the title
Improve Vector and Particle serialization
Reduce MPI communication overhead
Jan 3, 2022
Provide a mechanism to walk through a serialization tree recursively to check for a specific trait. Check that all fixed-length members of the Particle struct are statically serializable. The std::vector objects should be the only non-statically serializable members.
reinaual
previously approved these changes
Mar 28, 2022
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
reinaual
approved these changes
Mar 28, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #4415, fixes #3638
Description of changes:
Utils::Array
,Utils::Vector
andUtils::Quaternion
as MPI datatypes and bitwise serializableUtils::Vector
andParticle
by removing tracking information and metadataParticle
substructs are bitwise serializableFor a LJ fluid simulation, the speed-up is around 8% on maxset configuration and 3% on empty configuration.