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

Port enforce2d kokkos #940

Merged
merged 15 commits into from Jul 16, 2018

Conversation

Projects
None yet
4 participants
@Pakketeretet2
Copy link
Collaborator

Pakketeretet2 commented Jun 1, 2018

Purpose

This adds a port of enforce2d to Kokkos. It significantly speeds up calculations if this fix is the only non-kokkos-enabled fix so it will probably be helpful for people.

It would help if a Kokkos-expert (Stan) looks at the implementation in post_force. The calls to enforce2d of other fixes cannot assume the other fixes are Kokkos-enabled, so I figured it should be run after the parallel execution of this fix, and I also assumed it needs to sync before doing so. If there are any function calls that are not necessary, please remove them.
The current imlementation does work without issues and runs faster, but I would like to be sure. ;)
Also, the data masks don't really seem to make a difference, is that right?

Author(s)

Stefan Paquay and Matthew Peterson @ Brandeis University

Backward Compatibility

Just adds features, so yes.

Implementation Notes

I just copy pasted enforce2d and aped how it works in fix_nve_kokkos

Post Submission Checklist

Please check the fields below as they are completed

  • The feature or features in this pull request is complete
  • Suitable new documentation files and/or updates to the existing docs are included
  • The source code follows the LAMMPS formatting guidelines
void FixEnforce2DKokkos<DeviceType>::setup(int vflag)
{
if( comm->me == 0 ){
fprintf(screen, "omega, angmom and torque flags are %d, %d, %d\n",

This comment has been minimized.

@stanmoore1

stanmoore1 Jul 5, 2018

Contributor

Remove debug output


KOKKOS_INLINE_FUNCTION
void operator()(const int i) const {
// c.template? Really C++?

This comment has been minimized.

@stanmoore1

stanmoore1 Jul 5, 2018

Contributor

Remove comment

@stanmoore1

This comment has been minimized.

Copy link
Contributor

stanmoore1 commented Jul 5, 2018

@Pakketeretet2 This looks pretty good, just a few tweaks requested. I'm running this through our internal Kokkos regression tests. Thanks for the contribution!

@Pakketeretet2

This comment has been minimized.

Copy link
Collaborator

Pakketeretet2 commented Jul 6, 2018

That was fast! Thanks!

@stanmoore1 stanmoore1 assigned sjplimp and unassigned stanmoore1 Jul 6, 2018

@stanmoore1

This comment has been minimized.

Copy link
Contributor

stanmoore1 commented Jul 6, 2018

@Pakketeretet2 I finally have some time to work on this...

@Pakketeretet2

This comment has been minimized.

Copy link
Collaborator

Pakketeretet2 commented Jul 6, 2018

Just to be clear, I meant your response to the final changes, not the overall process; I figured you must be busy with something else. ;)

See you next week!

@stanmoore1 stanmoore1 assigned stanmoore1 and unassigned sjplimp Jul 6, 2018

@stanmoore1

This comment has been minimized.

Copy link
Contributor

stanmoore1 commented Jul 6, 2018

@Pakketeretet2 no worries. Looks like there was a segfault from cleanup_copy in the ASPHERE examples. I switched over to copymode since that is the newer method of protecting the destructor.

@stanmoore1

This comment has been minimized.

Copy link
Contributor

stanmoore1 commented Jul 11, 2018

@Pakketeretet2 I'm going to run this through the regression tests again, and then it should be ready to merge.

@stanmoore1 stanmoore1 assigned sjplimp and unassigned stanmoore1 Jul 13, 2018

@akohlmey akohlmey added this to the Stable Release Summer 2018 milestone Jul 16, 2018

@sjplimp sjplimp merged commit 5fc4aae into lammps:master Jul 16, 2018

5 checks passed

lammps/pull-requests/build-docs-pr head run ended
Details
lammps/pull-requests/kokkos_omp head run ended
Details
lammps/pull-requests/openmpi-pr head run ended
Details
lammps/pull-requests/serial-pr head run ended
Details
lammps/pull-requests/shlib-pr head run ended
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment