Skip to content
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

Fix segfaults for MPCD with large particle counts under MPI #1897

Draft
wants to merge 5 commits into
base: trunk-patch
Choose a base branch
from

Conversation

mphoward
Copy link
Collaborator

@mphoward mphoward commented Sep 26, 2024

Description

This PR refactors parts of the MPCD code that relied on generic serialized MPI routines to instead use custom MPI datatypes. This increases the amount of data that can be sent because each object is larger. This is an attempt to fix segfaults reported when either initializing from or taking a snapshot with a large number of MPCD particles.

I replaced most uses of bcast with MPI_Bcast while I was at it since this is a relatively simple MPI call.

I also added exceptions when the serialized methods exceed the byte count that can be stored in a signed int.

Motivation and context

Large numbers of particles seem to lead to overflow of the serialized MPI methods.

Resolves #1895

How has this been tested?

Existings tests pass. I will confirm with reporting user (or test on a cluster myself) that this fixes the segfaults they were observing.

Change log

* Fix segmentation faults initializing MPCD simulations with large numbers (~100+ million) of MPCD particles under MPI.

Checklist:

Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale There has been no activity on this for some time. label Oct 16, 2024
@mphoward mphoward removed the stale There has been no activity on this for some time. label Oct 17, 2024
@mphoward
Copy link
Collaborator Author

Not stale—haven't had time to finish this off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segmentation fault for MPI operations on large data sizes
1 participant