Spiner

Spiner: Performance Portable Routines for Generic, Tabulated, Multi-Dimensional Data - Published in JOSS (2022)

https://github.com/lanl/spiner

Science Score: 98.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org, zenodo.org
  • Committers with academic emails
    7 of 10 committers (70.0%) from academic institutions
  • Institutional organization owner
    Organization lanl has institutional domain (www.lanl.gov)
  • JOSS paper metadata
    Published in Journal of Open Source Software
Last synced: 6 months ago · JSON representation

Repository

Performance portable routines for generic, tabulated, multi-dimensional data

Basic Info
Statistics
  • Stars: 9
  • Watchers: 7
  • Forks: 5
  • Open Issues: 12
  • Releases: 10
Created about 5 years ago · Last pushed 7 months ago
Metadata Files
Readme License

README.md

Spiner

Build Status

DOI

DOI

Performance portable utilities for representing and interpolating tabulated data. Named for Brent Spiner. For full documentation, see here.

Performance portability

Spiner is compatible with code on CPU, GPU, and everything in between. We use ports-of-call for this feature.

Building and Installation

Spiner is self-contained. Simply clone it as bash git clone --recursive git@github.com:lanl/spiner.git To build and run unit tests, bash mkdir bin cmake -DSPINER_BUILD_TESTS=ON .. make -j make test and to do convergence testing, bash make convergence after building.

To install, bash make install after configuring and building.

Build options

  • SPINER_USE_HDF enables or disables HDF5. Default is OFF
  • SPINER_USE_KOKKOS enables or disables Kokkos. Default is OFF.
  • SPINER_USE_CUDA enables or disables Cuda. Requires Kokkos. Default is OFF.
  • SPINER_BUILD_TESTS enables or disables tests. Default is OFF. If this is disabled, then configuration only prepares for install and provides targets for in-tree builds, as no build step is necessary.
  • SPINER_HDF5_INSTALL_DIR a hint for cmake about where you may have stashed HDF5.
  • SPINER_KOKKOS_INSTALL_DIR a hint for cmake about where you may have stashed Kokkos.

Including spiner in your project

You can build spiner in-line with your project, or pre-install it. It's header-only and the include directories should have the expected structure. If you build inline, add the following target to your cmake: cmake target_link_libraries(my_project PRIVATE spiner::spiner)

Dependencies

Spiner relies on ports-of-call for performance portability. It is included as a submodule. Otherwise, Spiner has no dependencies for the databox tool. Simply include it in your project under the spiner directory. It is header-only and requires only a few files:

  • spiner/databox.hpp
  • spiner/interpolation.hpp
  • spiner/spiner_types.hpp
  • spiner/sp5.hpp

To use the build system (rather than simply cloning and including the files) requires cmake.

The testing tooling requires a few different pieces:

  • Unit testing requires Catch2, which is downloaded automatically if needed.
  • Convergence testing requires the scientific python stack, including:
    • python3
    • numpy
    • matplotlib

HDF5

Spiner supports reading and writing DataBox objects into a custom HDF5 format called SP5. To enable this, compile with the appropriate HDF5 linking and the flag -DSPINER_USE_HDF. If you use the cmake build system, just configure with -DSPINER_USE_HDF=ON.

CUDA and Kokkos

Spiner uses the ports-of-call code to optionally support compilation with CUDA, Kokkos, or none of the above. If Kokkos is discoverable by cmake (for example if you installed it with spack), then the build system should find it automatically. Otherwise you can specify a location for Kokkos with SPINER_KOKKOS_INSTALL_DIR.

The following spack install was tested with a V100 GPU: bash spack install kokkos-nvcc-wrapper spack install kokkos~shared+cuda+cuda_lambda+cuda_relocatable_device_code+wrapper cuda_arch=70 and then the following cmake configuration line C++ cmake -DSPINER_USE_KOKKOS=ON -DSPINER_USE_CUDA=ON -DBUILD_TESTING=ON -DCMAKE_CXX_COMPILER=nvcc_wrapper .. builds the tests for CUDA.

Clang-Format

Clang-format version 12 is required for committing, and a github workflow is used to check that code meets format requirements. We provide a make target in the build system. After configuration, simply type bash make format_spiner to format the code.

Other versions of clang-format may work. If you would like to try, please examine the diff and see if the formatting appears stable. Otherwise, you may need to upgrade your version of clang-format.

In general, we recommend formatting regularly so that the format calls do not pollute the diffs. If a format call necessarily pollutes the diff, do it as a separate commit.

Features

  • Spiner supports interpolation in arbitrary dimensions, and it's fast in 3d and fewer.
  • Spiner supports interpolation onto "subtables"

Interpolation

Interpolation is linear. Here's an example of interpolation in 3D (2D slice shown). Convergence is second-order, as expected.

convergence plot

Interpolation is fast and portable. Here's performance on several different problem sizes and several different architectures with different parallelism strategies:

performance plot

Contributing

If you use Spiner and need help, submit an issue to the Spiner repository. If you'd like to contribute, just fork and submit a pull request. There's a check list in the PR template, and one of the main Spiner developers will review your PR.

Contributors

Spiner was primarily developed by Jonah Miller in collaboration with - Chad Meyer - Daniel Holladay - Josh Dolence - Sriram Swaminarayan

Continuous integration and build system support has been provided by - Jonah Miller - Karen Tsai - Christopher Mauney

Copyright

© (or copyright) 2019-2021. Triad National Security, LLC. All rights reserved. This program was produced under U.S. Government contract 89233218CNA000001 for Los Alamos National Laboratory (LANL), which is operated by Triad National Security, LLC for the U.S. Department of Energy/National Nuclear Security Administration. All rights in the program are reserved by Triad National Security, LLC, and the U.S. Department of Energy/National Nuclear Security Administration. The Government is granted for itself and others acting on its behalf a nonexclusive, paid-up, irrevocable worldwide license in this material to reproduce, prepare derivative works, distribute copies to the public, perform publicly and display publicly, and to permit others to do so.

This program is open source under the BSD-3 License. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE

Owner

  • Name: Los Alamos National Laboratory
  • Login: lanl
  • Kind: organization
  • Email: github-register@lanl.gov
  • Location: Los Alamos, New Mexico, USA

JOSS Publication

Spiner: Performance Portable Routines for Generic, Tabulated, Multi-Dimensional Data
Published
July 05, 2022
Volume 7, Issue 75, Page 4367
Authors
Jonah M. Miller ORCID
CCS-2, Computational Physics and Methods, Los Alamos National Laboratory, Los Alamos, NM, Center for Theoretical Astrophysics, Los Alamos National Laboratory, Los Alamos, NM
Daniel Holladay
Center for Theoretical Astrophysics, Los Alamos National Laboratory, Los Alamos, NM, CCS-7, Applied Computer Science, Los Alamos National Laboratory, Los ALamos, NM
Chad D. Meyer
XCP-4, Continuum Models and Numerical Methods, Los Alamos National Laboratory, Los ALamos, NM
Joshua C. Dolence
CCS-2, Computational Physics and Methods, Los Alamos National Laboratory, Los Alamos, NM, Center for Theoretical Astrophysics, Los Alamos National Laboratory, Los Alamos, NM
Sriram Swaminarayan
CCS-7, Applied Computer Science, Los Alamos National Laboratory, Los ALamos, NM
Christopher M. Mauney
Center for Theoretical Astrophysics, Los Alamos National Laboratory, Los Alamos, NM, HPC-ENV, HPC Environments, Los Alamo National Laboratory, Los Alamos, NM
Karen Tsai
CCS-7, Applied Computer Science, Los Alamos National Laboratory, Los ALamos, NM
Editor
Dan Foreman-Mackey ORCID
Tags
C++ Performance portability GPUs Numerical methods Interpolation Tabulated data

GitHub Events

Total
  • Release event: 2
  • Watch event: 2
  • Delete event: 27
  • Issue comment event: 17
  • Push event: 105
  • Pull request event: 43
  • Pull request review event: 28
  • Pull request review comment event: 9
  • Fork event: 2
  • Create event: 25
Last Year
  • Release event: 2
  • Watch event: 2
  • Delete event: 27
  • Issue comment event: 17
  • Push event: 105
  • Pull request event: 43
  • Pull request review event: 28
  • Pull request review comment event: 9
  • Fork event: 2
  • Create event: 25

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 262
  • Total Committers: 10
  • Avg Commits per committer: 26.2
  • Development Distribution Score (DDS): 0.565
Past Year
  • Commits: 58
  • Committers: 6
  • Avg Commits per committer: 9.667
  • Development Distribution Score (DDS): 0.5
Top Committers
Name Email Commits
Jonah Miller j****m@l****v 114
Richard Berger r****r@l****v 61
Christopher Mauney m****c@l****v 31
Jonah Miller j****r@g****m 21
Daniel Holladay d****0 10
github-actions[bot] g****] 8
Christopher Mauney m****c@p****v 8
Karen C. Tsai k****i@l****v 3
Ryan Thomas Wollaeger w****r@l****v 3
Lehman Garrison l****n@f****g 3
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 21
  • Total pull requests: 120
  • Average time to close issues: 5 months
  • Average time to close pull requests: 6 days
  • Total issue authors: 5
  • Total pull request authors: 12
  • Average comments per issue: 1.48
  • Average comments per pull request: 1.58
  • Merged pull requests: 103
  • Bot issues: 0
  • Bot pull requests: 10
Past Year
  • Issues: 1
  • Pull requests: 44
  • Average time to close issues: N/A
  • Average time to close pull requests: 2 days
  • Issue authors: 1
  • Pull request authors: 6
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.5
  • Merged pull requests: 34
  • Bot issues: 0
  • Bot pull requests: 7
Top Authors
Issue Authors
  • Yurlungur (13)
  • lgarrison (4)
  • mauneyc-LANL (2)
  • BrendanKKrueger (2)
  • rbberger (1)
Pull Request Authors
  • rbberger (47)
  • Yurlungur (46)
  • github-actions[bot] (14)
  • mauneyc-LANL (8)
  • BrendanKKrueger (5)
  • dholladay00 (4)
  • RyanWollaeger (4)
  • lgarrison (3)
  • danielskatz (3)
  • ktsai7 (2)
  • dfm (1)
  • jonahm-LANL (1)
Top Labels
Issue Labels
enhancement (7) help wanted (3) documentation (2) good first issue (2) question (1)
Pull Request Labels
enhancement (13) bug (11) documentation (2)

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
  • Total maintainers: 1
spack.io: spiner

Spiner: Performance portable routines for generic, tabulated, multi- dimensional data

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 26.7%
Average: 28.2%
Stargazers count: 28.9%
Dependent packages count: 57.3%
Maintainers (1)
Last synced: 10 months ago

Dependencies

.github/workflows/tests.yml actions
  • actions/checkout v3 composite
.github/workflows/docs.yml actions
  • actions/checkout v2 composite
  • peaceiris/actions-gh-pages v3.7.3 composite
.github/workflows/formatting.yml actions
  • actions/checkout v2 composite
.github/workflows/install.yml actions
  • actions/checkout v3 composite
.github/workflows/deps.yml actions
  • actions/checkout v3 composite