amrex icon indicating copy to clipboard operation
amrex copied to clipboard

Support SoA-Only Particles

Open Thierry992 opened this issue 3 years ago • 4 comments

Summary

Further updates of #2853 where @atmyers and @ax3l can also push to.

Additional background

Checklist

The proposed changes:

  • [ ] 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

Thierry992 avatar Jul 15 '22 19:07 Thierry992

@Thierry992 @atmyers let us make sure this PR is passing this week, because @Thierry992 and @np-eazy will use this in ImpactX for the hackathon next week :)

ax3l avatar Sep 06 '22 20:09 ax3l

I think amrex::ParticleContainer::make_alike, e.g., in

// create a host-side particle buffer
auto tmp = pc.make_alike<amrex::PinnedArenaAllocator>();

is not yet working.

ax3l avatar Sep 07 '22 00:09 ax3l

@Thierry992 please implement make_alike & ContainerLike for the new SoA container for ImpactX/WarpX: https://github.com/AMReX-Codes/amrex/blob/826cd378f8ba0d844c64e1029f7914c3b066debd/Src/Particle/AMReX_ParticleContainer.H#L1248-L1271

ax3l avatar Sep 17 '22 01:09 ax3l

@Thierry992 I think (Const)ParticleTile methods:

  • int numParticles () const { return m_aos_tile.numParticles(); }
  • int numRealParticles () const { return m_aos_tile.numRealParticles(); }
  • int numNeighborParticles () const { return m_aos_tile.numNeighborParticles(); }
  • int numTotalParticles () const { return m_aos_tile.numTotalParticles() ; }

Do not yet return the number of particles for pure SoA particle containers, right?

ax3l avatar Sep 28 '22 15:09 ax3l

@atmyers I updated this branch following AMReX' C++17 transition. Do you potentially have time to look further into the MPI debugging?

ax3l avatar Nov 01 '22 20:11 ax3l

I fixed a couple of issues, the ImpactX examples seems to work on multiple ranks now.

atmyers avatar Nov 02 '22 21:11 atmyers

Awesome - I merged development in and we can now fix the warnings and get this ready :rocket: :tada:

ax3l avatar Jan 02 '23 12:01 ax3l

Looking right now in pyAMReX for changes from this PR to low-level data access: https://github.com/AMReX-Codes/pyamrex/pull/119

Currently, I cannot find these properties (this PR but old layout)

  • ParticleTileType::size
  • ParticleTileType::numParticles
  • ParticleTileType::numRealParticles
  • ParticleTileType::numNeighborParticles
  • ParticleTileType::numTotalParticles
  • ParticleTileDataType::getSuperParticle

update: Ah, maybe need to be explicit to resolve the sfinae in the methods in pybind code - all good.

ax3l avatar Apr 08 '23 00:04 ax3l

@atmyers @WeiqunZhang shall we merge this now? :) That way, we have still two weeks to update downstream codes and fix potential regressions before tagging a new release.

ax3l avatar Apr 17 '23 01:04 ax3l