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

Implement increment for pure SoA #3278

Merged
merged 1 commit into from
Apr 27, 2023

Conversation

atmyers
Copy link
Member

@atmyers atmyers commented Apr 26, 2023

Follow-up to #2878.

The proposed changes:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • include documentation in the code and/or rst files, if appropriate

@atmyers atmyers requested a review from ax3l April 26, 2023 22:58
@ax3l ax3l self-assigned this Apr 26, 2023
Copy link
Member

@ax3l ax3l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@atmyers atmyers enabled auto-merge (squash) April 26, 2023 23:50
@atmyers atmyers merged commit a6e89ec into AMReX-Codes:development Apr 27, 2023
@ax3l
Copy link
Member

ax3l commented Apr 27, 2023

Not fully yet, tested and I get:

/home/axel/src/warpx/cmake-build-relwithdebinfo/_deps/fetchedamrex-src/Src/Particle/AMReX_MakeParticle.H:36:16: error: no matching function for call to 'amrex::SoAParticle<7, 0>::SoAParticle(const amrex::ConstParticleTileData<amrex::SoAParticleBase, 7, 0>&, int&)'
   36 |         return T_ParticleType(ptd, index);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~

in ECP-WarpX/WarpX#3850

We might need to generalize make_particle for this.

Maybe for SoA particle containers, we should allow only ConstSoAParticle in make_particle, since we return by value anyway.

With #3281 applied, it fails in

In file included from /home/axel/src/warpx/cmake-build-relwithdebinfo/_deps/fetchedamrex-src/Src/Base/AMReX_Array.H:9,
                 from /home/axel/src/warpx/cmake-build-relwithdebinfo/_deps/fetchedamrex-src/Src/Base/AMReX_Vector.H:9,
                 from /home/axel/src/warpx/Source/Particles/Collision/CollisionBase.H:13,
                 from /home/axel/src/warpx/Source/Particles/Collision/CollisionHandler.H:10,
                 from /home/axel/src/warpx/Source/Particles/MultiParticleContainer.H:17,
                 from /home/axel/src/warpx/Source/Particles/MultiParticleContainer.cpp:12:
/home/axel/src/warpx/cmake-build-relwithdebinfo/_deps/fetchedamrex-src/Src/Particle/AMReX_ParticleUtil.H: In instantiation of 'amrex::IntVect amrex::getParticleCell(const P&, const amrex::GpuArray<double, 3>&, const amrex::GpuArray<double, 3>&, const amrex::Box&) [with P = amrex::SoAParticleBase]':
/home/axel/src/warpx/cmake-build-relwithdebinfo/_deps/fetchedamrex-src/Src/Particle/AMReX_ParticleContainerI.H:589:38:   required from 'void amrex::ParticleContainer_impl<ParticleType, NArrayReal, NArrayInt, Allocator>::Increment(amrex::MultiFab&, int) [with T_ParticleType = amrex::SoAParticle<7, 0>; int T_NArrayReal = 7; int T_NArrayInt = 0; Allocator = std::allocator]'
/home/axel/src/warpx/Source/Particles/MultiParticleContainer.cpp:699:22:   required from here
/home/axel/src/warpx/cmake-build-relwithdebinfo/_deps/fetchedamrex-src/Src/Particle/AMReX_ParticleUtil.H:579:9: error: 'const struct amrex::SoAParticleBase' has no member named 'pos'
  579 |         AMREX_D_DECL(int(amrex::Math::floor((p.pos(0)-plo[0])*dxi[0])),
      |         ^~~~~~~~~~~~
``

@ax3l ax3l mentioned this pull request Apr 27, 2023
5 tasks
@ax3l
Copy link
Member

ax3l commented Apr 27, 2023

Update: my last push to #3281 seems to build with WarpX :)

atmyers added a commit to atmyers/amrex that referenced this pull request Apr 27, 2023
ax3l pushed a commit that referenced this pull request Apr 27, 2023
The proposed changes:
- [x] fix a bug or incorrect behavior in AMReX
- [ ] add new capabilities to AMReX
- [ ] changes answers in the test suite to more than roundoff level
- [ ] are likely to significantly affect the results of downstream AMReX
users
- [ ] include documentation in the code and/or rst files, if appropriate
guj pushed a commit to guj/amrex that referenced this pull request Jul 13, 2023
The proposed changes:
- [x] fix a bug or incorrect behavior in AMReX
- [x] add new capabilities to AMReX
- [ ] changes answers in the test suite to more than roundoff level
- [ ] are likely to significantly affect the results of downstream AMReX
users
- [ ] include documentation in the code and/or rst files, if appropriate
guj pushed a commit to guj/amrex that referenced this pull request Jul 13, 2023
…es#3284)

The proposed changes:
- [x] fix a bug or incorrect behavior in AMReX
- [ ] add new capabilities to AMReX
- [ ] changes answers in the test suite to more than roundoff level
- [ ] are likely to significantly affect the results of downstream AMReX
users
- [ ] include documentation in the code and/or rst files, if appropriate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants