ExCALIBUR-NEPTUNE / NESO-Spack

Spack repository for installing NESO components and dependencies.
MIT License
2 stars 2 forks source link

Feature/neso particles #19

Closed will-saunders-ukaea closed 1 year ago

will-saunders-ukaea commented 1 year ago

This PR:

  1. Adds a NESO-Particles (NP) package following the NESO pattern of specifying a SYCL implementation.
  2. Adds a NESO-Particles dependency to NESO.

Testing:

  1. Tested NP tests pass with OneAPI/IntelMPI and HipSYCL/MPICH
  2. Tested NESO tests pass with OneAPI/IntelMPI and HipSYCL/MPICH (including with the NP interface branches).

Added subsection to README for NP. Ran black on the NP package.

cmacmackin commented 1 year ago

For some broader context, why is NESO-particles being developed independently of the main NESO repository? How tightly-coupled will they be? Will you be able to build one without the other? Will NESO be dependent on a particle commit of NESO-particles or will the latter just provide an API with semantic versioning?

will-saunders-ukaea commented 1 year ago

NESO depends on NESO-Particles (NP) but not vice-versa. So if you want a SYCL particle framework you can install NP and your only dependencies are MPI and SYCL implementations.

NP is currently implemented with the idea in mind that the user wants to transport particles over unstructured meshes and the user describes how the interface between the mesh and the particles works (by defining some classes and cell binning routines). This means that you can have a general mesh and as long as the shim exists between your mesh type and NP then particles can exist on your mesh. i.e. there are two existing interfaces that exist between NP and meshes 1) a built in interface between a Cartesian mesh and NP and 2) the shim between nektar 2D meshes and NP. NP can store data cell-wise but can also revert to a more classic single block of particles per MPI rank.

The tight coupling is being developed on the NESO side on the basis that the particle data is stored in NP data structures.

Will NESO be dependent on a particle commit of NESO-particles or will the latter just provide an API with semantic versioning?

Good question - this is something we should decide.

cmacmackin commented 1 year ago

Thanks, that's very helpful!

I would recommend trying to establish an API with semantic versioning through which NESO will interact with NP. This will allow the dependency info in the NESO package to ensure it is being built against a suitable version of NP. We can merge this PR before you have done that however.