diff --git a/joss.06805/10.21105.joss.06805.crossref.xml b/joss.06805/10.21105.joss.06805.crossref.xml new file mode 100644 index 0000000000..e00c930789 --- /dev/null +++ b/joss.06805/10.21105.joss.06805.crossref.xml @@ -0,0 +1,361 @@ + + + + 20241107202333-81bc61a1d7c272b54978eafcc3c3525167e305d9 + 20241107202333 + + JOSS Admin + admin@theoj.org + + The Open Journal + + + + + Journal of Open Source Software + JOSS + 2475-9066 + + 10.21105/joss + https://joss.theoj.org + + + + + 11 + 2024 + + + 9 + + 103 + + + + Singularity-EOS: Performance Portable Equations of +State and Mixed Cell Closures + + + + Jonah M. + Miller + + CCS-2, Computational Physics and Methods, Los Alamos National Laboratory, USA + Center for Theoretical Astrophysics, Los Alamos National Laboratory, Los Alamos, NM + + https://orcid.org/0000-0001-6432-7860 + + + Daniel A. + Holladay + + Center for Theoretical Astrophysics, Los Alamos National Laboratory, Los Alamos, NM + CCS-7, Applied Computer Science, Los Alamos National Laboratory, USA + + https://orcid.org/0000-0002-0673-9741 + + + Jeffrey H. + Peterson + + XCP-2, Eulerian Codes, Los Alamos National Laboratory, USA + + https://orcid.org/0000-0001-9425-4674 + + + Christopher M. + Mauney + + Center for Theoretical Astrophysics, Los Alamos National Laboratory, Los Alamos, NM + HPC-ENV, HPC Environments, Los Alamos National Laboratory, USA + + https://orcid.org/0000-0002-7827-2247 + + + Richard + Berger + + CCS-7, Applied Computer Science, Los Alamos National Laboratory, USA + + https://orcid.org/0000-0002-3044-8266 + + + Anna Pietarila + Graham + + HPC-ENV, HPC Environments, Los Alamos National Laboratory, USA + + + + Karen C. + Tsai + + CCS-7, Applied Computer Science, Los Alamos National Laboratory, USA + + https://orcid.org/0000-0003-2848-832X + + + Brandon + Barker + + CCS-2, Computational Physics and Methods, Los Alamos National Laboratory, USA + Center for Theoretical Astrophysics, Los Alamos National Laboratory, Los Alamos, NM + Department of Physics and Astronomy, Michigan State University, USA + Center for Nonlinear Studies, Los Alamos National Laboratory, USA + + https://orcid.org/0000-0002-8825-0893 + + + Alexander + Holas + + Center for Theoretical Astrophysics, Los Alamos National Laboratory, Los Alamos, NM + CCS-7, Applied Computer Science, Los Alamos National Laboratory, USA + Heidelberg Institute for Theoretical Studies, Germany + + https://orcid.org/0000-0001-5184-6928 + + + Ann E. + Mattsson + + XCP-5, Materials and Physical Data, Los Alamos National Laboratory, USA + + https://orcid.org/0000-0002-0677-7537 + + + Mariam + Gogilashvili + + CCS-2, Computational Physics and Methods, Los Alamos National Laboratory, USA + Center for Theoretical Astrophysics, Los Alamos National Laboratory, Los Alamos, NM + Center for Nonlinear Studies, Los Alamos National Laboratory, USA + Department of Physics, Florida State University, USA + + https://orcid.org/0000-0002-6944-8052 + + + Joshua C. + Dolence + + CCS-2, Computational Physics and Methods, Los Alamos National Laboratory, USA + Center for Theoretical Astrophysics, Los Alamos National Laboratory, Los Alamos, NM + + https://orcid.org/0000-0003-4353-8751 + + + Chad D. + Meyer + + XCP-4, Continuum Models and Numerical Methods, Los Alamos National Laboratory, USA + + https://orcid.org/0000-0002-7530-6173 + + + Sriram + Swaminarayan + + CCS-7, Applied Computer Science, Los Alamos National Laboratory, USA + + https://orcid.org/0000-0003-1809-5231 + + + Christoph + Junghans + + CCS-7, Applied Computer Science, Los Alamos National Laboratory, USA + + https://orcid.org/0000-0003-0925-1458 + + + + 11 + 07 + 2024 + + + 6805 + + + 10.21105/joss.06805 + + + http://creativecommons.org/licenses/by/4.0/ + http://creativecommons.org/licenses/by/4.0/ + http://creativecommons.org/licenses/by/4.0/ + + + + Software archive + 10.5281/zenodo.14052387 + + + GitHub review issue + https://github.com/openjournals/joss-reviews/issues/6805 + + + + 10.21105/joss.06805 + https://joss.theoj.org/papers/10.21105/joss.06805 + + + https://joss.theoj.org/papers/10.21105/joss.06805.pdf + + + + + + Sesame: The los alamos national laboratory +equation of state database + Lyon + 1992 + Lyon, S. P., & Johnson, J. D. +(1992). Sesame: The los alamos national laboratory equation of state +database (LA-UR-92-3407). Los Alamos National +Laboratory. + + + A new open-source code for spherically +symmetric stellar collapse to neutron stars and black +holes + O’Connor + Classical and Quantum Gravity + 11 + 27 + 10.1088/0264-9381/27/11/114103 + 2010 + O’Connor, E., & Ott, C. D. +(2010). A new open-source code for spherically symmetric stellar +collapse to neutron stars and black holes. Classical and Quantum +Gravity, 27(11), 114103. +https://doi.org/10.1088/0264-9381/27/11/114103 + + + Stellar collapse: +microphysics + O’Connor + 2010 + O’Connor, E., & Ott, C. D. +(2010). Stellar collapse: microphysics. +https://stellarcollapse.org/equationofstate + + + EOSPAC user’s manual: v.6.5 + Pimentel + 10.2172/1765849 + 2021 + Pimentel, D. A. (2021). EOSPAC user’s +manual: v.6.5. Los Alamos National Lab. (LANL), Los Alamos, NM (United +States). https://doi.org/10.2172/1765849 + + + Kokkos 3: Programming model extensions for +the exascale era + Trott + IEEE Transactions on Parallel and Distributed +Systems + 4 + 33 + 10.1109/TPDS.2021.3097283 + 2022 + Trott, C. R., Lebrun-Grandié, D., +Arndt, D., Ciesko, J., Dang, V., Ellingwood, N., Gayatri, R., Harvey, +E., Hollman, D. S., Ibanez, D., Liber, N., Madsen, J., Miles, J., +Poliakoff, D., Powell, A., Rajamanickam, S., Simberg, M., Sunderland, +D., Turcksin, B., & Wilke, J. (2022). Kokkos 3: Programming model +extensions for the exascale era. IEEE Transactions on Parallel and +Distributed Systems, 33(4), 805–817. +https://doi.org/10.1109/TPDS.2021.3097283 + + + CUDA, release: 10.2.89 + NVIDIA + 2020 + NVIDIA, Vingelmann, P., & Fitzek, +F. H. P. (2020). CUDA, release: 10.2.89. +https://developer.nvidia.com/cuda-toolkit + + + Parallel programming in OpenMP + Chandra + 2001 + Chandra, R., Dagum, L., Kohr, D., +Menon, R., Maydan, D., & McDonald, J. (2001). Parallel programming +in OpenMP. Morgan kaufmann. + + + OpenMP application program interface version +4.0 + OpenMP Architecture Review Board + 2013 + OpenMP Architecture Review Board. +(2013). OpenMP application program interface version 4.0. +https://www.openmp.org/wp-content/uploads/OpenMP4.0.0.pdf + + + SYCL 2020: More than meets the +eye + Reyes + Proceedings of the international workshop on +OpenCL + 10.1145/3388333.3388649 + 9781450375313 + 2020 + Reyes, R., Brown, G., Burns, R., +& Wong, M. (2020). SYCL 2020: More than meets the eye. Proceedings +of the International Workshop on OpenCL. +https://doi.org/10.1145/3388333.3388649 + + + Not-Quite Transcendental Functions and their +Applications + Miller + arXiv e-prints + 10.48550/arXiv.2206.08957 + 2022 + Miller, J. M., Dolence, J. C., & +Holladay, D. (2022). Not-Quite Transcendental Functions and their +Applications. arXiv e-Prints, arXiv:2206.08957. +https://doi.org/10.48550/arXiv.2206.08957 + + + The spack package manager: Bringing order to +HPC software chaos + Gamblin + Proceedings of the international conference +for high performance computing, networking, storage and +analysis + 10.1145/2807591.2807623 + 9781450337236 + 2015 + Gamblin, T., LeGendre, M., Collette, +M. R., Lee, G. L., Moody, A., Supinski, B. R. de, & Futral, S. +(2015). The spack package manager: Bringing order to HPC software chaos. +Proceedings of the International Conference for High Performance +Computing, Networking, Storage and Analysis. +https://doi.org/10.1145/2807591.2807623 + + + + + + diff --git a/joss.06805/10.21105.joss.06805.pdf b/joss.06805/10.21105.joss.06805.pdf new file mode 100644 index 0000000000..5ab093c998 Binary files /dev/null and b/joss.06805/10.21105.joss.06805.pdf differ diff --git a/joss.06805/paper.jats/10.21105.joss.06805.jats b/joss.06805/paper.jats/10.21105.joss.06805.jats new file mode 100644 index 0000000000..9c8c40fb17 --- /dev/null +++ b/joss.06805/paper.jats/10.21105.joss.06805.jats @@ -0,0 +1,665 @@ + + +
+ + + + +Journal of Open Source Software +JOSS + +2475-9066 + +Open Journals + + + +6805 +10.21105/joss.06805 + +Singularity-EOS: Performance Portable Equations of State +and Mixed Cell Closures + + + +https://orcid.org/0000-0001-6432-7860 + +Miller +Jonah M. + + + +* + + +https://orcid.org/0000-0002-0673-9741 + +Holladay +Daniel A. + + + + + +https://orcid.org/0000-0001-9425-4674 + +Peterson +Jeffrey H. + + + + +https://orcid.org/0000-0002-7827-2247 + +Mauney +Christopher M. + + + + + +https://orcid.org/0000-0002-3044-8266 + +Berger +Richard + + + + + +Graham +Anna Pietarila + + + + +https://orcid.org/0000-0003-2848-832X + +Tsai +Karen C. + + + + +https://orcid.org/0000-0002-8825-0893 + +Barker +Brandon + + + + + + + +https://orcid.org/0000-0001-5184-6928 + +Holas +Alexander + + + + + + +https://orcid.org/0000-0002-0677-7537 + +Mattsson +Ann E. + + + + +https://orcid.org/0000-0002-6944-8052 + +Gogilashvili +Mariam + + + + + + + +https://orcid.org/0000-0003-4353-8751 + +Dolence +Joshua C. + + + + + +https://orcid.org/0000-0002-7530-6173 + +Meyer +Chad D. + + + + +https://orcid.org/0000-0003-1809-5231 + +Swaminarayan +Sriram + + + + +https://orcid.org/0000-0003-0925-1458 + +Junghans +Christoph + + + + + +CCS-2, Computational Physics and Methods, Los Alamos +National Laboratory, USA + + + + +Center for Theoretical Astrophysics, Los Alamos National +Laboratory, Los Alamos, NM + + + + +CCS-7, Applied Computer Science, Los Alamos National +Laboratory, USA + + + + +XCP-2, Eulerian Codes, Los Alamos National Laboratory, +USA + + + + +HPC-ENV, HPC Environments, Los Alamos National Laboratory, +USA + + + + +Department of Physics and Astronomy, Michigan State +University, USA + + + + +Center for Nonlinear Studies, Los Alamos National +Laboratory, USA + + + + +Heidelberg Institute for Theoretical Studies, +Germany + + + + +XCP-5, Materials and Physical Data, Los Alamos National +Laboratory, USA + + + + +Department of Physics, Florida State University, +USA + + + + +XCP-4, Continuum Models and Numerical Methods, Los Alamos +National Laboratory, USA + + + + +* E-mail: + + +13 +4 +2024 + +9 +103 +6805 + +Authors of papers retain copyright and release the +work under a Creative Commons Attribution 4.0 International License (CC +BY 4.0) +2024 +The article authors + +Authors of papers retain copyright and release the work under +a Creative Commons Attribution 4.0 International License (CC BY +4.0) + + + +C++ +Fortran +Python +equations of state +thermodynamics +performance portability + + + + + + Summary +

