Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: install dependencies
run: |
sudo apt-get update -y -qq
sudo apt-get install -y --force-yes -qq build-essential python3-dev
sudo apt-get install -y --force-yes -qq build-essential libeigen3-dev python3-dev
python -m pip install --upgrade pip

# Pin sphinx to an older version until sphinx-multiversion is fixed
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: install dependencies
run: |
sudo apt-get update -y -qq
sudo apt-get install -y --allow-downgrades --allow-remove-essential --allow-change-held-packages -qq build-essential gfortran libhdf5-serial-dev binutils-gold
sudo apt-get install -y --allow-downgrades --allow-remove-essential --allow-change-held-packages -qq build-essential gfortran libeigen3-dev libhdf5-serial-dev binutils-gold
pip install numpy
pip install h5py
- name: build and run tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: install dependencies
run: |
sudo apt-get update -y -qq
sudo apt-get install -y --allow-downgrades --allow-remove-essential --allow-change-held-packages -qq build-essential libhdf5-serial-dev binutils-gold clang llvm
sudo apt-get install -y --allow-downgrades --allow-remove-essential --allow-change-held-packages -qq build-essential libeigen3-dev libhdf5-serial-dev binutils-gold clang llvm
pip install numpy
pip install h5py
- name: build and run tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: install dependencies
run: |
sudo apt-get update -y -qq
sudo apt-get install -y --allow-downgrades --allow-remove-essential --allow-change-held-packages -qq build-essential
sudo apt-get install -y --allow-downgrades --allow-remove-essential --allow-change-held-packages -qq build-essential libeigen3-dev
- name: build and run tests
run: |
mkdir -p bin
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "utils/eigen"]
path = utils/eigen
url = https://gitlab.com/libeigen/eigen.git
[submodule "utils/spiner"]
path = utils/spiner
url = https://github.com/lanl/spiner
Expand Down
39 changes: 20 additions & 19 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,29 @@
## Current develop

