-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add Particle I/O: restart & restart_checkpoint #342
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great so far! 👍
Does a separate particle container need to be created for each app? We have this (+more to come): |
The real problem is that we will have some ParticleContainers with a variable number of real components for each simulation... |
Yes, so far. Another change I will put into BLAST codes is to use the Polymorphic particle container, where Arena is not a template parameter. On the PC level, having the Arena a C++ template appears unnecessary to me and should not have any performance benefits (in symmetry, the MultiFabs also have it only as a runtime parameter). |
for more information, see https://pre-commit.ci
I'm currently stalled on a head-scratcher: when I run
Most strange ... any advice? |
The issue is a double init. You can remove this: We init and finalize amrex in a fixture for all tests here: To run only your latest test while you develop, run this: python3 -m pytest tests/test_plotfileparticledata.py the tests are not intended to be run without the pytest module, but can be sub-selected for productivity to feel like a standalone script. |
It looks like when building in debug mode (with more checks), the test still fails. |
Any idea why the tests fail? Seems to depend on compiler version... Which is never a good sign... |
Please see comments from yesterday. It fails in debug mode, where AMReX does more checks for validity. Likely because the added positions do not line up with the domain decomposition. |
for more information, see https://pre-commit.ci
from last commit
pre-commit hook fix. the lambda is named anyway here
Rpart[i + particles_tile_ct].to_soa(p) | ||
particles_tile_ct += len(aos_numpy) | ||
|
||
pc.redistribute() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JBlaschke This fixed the pc.OK()
issue that you saw when running AMReX in Debug mode. Please double check (maybe with print
debugging) if this does what you expect to do or if you geometry needs adjustment, if the pc.redistribute
removes particles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, Johannes! 🚀 ✨
void init_ParticleContainer_FHDeX(py::module& m) { | ||
using namespace amrex; | ||
|
||
make_ParticleContainer_and_Iterators<Particle<16, 4>, 0, 0>(m); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JBlaschke do you need this for 1D, 2D and 3D AMReX builds or only for 3D?
Adding particle I/O. Working on proper tests now.
This will also read FHDeX particles.
@ax3l let me know if you have early feedback