-
Notifications
You must be signed in to change notification settings - Fork 132
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
Support writing MPCD particle data to file #774
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
This issue has been automatically closed because it has not had recent activity. |
@joaander I would like to restart the discussion on this. I am having issues, similar to what I saw on Blue Waters a long time ago, where the process of taking a I think it would be great if we had a way to read/write the MPCD particles to GSD, but I am not sure how to proceed. What would be the best way to do this? |
Similar to the HOOMD v2 codebase, hoomd-blue/hoomd/simulation.py Lines 230 to 240 in da678fe
This always requires rank 0 to have enough memory to store the entire system. For MD/HPMC simulations, the memory/per node has grown massively with core counts in recent years so I have not found a strong need to refactor the initialization to operate with in parallel with O(N/P) memory requirements. I think you would need to implement parallel initialization for MPCD particles to solve the problem you mention - though the problem could be an underlying limitation in the size of arrays supported by MPI. The gsd C API would also need to be expanded with partial data chunk reading support to avoid reading all N particles on each rank. On the other points:
|
I did some additional testing for my simulation that was crashing, and I came to the same conclusion. I think the issue is with the use of I saw that MPICH has an Unfortunately, this means that parallel initialization and write would be necessary to fix my problem because I could not go through a
MPCD particles are like pared down HOOMD particles. They each have a position, velocity, and typeid. Additionally, we would need to record the number of particles, the mass m (a scalar, same for all particles), and the list of types. We would also want to have a copy of the box.
I would want them to be ignored because there are so many particles, and they are also basically points.
That is a good point. If the MPCD particles were in the HOOMD schema, I would put it in its
? Overall, I think probably then the question is whether we want the MPCD particles to be part of the standard HOOMD schema (initialize at the same time as the MD particles, write like above), or make a separate MPCD schema (initialize separately from the MD particles, always write separately too). The argument for the first is convenience for single frame operations like initialization and restart, but a potentially clunkier mechanism for making a trajectory and it adds to the HOOMD schema. The argument for the second one is that it doesn't touch the HOOMD schema, and writing trajectories is cleaner / the user is less likely to make a mistake of writing too much data. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Description
The state of the MPCD particle data cannot currently be saved to a GSD file. We have done restarts by using a snapshot with NumPy arrays to save the final state, but it would be more convenient to be able to save this directly in a nicer file format. I discussed this with @joaander a long time ago but there seem to be two options, and I wanted to get feedback / thoughts on them:
With the new v3 API, does one of these seem simpler / more appealing? I'm thinking in particular about how initialization might look. Currently, MPCD initialization happens in a second stage from the HOOMD system, so would the same GSD file need to be read twice (in two init commands) if we went with option 2? Also, there are usually many MPCD particles so it is not good to save them too frequently (i.e., the MPCD particle data would probably be written much less frequently than the HOOMD particle data). Last, is one of these options easier in terms of accessing the data using the
gsd
python module (like, one is already supported but the other would need to be implemented)?I was somewhat favoring option 1, but I am totally open to either.With the new API, this is probably easier using approach 2 so that the MPCD particles can be initialized from the same GSD file as the MD particles. Otherwise, we need an additional argument for the MPCD GSD file, or a method that can be called after the state is created to also read the MPCD particles.Developer
I will work on this eventually, but it will be lower priority for me than the other migration tasks because there is a reasonable workaround already.
The text was updated successfully, but these errors were encountered: