diff --git a/.github/workflows/tests_minimal.yml b/.github/workflows/tests_minimal.yml index 0b96d615f5..d7e951e2b7 100644 --- a/.github/workflows/tests_minimal.yml +++ b/.github/workflows/tests_minimal.yml @@ -1,4 +1,4 @@ -name: Tests Minimal +name: Tests Minimal No Kokkos on: push: @@ -32,6 +32,7 @@ jobs: -DSINGULARITY_USE_SPINER_WITH_HDF5=OFF \ -DSINGULARITY_BUILD_TESTS=ON \ -DSINGULARITY_FORCE_SUBMODULE_MODE=ON \ + -DSINGULARITY_USE_KOKKOS=OFF \ .. make make install diff --git a/.github/workflows/tests_minimal_kokkos.yml b/.github/workflows/tests_minimal_kokkos.yml new file mode 100644 index 0000000000..5c84e43531 --- /dev/null +++ b/.github/workflows/tests_minimal_kokkos.yml @@ -0,0 +1,39 @@ +name: Tests Minimal With Kokkos + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + tests-minimal: + name: Run minimal set of tests, to constrain minimal build + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Set system to non-interactive mode + run: export DEBIAN_FRONTEND=noninteractive + - 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 + - name: build and run tests + run: | + mkdir -p bin + cd bin + mkdir -p ${HOME}/install + cmake -DCMAKE_INSTALL_PREFIX=${HOME}/install \ + -DSINGULARITY_USE_SPINER=OFF \ + -DSINGULARITY_USE_SPINER_WITH_HDF5=OFF \ + -DSINGULARITY_BUILD_TESTS=ON \ + -DSINGULARITY_FORCE_SUBMODULE_MODE=ON \ + -DSINGULARITY_USE_KOKKOS=ON \ + .. + make + make install + make test diff --git a/CHANGELOG.md b/CHANGELOG.md index b3aa060d9f..bb72f60834 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - [[PR330]](https://github.com/lanl/singularity-eos/pull/330) Piecewise grids for Spiner EOS. ### Fixed (Repair bugs, etc) +- [[PR420]](https://github.com/lanl/singularity-eos/pull/420) Fix broken test_get_sg_eos - [[PR417]](https://github.com/lanl/singularity-eos/pull/417) Bugs in shared memory related to eospac resolved - [[PR330]](https://github.com/lanl/singularity-eos/pull/330) Includes a fix for extrapolation of specific internal energy in SpinerEOS. - [[PR401]](https://github.com/lanl/singularity-eos/pull/401) Fix for internal energy scaling in PTE closure diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b1ebdecd1..df9b2c7551 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -262,6 +262,10 @@ if(SINGULARITY_USE_HIGH_RISK_MATH) target_compile_definitions(singularity-eos_Interface INTERFACE SINGULARITY_USE_HIGH_RISK_MATH) endif() +if (SINGULARITY_USE_TRUE_LOG_GRIDDING) + target_compile_definitions(singularity-eos_Interface + SINGULARITY_USE_TRUE_LOG_GRIDDING) +endif() if(SINGULARITY_TEST_SESAME) target_compile_definitions(singularity-eos_Interface INTERFACE SINGULARITY_TEST_SESAME) endif() diff --git a/test/pte_longtest_2phaseVinetSn.hpp b/test/pte_longtest_2phaseVinetSn.hpp index 51e66c74f3..78a7726062 100644 --- a/test/pte_longtest_2phaseVinetSn.hpp +++ b/test/pte_longtest_2phaseVinetSn.hpp @@ -83,10 +83,10 @@ inline void set_eos(T *eos) { 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.}; - EOS Snbeta = singularity::Vinet(7.285, 298.0, 0.529e12, 5.3345, 0.000072977, 0.2149e07, - 0.658e09, 0.4419e07, d2to40); - EOS Sngamma = singularity::Vinet(7.271, 298.0, 0.3878e12, 6.0532, 0.0001085405, - 0.2161e07, 1.025e09, 0.5051e07, d2to40); + T Snbeta = singularity::Vinet(7.285, 298.0, 0.529e12, 5.3345, 0.000072977, 0.2149e07, + 0.658e09, 0.4419e07, d2to40); + T Sngamma = singularity::Vinet(7.271, 298.0, 0.3878e12, 6.0532, 0.0001085405, 0.2161e07, + 1.025e09, 0.5051e07, d2to40); eos[0] = Snbeta.GetOnDevice(); eos[1] = Sngamma.GetOnDevice(); return; diff --git a/test/pte_test_2phaseVinetSn.hpp b/test/pte_test_2phaseVinetSn.hpp index 881c0c5ee0..ea56880494 100644 --- a/test/pte_test_2phaseVinetSn.hpp +++ b/test/pte_test_2phaseVinetSn.hpp @@ -59,10 +59,10 @@ inline void set_eos(T *eos) { 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.}; - EOS Snbeta = singularity::Vinet(7.285, 298.0, 0.529e12, 5.3345, 0.000072977, 0.2149e07, - 0.658e09, 0.4419e07, d2to40); - EOS Sngamma = singularity::Vinet(7.271, 298.0, 0.3878e12, 6.0532, 0.0001085405, - 0.2161e07, 1.025e09, 0.5051e07, d2to40); + T Snbeta = singularity::Vinet(7.285, 298.0, 0.529e12, 5.3345, 0.000072977, 0.2149e07, + 0.658e09, 0.4419e07, d2to40); + T Sngamma = singularity::Vinet(7.271, 298.0, 0.3878e12, 6.0532, 0.0001085405, 0.2161e07, + 1.025e09, 0.5051e07, d2to40); eos[0] = Snbeta.GetOnDevice(); eos[1] = Sngamma.GetOnDevice(); return; diff --git a/test/pte_test_first.hpp b/test/pte_test_3mat_analytic.hpp similarity index 80% rename from test/pte_test_first.hpp rename to test/pte_test_3mat_analytic.hpp index 4f97559630..fb3268fa1f 100644 --- a/test/pte_test_first.hpp +++ b/test/pte_test_3mat_analytic.hpp @@ -30,17 +30,15 @@ constexpr int HIST_SIZE = 10; using singularity::DavisProducts; using singularity::DavisReactants; using singularity::Gruneisen; -using singularity::Variant; -using EOS = Variant; template inline void set_eos(T *eos) { - EOS gr = singularity::Gruneisen(394000.0, 1.489, 0.0, 0.0, 2.02, 0.47, 8.93, 297.0, - 1.0e6, 0.383e7); - EOS dr = singularity::DavisReactants(1.890, 4.115e10, 1.0e6, 297.0, 1.8e5, 4.6, 0.34, - 0.56, 0.0, 0.4265, 0.001074e10); - EOS dp = singularity::DavisProducts(0.798311, 0.58, 1.35, 2.66182, 0.75419, 3.2e10, - 0.001072e10); + T gr = singularity::Gruneisen(394000.0, 1.489, 0.0, 0.0, 2.02, 0.47, 8.93, 297.0, 1.0e6, + 0.383e7); + T dr = singularity::DavisReactants(1.890, 4.115e10, 1.0e6, 297.0, 1.8e5, 4.6, 0.34, + 0.56, 0.0, 0.4265, 0.001074e10); + T dp = singularity::DavisProducts(0.798311, 0.58, 1.35, 2.66182, 0.75419, 3.2e10, + 0.001072e10); eos[0] = gr.GetOnDevice(); eos[1] = dr.GetOnDevice(); eos[2] = dp.GetOnDevice(); diff --git a/test/pte_test_5phaseSesameSn.hpp b/test/pte_test_5phaseSesameSn.hpp index 5d23afe620..8dadad042e 100644 --- a/test/pte_test_5phaseSesameSn.hpp +++ b/test/pte_test_5phaseSesameSn.hpp @@ -80,10 +80,10 @@ inline void set_eos(T *eos) { // bool invert_at_setup = true; - EOS Snbeta = singularity::EOSPAC(SnbetaID); - EOS Sngamma = singularity::EOSPAC(SngammaID); + T Snbeta = singularity::EOSPAC(SnbetaID); + T Sngamma = singularity::EOSPAC(SngammaID); // EOS Sndelta = singularity::EOSPAC(SndeltaID); - EOS Snhcp = singularity::EOSPAC(SnhcpID); + T Snhcp = singularity::EOSPAC(SnhcpID); // EOS Snliquid = singularity::EOSPAC(SnliquidID); eos[0] = Snbeta.GetOnDevice(); diff --git a/test/test_get_sg_eos.cpp b/test/test_get_sg_eos.cpp index 686f10b39a..f3b8f50eea 100644 --- a/test/test_get_sg_eos.cpp +++ b/test/test_get_sg_eos.cpp @@ -17,6 +17,7 @@ #include #include +#include #include #include #include diff --git a/test/test_pte.cpp b/test/test_pte.cpp index 367a739784..87f9e5bac1 100644 --- a/test/test_pte.cpp +++ b/test/test_pte.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include #include @@ -32,6 +32,8 @@ using DataBox = Spiner::DataBox; using singularity::PTESolverRhoT; using singularity::PTESolverRhoTRequiredScratch; +using singularity::Variant; +using EOS = Variant; int main(int argc, char *argv[]) { diff --git a/test/test_pte_2phase.cpp b/test/test_pte_2phase.cpp index 0a759fc27f..ddb601e4d2 100644 --- a/test/test_pte_2phase.cpp +++ b/test/test_pte_2phase.cpp @@ -28,14 +28,13 @@ #include #include -// these two headers share a variant -using EOS = singularity::Variant; #include #include using namespace pte_longtest_2phaseVinetSn; using singularity::PTESolverRhoT; using singularity::PTESolverRhoTRequiredScratch; +using EOS = singularity::Variant; using DataBox = Spiner::DataBox; diff --git a/test/test_pte_3phase.cpp b/test/test_pte_3phase.cpp index c4a89808b9..07addef331 100644 --- a/test/test_pte_3phase.cpp +++ b/test/test_pte_3phase.cpp @@ -28,12 +28,12 @@ #include #include -using EOS = singularity::Variant; #include using DataBox = Spiner::DataBox; using singularity::PTESolverRhoT; using singularity::PTESolverRhoTRequiredScratch; +using EOS = singularity::Variant; int main(int argc, char *argv[]) {