-
Notifications
You must be signed in to change notification settings - Fork 26
P3M Merge #334
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
base: master
Are you sure you want to change the base?
P3M Merge #334
Conversation
…MP and GPU builds
Why did you add the plot's? In general pdfs of results should not be in the repo. Are these plots used in your thesis? |
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.
I skimmed a bit over the code (I won't have time to actually understand the solver itself until in two weeks...). But here are a view comments:
- I agree @aaadelmann, I think we should remove the
plots/...
andpython_scripts/...
folder for the merge., since they are not part of the solver itself? - The files under
test/p3m/...
seem nice, and I think they could also easily be converted into unit tests. - I added a view suggestions above concerning the code/file structure. I think, it might make sense to make an effort in keeping it consistent with the existing structure (mainly regarding Alpine mini apps and manager classes):
- Remove the
P3M3DManager
, since it is basically the same asPicManager
(just a suggestion, there might be room for debate here). - Remove
src/p3m/
and putP3MParticleContainer
together with the high level P3M manager(s) into aalpine/p3m/...
folder.
- Remove the
I have not yet looked into the alpine/[...]P3M[...]
(or src/PoissonSolvers/P3MSolver[...]
) classes yet, since (as mentioned) I don't fully understand the algorithm yet... But I suppose it is probably not necessary to look too much into it just yet for this merge?
src/Manager/P3M3DManager.h
Outdated
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.
Is this manager really necessary? If I am not wrong, then this is exactly the same as PicManager without the load balancer and with an additional par2par()
method.
Also: this method seems to be a function that calculates actual interaction, so maybe, conceptually, it should not be part of a "manager" parent class anyways?
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.
P3M3DManager has its particle container fixed to P3MParticleContainer instead of having a template parameter or it. does this make it reason enough to have a separate class for it?
src/P3M/P3MParticleContainer.hpp
Outdated
using Device = Kokkos::DefaultExecutionSpace; | ||
using NList_t = Kokkos::View<unsigned int *, Device>; | ||
using Offset_t = Kokkos::View<int [14*3], Device>; |
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.
This should be inside the class.
src/P3M/P3MParticleContainer.hpp
Outdated
ippl::ParticleAttrib<double> Q; // charge | ||
typename Base::particle_position_type P; // particle velocity | ||
typename Base::particle_position_type E; // electric field at particle position | ||
ippl::ParticleAttrib<double> phi; // electric potential at particle position |
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.
Maybe I did not find it, but is phi
even used anywhere?
src/P3M/P3MParticleContainer.hpp
Outdated
PLayout_t<T, Dim> pl_m; // Particle layout | ||
NList_t nl_m; // NeighborList | ||
bool nlValid_m; // true if neighbor list was initialized | ||
bool *neighbors_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.
Should neighbors_m
be a smart pointer instead of a regular pointer?
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.
this should be an array of bools. what is the best datatype to do this? is a std::vector possible or should it be a Kokkos::View?
double start = MPI_Wtime(); | ||
manager.run(manager.getNt()); | ||
double end = MPI_Wtime(); |
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.
This could be measured using IpplTimings
.
Update after todays IPPL Meeting: Let's not extend "alpine", but rather create a separate directory. Also: I think it would improve clarity if we created a new "examples" directory, where we put all these mini apps in. Maybe a folder structure like the following:
Also I just notices you removed @0xBachmann be carefule with the difference between a manager class and a container class ;):
Therefore, removing the only P3MContainer is not a good idea, it should be high level part of the "P3M mini apps". Removing the code duplication introduced by the P3M3DManager, which does not need to be a high level specialization, however, should improve clarity. |
Pull request to merge the P3M codes into the main repository.