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

Feature proposal: add data read/write routines #402

Open
aprokop opened this issue Sep 30, 2020 · 0 comments
Open

Feature proposal: add data read/write routines #402

aprokop opened this issue Sep 30, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@aprokop
Copy link
Contributor

aprokop commented Sep 30, 2020

Purpose

Facilitate easier examination of user data by allowing to save primitives and queries and subsequently share with us. Immediate use cases: NimbleSM (to study OpenMP/MPI scaling), CabanaMD (to play with the problem).

API

Something along the lines of

namespace ArborX {

template<typename Data>
void saveData(std::string const& filename, Data const& data, bool binary = false);

template<typename Data>
void saveData(std::string const& filename, MPI_Comm comm, Data const& data, bool binary = false);

template<typename MemorySpace>
auto loadData(std::string const& filename, bool binary = false);

template<typename MemorySpace>
auto loadData(std::string const& filename, MPI_Comm comm, bool binary = false);

}

The filenames automatically postfixed with .arborx. For distributed runs, they are postfixed with .<rank>.arborx.

Some ideas

We want to be able to save both primitives and predicates data.

For primitives, we save Kokkos::View<T*,MemorySpace> (either provided by a user, or constructed through AccessTraits). The metadata should include:

  • [optional] little endian/big endian (if saving in binary mode)
  • Size (number of primitives)
  • [optional] Data type Point/Box (we could deduce it from the sizes of the file, though)
  • Data

For predicates, we save Geometry (and k for the nearest). We can limit ourselves with Point and Box for the geometry for now, but think about providing a way to treat custom geometry as well in the future. In addition, possibly treat attachments. Callback will probably be harder.

@aprokop aprokop added the enhancement New feature or request label Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant