Skip to content

Commit

Permalink
Merge pull request #256 from LLNL/rc-v2024.01.0
Browse files Browse the repository at this point in the history
Release Candidate v2024.01.0 (APPROVAL PR)
  • Loading branch information
mdavis36 authored Jan 20, 2024
2 parents 8c3b9db + e0a5906 commit 017f9e5
Show file tree
Hide file tree
Showing 696 changed files with 13,245 additions and 13,127 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ spack-build*
*.logs
rz*
rz*
toss_3*.cmake
blueos_3*.cmake
toss_*.cmake
blueos_*.cmake


# These are files automatically generated in our configure process.
Expand Down
1 change: 1 addition & 0 deletions .gitlab/machines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
HOSTNAME: 'lassen'
BUILD_ALLOC: lalloc 1 -W 60
TEST_ALLOC: $BUILD_ALLOC
LC_MODULES: "cuda/11.1.0"
extends: [.on_blueos_3_ppc64]

# ------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.build:
stage: build_and_install
script:
- CI_BUILD_DIR=$SPHERAL_BUILDS_DIR/$CI_JOB_ID
- CI_BUILD_DIR=$SPHERAL_BUILDS_DIR/$CI_JOB_ID/project
- echo $CI_BUILD_DIR &> ci-dir.txt && echo $CI_JOB_NAME &> job-name.txt
- echo $CI_BUILD_DIR && echo $CI_PROJECT_DIR
- mkdir -p $CI_BUILD_DIR && cp -a $CI_PROJECT_DIR/. $CI_BUILD_DIR
Expand Down
23 changes: 10 additions & 13 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,17 @@
# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Build documentation with MkDocs
#mkdocs:
# configuration: mkdocs.yml

# # Optionally build your docs in additional formats such as PDF
# formats:
# - pdf

# # Optionally set the version of Python and requirements required to build your docs
# python:
# version: 3.7
# install:
# - requirements: docs/requirements.txt
# Explicitly set the version of Python and its requirements
python:
install:
- requirements: docs/requirements.txt
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# CMakeLists to build the Spheral library.

cmake_minimum_required(VERSION 3.10)
project(spheral LANGUAGES C CXX Fortran)
cmake_minimum_required(VERSION 3.18)
include(cmake/SpheralVersion.cmake)
project(spheral LANGUAGES C CXX Fortran VERSION ${SPHERAL_VERSION})

set(SPHERAL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(SPHERAL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "Path to Spheral source directory")
set(SPHERAL_TEST_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})

include(cmake/SetupSpheral.cmake)
Expand Down
2 changes: 1 addition & 1 deletion License.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Copyright (c) 2012, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by J. Michael Owen <[email protected]>
CODE-OCEC-12-049
LLNL-CODE-561852
All rights reserved.

The files in this directory and below are part of Spheral++. For details, see
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Release and license:
Copyright (c) 2012, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by J. Michael Owen <[email protected]>
CODE-OCEC-12-049
LLNL-CODE-561852
All rights reserved.

Please see full license at https://github.com/jmikeowen/spheral/blob/master/License.txt
53 changes: 53 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
Version v2024.01.00 -- Release date 2024-01-19
==============================================
* Important Notes:
* The PolyClipper, BLT, and PYB11Generator submodules have been modified. Be sure to recursively update the submodules.

Notable changes include:

* New features/ API changes:
* Adding P-alpha porosity model.
* Updating treatment of various state variables in the presence of porosity.
* Introduced a new common base class for porosity physics (PorosityModel), which PalphaPorosity and StrainPorosity share.
* Revamped interaction UpdatePolicies with FieldLists:
- UpdatePolicies have a new virtual method: clonePerField: True means when registering a FieldList copy the Policy for each Field in the FieldList; False means register the FieldList for update itself with the single instance of the Policy.
- This change removes most of our redundant Field/FieldList update policies, and allows us to be more granular in applying different policies to single Field values in a FieldList.
* Adding more Shadow Python interfaces wrapping our C++ classes, in particular PalphaPorosity and StrainPorosity.
* EquationOfState now requires instances to provide \partial P/\partial \rho and \partial P/\partial \epsilon. All current equations of state have been updated accordingly.
* Tillotson and Gruneisen EOSs implementations updated a bit in the revamping.
* Added more material options to MaterialPropertiesLib.py (mostly from Melosh's 89 book).

* Build changes / improvements:
* Spheral now provides First Class CMake support (using the BLT nomenclature). Spheral and its dependencies are now exported to simplify importing the project. To import Spheral into another project using CMake, use:
```
find_package(Spheral_CXX <path_to_spheral_installation>)
```
* CMake variables have a more consistent naming convention. Unused variables are removed.
* Added ENABLE_DEV_BUILD option to improve build times during code development.
* Upped our required C++ standard to 17.
* Bug Fixes / improvements:
* Fixed melt behavior in Steinberg-Guinan strength model, which was ignoring melt for damaged material.
* Fixed range of dimensionless melt temperature for Johnson-Cook strength.
* FSISPH new features and modifications to method.
* NOTE constructor inputs have changed.
* strength implementation modified.
* new features added including plane strain option and settable minP for interfaces.
* new, more rigorous, interface and free surface tracking.
* Fixed initialization of longitudinal sound speed and Youngs modulus for damage models.
* Corrected some minor bugs/inconsistencies in the Tillotson EOS.
* lcats updated to work with current TOSS4 machine configurations.
* Updated various tests to make out automated testing more robust.
Version v2023-06-0 -- Release date 2023-06-20
==============================================
Expand Down Expand Up @@ -125,3 +166,15 @@ Notable changes include:
* CullenDehnen segfault fix.
**Full Changelog**: https://github.com/LLNL/spheral/compare/2022.2.0-pre-spack...v2022.6.0
Version vYYYY.MM.p -- Release date YYYY-MM-DD
==============================================
* Important Notes:
Notable changes include:
* New features/ API changes:
* Build changes / improvements:
* Bug Fixes / improvements:
5 changes: 4 additions & 1 deletion cmake/Compilers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,15 @@ message("-- Fortran flags: ${CMAKE_Fortran_FLAGS}")
# PYB11 Target Flags
#-------------------------------------------------------------------------------
set(SPHERAL_PYB11_TARGET_FLAGS
-O1
-Wno-unused-local-typedefs
-Wno-overloaded-virtual)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
list(APPEND SPHERAL_PYB11_TARGET_FLAGS
-Wno-self-assign-overloaded
-Wno-delete-non-abstract-non-virtual-dtor)
-Wno-inconsistent-missing-override
-Wno-delete-non-abstract-non-virtual-dtor
-Wno-delete-abstract-non-virtual-dtor)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
list(APPEND SPHERAL_PYB11_TARGET_FLAGS
-Wno-pedantic)
Expand Down
148 changes: 93 additions & 55 deletions cmake/InstallTPLs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,88 +5,126 @@
# Do NOT add any TPLs to the clean target
set_directory_properties(PROPERTIES CLEAN_NO_CUSTOM 1)

# Set the location of the <tpl>.cmake files
set(TPL_SPHERAL_CMAKE_DIR ${SPHERAL_ROOT_DIR}/cmake/tpl)

# Initialize TPL options
include(${SPHERAL_ROOT_DIR}/cmake/spheral/SpheralHandleTPL.cmake)

#-----------------------------------------------------------------------------------
# Submodules
#-----------------------------------------------------------------------------------

# Things all Spheral packages have in their include path
set(SPHERAL_EXTERN_INCLUDES )

# PolyClipper
if (NOT polyclipper_DIR)
set(polyclipper_DIR "${SPHERAL_ROOT_DIR}/extern/PolyClipper" CACHE PATH "")
endif()
set(polyclipper_INCLUDES "${polyclipper_DIR}/src")

list(APPEND SPHERAL_EXTERN_INCLUDES ${polyclipper_INCLUDES})


if (NOT ENABLE_CXXONLY)
# Find the appropriate Python
set(Python3_ROOT_DIR ${python_DIR})
find_package(Python3 COMPONENTS Interpreter Development)
set(PYTHON_EXE ${Python3_EXECUTABLE})
list(APPEND SPHERAL_BLT_DEPENDS Python3::Python)

# Set the PYB11Generator path
if (NOT PYB11GENERATOR_ROOT_DIR)
set(PYB11GENERATOR_ROOT_DIR "${SPHERAL_ROOT_DIR}/extern/PYB11Generator" CACHE PATH "")
endif()
include(${PYB11GENERATOR_ROOT_DIR}/cmake/PYB11Generator.cmake)

# Set the pybind11 path
if (NOT PYBIND11_ROOT_DIR)
set(PYBIND11_ROOT_DIR "${PYB11GENERATOR_ROOT_DIR}/extern/pybind11" CACHE PATH "")
endif()
include(${PYB11GENERATOR_ROOT_DIR}/cmake/PYB11Generator.cmake)
list(APPEND SPHERAL_BLT_DEPENDS pybind11_headers)
install(TARGETS pybind11_headers
EXPORT spheral_cxx-targets
DESTINATION lib/cmake)
set_target_properties(pybind11_headers PROPERTIES EXPORT_NAME spheral::pybind11_headers)
endif()

list(APPEND SPHERAL_EXTERN_INCLUDES ${PYBIND11_ROOT_DIR}/include)
# This is currently unfilled in spheral
set_property(GLOBAL PROPERTY SPHERAL_SUBMOD_INCLUDES "${SPHERAL_SUBMOD_INCLUDES}")

# PolyClipper
if (NOT polyclipper_DIR)
# If no PolyClipper is specified, build it as an internal target
set(polyclipper_DIR "${SPHERAL_ROOT_DIR}/extern/PolyClipper")
# Must set this so PolyClipper doesn't include unnecessary python scripts
set(POLYCLIPPER_MODULE_GEN OFF)
set(POLYCLIPPER_ENABLE_DOCS OFF)
set(POLYCLIPPER_INSTALL_DIR "PolyClipper/include")
add_subdirectory(${polyclipper_DIR} ${CMAKE_CURRENT_BINARY_DIR}/PolyClipper)
# Treat includes as system to prevent warnings
blt_convert_to_system_includes(TARGET PolyClipperAPI)
list(APPEND SPHERAL_BLT_DEPENDS PolyClipperAPI)
install(TARGETS PolyClipperAPI
EXPORT spheral_cxx-targets
DESTINATION lib/cmake)
set_target_properties(PolyClipperAPI PROPERTIES EXPORT_NAME spheral::PolyClipperAPI)
else()
Spheral_Handle_TPL(polyclipper ${TPL_SPHERAL_CMAKE_DIR})
list(APPEND SPHERAL_BLT_DEPENDS polyclipper)
endif()

#-----------------------------------------------------------------------------------
# Find pre-compiled TPLs
#-----------------------------------------------------------------------------------

# Initialize TPL options
include(${SPHERAL_ROOT_DIR}/cmake/spheral/SpheralHandleTPL.cmake)

# These libs are always needed
Spheral_Handle_TPL(zlib spheral_depends cxx)
Spheral_Handle_TPL(boost spheral_depends cxx)
Spheral_Handle_TPL(eigen spheral_depends cxx)
Spheral_Handle_TPL(qhull spheral_depends cxx)
Spheral_Handle_TPL(silo spheral_depends cxx)

# AXOM PUlls in HDF5 and Conduit for us
#Spheral_Handle_TPL(conduit spheral_depends cxx)
# Use find_package to get axom (which brings in fmt) and patch fmt
find_package(axom REQUIRED QUIET NO_DEFAULT_PATH PATHS ${axom_DIR}/lib/cmake)
if(axom_FOUND)
list(APPEND spheral_blt_cxx_depends axom fmt)
blt_patch_target(NAME fmt TREAT_INCLUDES_AS_SYSTEM On)
message(STATUS "Found axom: ${axom_DIR} (found version ${axom_VERSION})")
endif()

# Axom imports hdf5 lib but Spheral also requires hdf5_hl
Spheral_Handle_TPL(hdf5 spheral_depends cxx)

# Some libraries are optional
if (ENABLE_ANEOS)
Spheral_Handle_TPL(aneos spheral_depends cxx)
endif()
if (ENABLE_OPENSUBDIV)
Spheral_Handle_TPL(opensubdiv spheral_depends cxx)
endif()
if(ENABLE_TIMER)
Spheral_Handle_TPL(caliper spheral_depends cxx)
endif()

# Only needed when building the python interface of spheral
if(NOT ENABLE_CXXONLY)
Spheral_Handle_TPL(python spheral_depends cxx)
#Spheral_Handle_TPL(pyb11generator spheral_depends py)
#Spheral_Handle_TPL(pybind11 spheral_depends py)
list(APPEND SPHERAL_BLT_DEPENDS axom)
# Add fmt library to external library list
set(fmt_name fmt)
# Newer Axom versions call fmt target axom::fmt
if(NOT TARGET fmt)
set(fmt_name axom::fmt)
endif()
list(APPEND SPHERAL_BLT_DEPENDS ${fmt_name})
# BLT Macro for doing this
blt_convert_to_system_includes(TARGET ${fmt_name})
endif()
# This is a hack to handle transitive issues that come
# from using object libraries with newer version of axom
foreach(_comp ${AXOM_COMPONENTS_ENABLED})
list(APPEND SPHERAL_BLT_DEPENDS axom::${_comp})
get_target_property(axom_deps axom::${_comp} INTERFACE_LINK_LIBRARIES)
list(APPEND SPHERAL_BLT_DEPENDS ${axom_deps})
endforeach()

# TPLs that must be imported
list(APPEND SPHERAL_EXTERN_LIBS zlib boost eigen qhull silo hdf5 polytope)

blt_list_append( TO SPHERAL_EXTERN_LIBS ELEMENTS aneos IF ENABLE_ANEOS)
blt_list_append( TO SPHERAL_EXTERN_LIBS ELEMENTS opensubdiv IF ENABLE_OPENSUBDIV)
blt_list_append( TO SPHERAL_EXTERN_LIBS ELEMENTS caliper IF ENABLE_TIMER)

# Create and install target library for each external library
foreach(lib ${SPHERAL_EXTERN_LIBS})
if(NOT TARGET ${lib})
Spheral_Handle_TPL(${lib} ${TPL_SPHERAL_CMAKE_DIR})
endif()
list(APPEND SPHERAL_BLT_DEPENDS ${lib})
endforeach()
# Note: SPHERAL_BLT_DEPENDS is made global after this in SetupSpheral.cmake

Spheral_Handle_TPL(polytope spheral_depends cxx)
#Spheral_Handle_TPL(polyclipper spheral_depends cxx)

# This calls LLNLSpheralInstallTPLs.cmake
if (EXISTS ${EXTERNAL_SPHERAL_TPL_CMAKE})
include(${EXTERNAL_SPHERAL_TPL_CMAKE})
endif()
# Copied from serac, needed to bypass generator expression issue during export
set(_props)
if( ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13.0" )
list(APPEND _props INTERFACE_LINK_OPTIONS)
endif()
list(APPEND _props INTERFACE_COMPILE_OPTIONS)
foreach(_target axom axom::openmp)
if(TARGET ${_target})
message(STATUS "Removing OpenMP Flags from target[${_target}]")
foreach(_prop ${_props})
get_target_property(_flags ${_target} ${_prop})
if ( _flags )
string( REPLACE "${OpenMP_CXX_FLAGS}" ""
correct_flags "${_flags}" )
string( REPLACE "${OpenMP_Fortran_FLAGS}" ""
correct_flags "${correct_flags}" )
set_target_properties( ${_target} PROPERTIES ${_prop} "${correct_flags}" )
endif()
endforeach()
endif()
endforeach()
Loading

0 comments on commit 017f9e5

Please sign in to comment.