We present Singularity-EOS, a new performance-portable library for + equations of state and related capabilities. Singularity-EOS provides + a large set of analytic equations of state, such as the Gruneisen + equation of state, and tabulated equation of state data under a + unified interface. It also provides support capabilities around these + equations of state, such as Python wrappers, solvers for finding + pressure-temperature equilibrium between multiple equations of state, + and a unique modifier framework, allowing the user to + transform a base equation of state, for example by shifting or scaling + the specific internal energy. All capabilities are performance + portable, meaning they compile and run on both CPU and GPU for a wide + variety of architectures.

+
+ + Statement of need and State of the Field +

When expressed mathematically for continuous materials, the laws of + conservation of mass, energy, and momentum form the Navier-Stokes + equations of fluid dynamics. In the limit of zero molecular viscosity, + they become the Euler equations. These laws have been used to describe + phenomena as disparate as flow of air over an airplane wing, bacterial + motion in fluids, and the cataclysmic deaths of stars. However, the + fluid equations are not complete, and the system must be + closed by a description of the material at a + sub-continuum (e.g., molecular or atomic) scale. This closure is + commonly called the equation of state (EOS).

+

Equations of state vary from the simple ideal gas law, to + sophisticated multi-phase descriptions of the lattice structure of ice + or wood, to models of quark-gluon plasma and nuclear pasta at ultra + high densities. A common form to write an equation of state is as a + pair of relations:

+

+ + P=P(ρ,T,λ) and ε=ε(ρ,T,λ),

+

which relate the pressure + + P + and specific internal energy + + ε + to density + + ρ, + temperature + + T, + and potentially some unknown set of additional quantities + + + λ. + However, other representations are possible, and in common parlance an + EOS is the collection of knowledge needed to reconstruct some + intrinsic thermodynamic quantities from others. For example, the speed + of sound through a material or the specific heat capacity, which are + thermodynamic derivatives of the pressure and the specific internal + energy respectively, can both be determined by the EOS.

+

In multi-material fluid dynamics simulations, one often will end up + with a so-called mixed cell, where two materials + exist within the same simulation zone. This can be an artifact of the + numerical representation; for example a steel bar and the surrounding + air may end up sharing a finite volume cell if the boundaries of the + cell do not align exactly with the surface of the steel bar, or, it + may represent physical reality; for example, air is a mixture of + nitrogen and oxygen gases, as well as water vapor. Regardless of the + nature of the mixed cell, one must somehow provide, to the fluid code, + what the material properties of the cell are as a whole. This is + called a mixed cell closure. One such closure is + pressure-temperature equilibrium (PTE), where all + materials in the cell are assumed to be at the same pressure and + temperature.

+

Typically fluid dynamics codes each develop an EOS package + individually to meet a given problem’s needs. Databases of tabulated + equations of state, such as the Sesame + (Lyon + & Johnson, 1992) and Stellar Collapse + (O’Connor + & Ott, 2010b) databases often come with tabulated data + readers, for example, the EOSPAC library + (Pimentel, + 2021) and Stellar Collapse library + (O’Connor + & Ott, 2010a). However, these libraries typically do not + include analytic equations of state or provide a unified API. They + also don’t provide extra equation-of-state capabilities, such as + equilibrium solvers or production hardening. With a few exceptions, + these libraries are also typically not GPU-capable.

+

We present Singularity-EOS, which aims to be a “one stop shop” for + EOS models for fluid and continuum dynamics codes. It provides a + unified interface for both analytic and tabulated equations of state. + It also provides useful surrounding capabilities, such as Python + wrappers, modifiers, which allow the user to + transform a given EOS, and solvers which can find the state in which + multiple EOS’s are in PTE. To support usability, the library is + extensively documented and tested and supports builds through both + cmake and Spack + (Gamblin + et al., 2015).

+

Singularity-EOS leverages the Kokkos + (Trott + et al., 2022) library for performance portability, meaning the + code can run on both CPUs and GPUs, as well as other accelerators. + This fills an important need, as modern super computing capabilities + increasingly rely on GPUs for performance. Singularity-EOS is now used + in the ongoing open-source + Phoebus + project which has a separate code paper in-preparation.

+
+ + Design Principles and Feature Highlights +

Here we enumerate several design principles underlying + Singularity-EOS, and highlight a few feature of the library.

+ + Flexibility in loop patterns +

Singularity-EOS provides both scalar and vector APIs, allowing + the user to make EOS calls on both single points in thermodynamic + space, and on collections of points. The vector calls may be more + performant (as they may vectorize), however care is made to ensure + both APIs operate at acceptable performance, to accommodate + different code structures downstream.

+
+ + Flexibility in memory layout +

The vector calls in Singularity-EOS use an + accessor API and (with a few exceptions) accept any + C++ object that has a operator[] function + defined. This allows users to lay out their memory as they see fit + and use Singularity-EOS even on strided or sparsely allocated + memory.

+
+ + Expose APIs to aid performance +

Many equations of state are most naturally represented as + functions of density and temperature. However, fluid codes require + pressure as a function of density and internal energy. Extracting + this often requires computing a root to invert the relation

+

+ + ε=ε(ρ,T).

+

In these cases, we expose an initial guess for temperature, which + helps the solution rapidly converge. Similarly, the performance of a + sequence of EOS calls may depend on the ordering of the calls. For + example, if both temperature and pressure are required from an + equation of state that requires inversion, requesting pressure first + will be less performant than requesting temperature first, as the + former requires two root finds, and the latter requires only one. To + enable this, we expose a function FillEos, in + which the user may request multiple quantities at once, and the code + uses ordering knowledge to compute them as performantly as + possible.

+
+ + Performance-portable polymorphism +

Accelerators present new challenges to standard object-oriented + programming. In particular, not all compiler stacks (such as Sycl + (Reyes + et al., 2020) or OpenMP + (Chandra + et al., 2001) Target Offload + (OpenMP + Architecture Review Board, 2013)) support relocatable device + code, which is required for standard C++ polymorphism. Even in + programming models, such as CUDA + (NVIDIA + et al., 2020), which do support relocatable device code, + polymorphism can be slower than naively expected, and the user-level + API can be cumbersome, requiring operations such as + placement new. To sidestep these issues, we + use the C++ language feature std::variant to + implement a polymorphism mechanism that works on device.

+
+ + Modifiers +

A given code may need to modify an EOS model to make it suitable + for a given application. For example, the zero-point of the energy + may need to be shifted, a porosity model may need to be added, or + the unit system may need to be changed. We implement this with a + system of modifiers, which can be applied on top of + an EOS in a generic way. Modifiers may also be chained.

+
+ + Fast log-lookups +

To span the required orders of magnitude, equations of state are + often tabulated on log-spaced grids. Logarithms and exponentials + are, however, expensive operations and the performance of lookups + can suffer. We instead use the not-quite-transcendental lookups + described in + (Miller + et al., 2022) to significantly enhance performance of + log-like lookups.

+
+ + Extensibility via modular parts and plugins +

Singularity-EOS is designed to be extensible. The + std::variant-based polymorphism, combined + with modifiers, as described above, already provides significant + flexibility. However, downstream codes may wish to add functionality + to the library. This may be implemented in several ways. + First, as Singularity-EOS is open source, contributions + from downstream developers are welcome. Second, a C++ + code that depends on Singularity-EOS may implement their own models + and include them in a local variant object. Singularity-EOS provides + tooling to build variants up iteratively. Finally, + Singularity-EOS provides a flexible plugin infrastructure that + allows downstream users to add capability to the core library + locally by telling the build system to include a locally downloaded + plugin. This final capability allows downstream users to share code + with each other, even when committing that code to Singularity-EOS + proper is not possible due to, e.g., licensing issues.