### Added (new features/APIs/variables/...)
- [[PR658]](https://github.com/lanl/singularity-eos/pull/XXX) Add `MinimumInternalEnergy`/`MaximumInternalEnergy` to the EOS introspection API, so energy bounds are reachable through modifiers and the `singularity::EOS` variant
- [[PR658]](https://github.com/lanl/singularity-eos/pull/XXX) Add `sesame2spiner::saveAllMaterials` overloads taking a list of matids instead of a list of input files, with optional per-material `Params` overrides, so host codes can generate an sp5 file without writing input decks to disk. Also added an overload taking an already-open `hid_t`, plus `writeSP5RootAttributes`, so a single sp5 file can be built up one material at a time.
- [[PR653]] (https://github.com/lanl/singularity-eos/pull/659) Added `sesame2spiner::saveAllMaterials` overloads taking a list of matids instead of a list of input files, with optional per-material `Params` overrides, so host codes can generate an sp5 file without writing input decks to disk. Also added an overload taking an already-open `hid_t`, plus `writeSP5RootAttributes`, so a single sp5 file can be built up one material at a time.
- [[PR658]](https://github.com/lanl/singularity-eos/pull/658) Add `MinimumInternalEnergy`/`MaximumInternalEnergy` to the EOS introspection API, so energy bounds are reachable through modifiers and the `singularity::EOS` variant
- [[PR659]](https://github.com/lanl/singularity-eos/pull/659) Add `sesame2spiner::saveAllMaterials` overloads taking a list of matids instead of a list of input files, with optional per-material `Params` overrides, so host codes can generate an sp5 file without writing input decks to disk. Also added an overload taking an already-open `hid_t`, plus `writeSP5RootAttributes`, so a single sp5 file can be built up one material at a time.
- [[PR659]](https://github.com/lanl/singularity-eos/pull/659) Added `sesame2spiner::saveAllMaterials` overloads taking a list of matids instead of a list of input files, with optional per-material `Params` overrides, so host codes can generate an sp5 file without writing input decks to disk. Also added an overload taking an already-open `hid_t`, plus `writeSP5RootAttributes`, so a single sp5 file can be built up one material at a time.

### Fixed (Repair bugs, etc)
- [[PR661]](https://github.com/lanl/singularity-eos/pull/661) Fix bug in InternalEnergyFromDensityPressure where the lambda wasn't threaded all the way through.
- `sesame2spiner` now validates the metadata returned by `eosGetMetadata` before using it. A matid absent from the sesame file previously produced all-zero bounds with no error, which reached `log()` and generated NaN grids; it is now reported and skipped.
- `sesame2spiner` no longer reports an HDF5 failure against every material following the first failed one, and now names the offending matid. Material save status is no longer accumulated by summing `herr_t` values, which could cancel out and report success.
- [[PR653]] (https://github.com/lanl/singularity-eos/pull/659) `sesame2spiner` now validates the metadata returned by `eosGetMetadata` before using it. A matid absent from the sesame file previously produced
- [[PR659]](https://github.com/lanl/singularity-eos/pull/659) `sesame2spiner` now validates the metadata returned by `eosGetMetadata` before using it. A matid absent from the sesame file previously produced
all-zero bounds with no error, which reached `log()` and generated NaN grids; it is now reported and skipped. It also no longer reports an HDF5 failure against every material following the first failed one,
and now names the offending matid. Material save status is no longer accumulated by summing `herr_t` values, which could cancel out and report success.

### Changed (changing behavior/API/variables/...)
- [[PR658]](https://github.com/lanl/singularity-eos/pull/XXX) `ScaledEOS::CheckParams` now requires a strictly positive scale factor, where it previously accepted any nonzero value.
- [[PR658]](https://github.com/lanl/singularity-eos/pull/XXX) `sesame2spiner` now honors the requested verbosity when reading material metadata, rather than always using `Verbosity::Debug`. Default command line output is correspondingly quieter.
- [[PR658]](https://github.com/lanl/singularity-eos/pull/XXX) `sesame2spiner::getMatBounds` no longer takes a leading index argument, which was unused.
- [[PR658]](https://github.com/lanl/singularity-eos/pull/658) `ScaledEOS::CheckParams` now requires a strictly positive scale factor, where it previously accepted any nonzero value.
- [[PR659]](https://github.com/lanl/singularity-eos/pull/659) `sesame2spiner` now honors the requested verbosity when reading material metadata, rather than always using `Verbosity::Debug`. Default command line output is correspondingly quieter.
- [[PR659]](https://github.com/lanl/singularity-eos/pull/659) `sesame2spiner::getMatBounds` no longer takes a leading index argument, which was unused.

### Infrastructure (changes irrelevant to downstream codes)
- [[PR653]](https://github.com/lanl/singularity-eos/pull/653) Move pybind11 to a submodule rather than fetching it via cmake fetchcontent

### Deprecated (soon to be removed behavior/API/variables/...)
- [[PR658]](https://github.com/lanl/singularity-eos/pull/XXX) The table bounds accessors `sieMin()`/`sieMax()` on `SpinerEOSDependsRhoSie` and `StellarCollapse` are superseded by `MinimumInternalEnergy()`/`MaximumInternalEnergy()`, which every EOS provides and which work through modifiers and the `singularity::EOS` variant. The old names still work but will be removed.
- [[PR664]](https://github.com/lanl/singularity-eos/pull/664) Remove the Eigen submodule
- [[PR658]](https://github.com/lanl/singularity-eos/pull/658) The table bounds accessors `sieMin()`/`sieMax()` on `SpinerEOSDependsRhoSie` and `StellarCollapse` are superseded by `MinimumInternalEnergy()`/`MaximumInternalEnergy()`, which every EOS provides and which work through modifiers and the `singularity::EOS` variant. The old names still work but will be removed.

## Release 1.12.1
Date: 08/10/2026
Expand All @@ -46,7 +47,7 @@ Date: 07/20/2026

### Fixed (Repair bugs, etc)
- [[PR645]](https://github.com/lanl/singularity-eos/pull/645) Fix internal energy from density and pressure for JWL
- [[PR63]](https://github.com/lanl/singularity-eos/pull/639) Fixed UnitSystem temperature bug. Temperature is now treated in the same as the time, mass, and length unit factors.
- [[PR639]](https://github.com/lanl/singularity-eos/pull/639) Fixed UnitSystem temperature bug. Temperature is now treated in the same as the time, mass, and length unit factors.
- [[PR637]](https://github.com/lanl/singularity-eos/pull/637) Fix is_normal

### Changed (changing behavior/API/variables/...)
Expand Down Expand Up @@ -100,7 +101,7 @@ Date: 12/25/2025
- [[PR563]](https://github.com/lanl/singularity-eos/pull/563) Fixed DensityFromPressureTemperature for the Carnahan-Starling EOS.
- [[PR564]](https://github.com/lanl/singularity-eos/pull/564) Fix logic for numerical vs type indices by adding safeGet(), safeSet(), safeMustGet(), and safeMustSet() helpers
- [[PR568]](https://github.com/lanl/singularity-eos/pull/568) Fix bug in FixedT and FixedP PTE solvers when materials have negative energies at the initial guess
- [[PR583]](https://github.com/lanl/singularity-eos/pull/582) Allow PTE solvers to operate on tables with pressure as a preferred input
- [[PR582]](https://github.com/lanl/singularity-eos/pull/582) Allow PTE solvers to operate on tables with pressure as a preferred input

### Changed (changing behavior/API/variables/...)
- [[PR579]](https://github.com/lanl/singularity-eos/pull/579) Python bindings now support numpy arrays with arbitrary stride. Numpy array length no longer required input.
Expand Down Expand Up @@ -223,22 +224,22 @@ Date: 7/29/2024
### Added (new features/APIs/variables/...)
- [[PR377]](https://github.com/lanl/singularity-eos/pull/377) Moved much of the variant creating machinery and initialization machinery into separate header files. This is useful for downstream codes that use custom variants and helps with producing plugins.
- [[PR292]](https://github.com/lanl/singularity-eos/pull/292) Added Carnahan-Starling EoS
- [[PR#362]](https://github.com/lanl/singularity-eos/pull/362) Add lambda to thermalqs
- [[PR#339]](https://github.com/lanl/singularity-eos/pull/339) Added COMPONENTS to singularity-eos CMake install, allowing to select a minimal subset needed e.g. for Fortran bindings only
- [[PR#336]](https://github.com/lanl/singularity-eos/pull/336) Included code and documentation for a full, temperature consistent, Mie-Gruneisen EOS based on a pressure power law expansion in eta = 1-V/V0. PowerMG.
- [[PR362]](https://github.com/lanl/singularity-eos/pull/362) Add lambda to thermalqs
- [[PR339]](https://github.com/lanl/singularity-eos/pull/339) Added COMPONENTS to singularity-eos CMake install, allowing to select a minimal subset needed e.g. for Fortran bindings only
- [[PR336]](https://github.com/lanl/singularity-eos/pull/336) Included code and documentation for a full, temperature consistent, Mie-Gruneisen EOS based on a pressure power law expansion in eta = 1-V/V0. PowerMG.
- [[PR334]](https://github.com/lanl/singularity-eos/pull/334) Include plugins infrastructure
- [[PR331]](https://github.com/lanl/singularity-eos/pull/331) Included code and documentation for a full, temperature consistent, Mie-Gruneisen EOS based on a linear Us-up relation. MGUsup.
- [[PR326]](https://github.com/lanl/singularity-eos/pull/326) Document how to do a release
- [[PR#357]](https://github.com/lanl/singularity-eos/pull/357) Added support for C++17 (e.g., needed when using newer Kokkos).
- [[PR#382]](https://github.com/lanl/singularity-eos/pull/382) Added debug checks to the `get_sg_eos()` interface to ensure sane values are returned
- [[PR357]](https://github.com/lanl/singularity-eos/pull/357) Added support for C++17 (e.g., needed when using newer Kokkos).
- [[PR382]](https://github.com/lanl/singularity-eos/pull/382) Added debug checks to the `get_sg_eos()` interface to ensure sane values are returned

### Fixed (Repair bugs, etc)
- [[PR380]](https://github.com/lanl/singularity-eos/pull/380) Set material internal energy to 0 if not participating in the pte solve to make sure potentially uninitialized data is set.
- [[PR370]](https://github.com/lanl/singularity-eos/pull/370) Fix bulk modulus calculation in spiner EOS
- [[PR343]](https://github.com/lanl/singularity-eos/pull/343) Add chemical potentials to stellar collapse gold files
- [[PR342]](https://github.com/lanl/singularity-eos/pull/342) Fix missing using statement in stellar collapse root finding routines
- [[PR341]](https://github.com/lanl/singularity-eos/pull/341) Short-circuit HDF5 machinery when cray-wrappers used in-tree
- [[PR340]](https://github.com/lanl/singularity-eos/pull/335) Fix in-tree builds with plugin infrastructure
- [[PR340]](https://github.com/lanl/singularity-eos/pull/340) Fix in-tree builds with plugin infrastructure
- [[PR335]](https://github.com/lanl/singularity-eos/pull/335) Fix missing hermite.hpp in CMake install required for Helmholtz EOS
- [[PR356]](https://github.com/lanl/singularity-eos/pull/356) Guard against FPEs in the PTE solver
- [[PR356]](https://github.com/lanl/singularity-eos/pull/356) Update CMake for proper Kokkos linking in Fortran interface
Expand All @@ -249,7 +250,7 @@ Date: 7/29/2024
### Changed (changing behavior/API/variables/...)
- [[PR363]](https://github.com/lanl/singularity-eos/pull/363) Template lambda values for scalar calls
- [[PR372]](https://github.com/lanl/singularity-eos/pull/372) Removed E0 from Davis Products EOS in favor of using the shifted EOS modifier. CHANGES API!
- [[PR#382]](https://github.com/lanl/singularity-eos/pull/382) Changed `get_sg_eos()` API to allow optionally specifying the mass fraction cutoff for materials to participate in the PTE solver
- [[PR382]](https://github.com/lanl/singularity-eos/pull/382) Changed `get_sg_eos()` API to allow optionally specifying the mass fraction cutoff for materials to participate in the PTE solver

### Infrastructure (changes irrelevant to downstream codes)
- [[PR329]](https://github.com/lanl/singularity-eos/pull/329) Move vinet tests into analytic test suite
Expand Down Expand Up @@ -278,7 +279,7 @@ Date: 11/28/2023
- [[PR238]](https://github.com/lanl/singularity-eos/pull/238) Fixed broken examples
- [[PR228]](https://github.com/lanl/singularity-eos/pull/228) added untracked header files in cmake
- [[PR215]](https://github.com/lanl/singularity-eos/pull/215) and [[PR216]](https://github.com/lanl/singularity-eos/pull/216) fix duplicate definition of EPS and fix CI
- [[PR232]](https://github.com/lanl/singularity-eos/pull/228) Fixed uninitialized cmake path variables
- [[PR232]](https://github.com/lanl/singularity-eos/pull/232) Fixed uninitialized cmake path variables
- [[PR308]](https://github.com/lanl/singularity-eos/pull/308) spack builds +fortran now compile via correct blocking out of interfaces via preprocessor ifdef

### Added (new features/APIs/variables/...)
Expand All @@ -292,7 +293,7 @@ Date: 11/28/2023
- [[PR265]](https://github.com/lanl/singularity-eos/pull/265) Add missing UnitSystem modifier combinations to variant and EOSPAC
- [[PR279]](https://github.com/lanl/singularity-eos/pull/279) added noble-abel EoS
- [[PR274]](https://github.com/lanl/singularity-eos/pull/274) added a stiffened gas EoS
- [[PR264]](https://github.com/lanl/singularity-eos/pull/274) added a Helmholtz EoS
- [[PR264]](https://github.com/lanl/singularity-eos/pull/264) added a Helmholtz EoS
- [[PR254]](https://github.com/lanl/singularity-eos/pull/254) added ability to peel off modifiers as needed
- [[PR250]](https://github.com/lanl/singularity-eos/pull/250) added mass fraction output to stellar collapse eos
- [[PR226]](https://github.com/lanl/singularity-eos/pull/226) added entropy interpolation to stellar collapse eos
Expand Down
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ cmake_dependent_option(SINGULARITY_BUILD_FORTRAN_BACKEND

option(SINGULARITY_USE_KOKKOS "Use Kokkos for portability" OFF)
option(SINGULARITY_USE_EOSPAC "Enable eospac backend" OFF)
option(SINGULARITY_FETCH_EIGEN
"Fetch Eigen when it cannot be found as a package" OFF)
cmake_dependent_option(SINGULARITY_EOSPAC_ENABLE_SHMEM
"Support shared memory with EOSPAC backend. Requires EOSPAC version 6.5.7."
OFF "SINGULARITY_USE_EOSPAC" OFF)
Expand Down Expand Up @@ -321,7 +323,7 @@ if(SINGULARITY_SUBMODULE_MODE)

# Eigen (if needed)
if(SINGULARITY_USE_EIGEN)
singularity_import_eigen()
singularity_find_eigen()
endif()

# And pybind11 (if needed)
Expand Down
1 change: 1 addition & 0 deletions README.build.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ The main CMake options to configure building are in the following table:
| `SINGULARITY_USE_FORTRAN` | ON | Enable Fortran API for equation of state.|
| `SINGULARITY_USE_KOKKOS` | OFF | Uses Kokkos as the portability backend. Currently only Kokkos is supported for GPUs.|
| `SINGULARITY_USE_EOSPAC` | OFF | Link against EOSPAC. Needed for sesame2spiner and some tests.|
| `SINGULARITY_FETCH_EIGEN` | OFF | Download the pinned Eigen revision if `find_package(Eigen3)` cannot locate it.|
| `SINGULARITY_BUILD_TESTS` | OFF | Build test infrastructure.|
| `SINGULARITY_BUILD_PYTHON` | OFF | Build Python bindings.|
| `SINGULARITY_INVERT_AT_SETUP` | OFF | For tests, pre-invert eospac tables.|
Expand Down
27 changes: 21 additions & 6 deletions cmake/singularity-eos/Eigen3.cmake
Original file line number Diff line number Diff line change
@@ -1,21 +1,36 @@
macro(singularity_import_eigen)
macro(singularity_find_eigen)
if(NOT TARGET Eigen3::Eigen)
find_package(Eigen3 QUIET)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FetchContent_MakeAvailable will call find_package if requested in FetchContent_Declare (see docs here). I can't recall if we separated out the logic here for another reason, but this could be simplified if needed.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok that's probably worth simplifying at some point

endif()

if(NOT TARGET Eigen3::Eigen)
if(NOT SINGULARITY_FETCH_EIGEN)
message(FATAL_ERROR
"Could not find Eigen3. Install an Eigen3 package or configure with "
"-DSINGULARITY_FETCH_EIGEN=ON to download it.")
endif()

include(FetchContent)
set(_storBT ${BUILD_TESTING})
set(BUILD_TESTING OFF CACHE BOOL "" FORCE)

set(EIGEN_TEST_CXX11 OFF CACHE BOOL "" FORCE)
set(EIGEN_BUILD_PKGCONFIG OFF CACHE BOOL "" FORCE)
set(EIGEN_BUILD_DOC OFF CACHE BOOL "" FORCE)

add_subdirectory(utils/eigen)

FetchContent_Declare(
eigen
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
GIT_TAG 2859db0220cd8644c1a75a3bf04f62f551f73f22)
FetchContent_MakeAvailable(eigen)

set(BUILD_TESTING ${_storBT} CACHE BOOL "" FORCE)
unset(_storBT)
endif()
endmacro()

macro(singularity_find_eigen)
find_package(Eigen3 REQUIRED)
if(NOT TARGET Eigen3::Eigen)
message(FATAL_ERROR "Eigen3 did not provide the Eigen3::Eigen target.")
endif()
endmacro()

macro(singularity_enable_eigen target)
Expand Down
8 changes: 0 additions & 8 deletions cmake/submodule_configs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,6 @@ macro(singularity_cmake_config pkg)
set(KokkosKernels_INST_OFFSET_SIZE_T OFF CACHE BOOL "" FORCE)
set(KokkosKernels_INST_ORDINAL_INT OFF CACHE BOOL "" FORCE)
set(KokkosKernels_INST_ORDINAL_INT OFF CACHE BOOL "" FORCE)
elseif(${pkg} STREQUAL "Eigen3")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC Fetch_Content will somewhere do add_subdirectory. Should these be removed? It won't effect the build of SEOS but it could lead to longer build times.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I understand---The lines you commented on are removed.

set(EIGEN_TEST_CXX11 OFF CACHE BOOL "" FORCE)
set(EIGEN_BUILD_PKGCONFIG OFF CACHE BOOL "" FORCE)
set(EIGEN_BUILD_DOC OFF CACHE BOOL "" FORCE)
#TODO: I don't like this as it can interfere with
# other projects, but I don't have a great solution
# to disable testing in here.
set(BUILD_TESTING OFF CACHE BOOL "" FORCE)
else()
set(_PKG_DEFAULT_CONFIGURED ON)
endif()
Expand Down
Loading
Loading