+
+
+ + Acknowledgements +

This work was supported through the Laboratory Directed Research + and Development program, the Center for Space and Earth Sciences, and + the Center for Nonlinear Studies under project numbers 20240477CR-SES + and 20220564ECR at Los Alamos National Laboratory (LANL). LANL is + operated by Triad National Security, LLC, for the National Nuclear + Security Administration of U.S. Department of Energy (Contract + No. 89233218CNA000001). This research used resources provided by the + Darwin testbed at LANL which is funded by the Computational Systems + and Software Environments subprogram of LANL’s Advanced Simulation and + Computing program (NNSA/DOE). This work is approved for unlimited + release with report number LA-UR-24-23364.

+
+ + + + + + + + LyonStanford P. + JohnsonJames D. + + Sesame: The los alamos national laboratory equation of state database + Los Alamos National Laboratory + 1992 + + + + + + O’ConnorEvan + OttChristian D + + A new open-source code for spherically symmetric stellar collapse to neutron stars and black holes + Classical and Quantum Gravity + 2010 + 27 + 11 + 10.1088/0264-9381/27/11/114103 + 114103 + + + + + + + O’ConnorEvan + OttChristian D + + Stellar collapse: microphysics + 2010 + https://stellarcollapse.org/equationofstate + + + + + + PimentelDavid A + + EOSPAC user’s manual: v.6.5 + Los Alamos National Lab. (LANL), Los Alamos, NM (United States) + United States + 2021 + 10.2172/1765849 + + + + + + TrottChristian R. + Lebrun-GrandiéDamien + ArndtDaniel + CieskoJan + DangVinh + EllingwoodNathan + GayatriRahulkumar + HarveyEvan + HollmanDaisy S. + IbanezDan + LiberNevin + MadsenJonathan + MilesJeff + PoliakoffDavid + PowellAmy + RajamanickamSivasankaran + SimbergMikael + SunderlandDan + TurcksinBruno + WilkeJeremiah + + Kokkos 3: Programming model extensions for the exascale era + IEEE Transactions on Parallel and Distributed Systems + 2022 + 33 + 4 + 10.1109/TPDS.2021.3097283 + 805 + 817 + + + + + + NVIDIA + VingelmannPéter + FitzekFrank H. P. + + CUDA, release: 10.2.89 + 2020 + https://developer.nvidia.com/cuda-toolkit + + + + + + ChandraRohit + DagumLeo + KohrDavid + MenonRamesh + MaydanDror + McDonaldJeff + + Parallel programming in OpenMP + Morgan kaufmann + 2001 + + + + + + OpenMP Architecture Review Board + + OpenMP application program interface version 4.0 + 2013 + https://www.openmp.org/wp-content/uploads/OpenMP4.0.0.pdf + + + + + + ReyesRuyman + BrownGordon + BurnsRod + WongMichael + + SYCL 2020: More than meets the eye + Proceedings of the international workshop on OpenCL + Association for Computing Machinery + New York, NY, USA + 2020 + 9781450375313 + https://doi.org/10.1145/3388333.3388649 + 10.1145/3388333.3388649 + + + + + + MillerJonah M. + DolenceJoshua C. + HolladayDaniel + + Not-Quite Transcendental Functions and their Applications + arXiv e-prints + 202206 + https://arxiv.org/abs/2206.08957 + 10.48550/arXiv.2206.08957 + arXiv:2206.08957 + + + + + + + GamblinTodd + LeGendreMatthew + ColletteMichael R. + LeeGregory L. + MoodyAdam + SupinskiBronis R. de + FutralScott + + The spack package manager: Bringing order to HPC software chaos + Proceedings of the international conference for high performance computing, networking, storage and analysis + Association for Computing Machinery + New York, NY, USA + 2015 + 9781450337236 + https://doi.org/10.1145/2807591.2807623 + 10.1145/2807591.2807623 + + + + +