Skip to content

Commit 3db04c8

Browse files
committed
Merge branch 'develop' into feature/RZhydro
2 parents f73aaf2 + fbf96cf commit 3db04c8

14 files changed

Lines changed: 65 additions & 61 deletions

File tree

RELEASE_NOTES.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Version vYYYY.MM.p -- Release date YYYY-MM-DD
55
Notable changes include:
66

77
* New features / API changes:
8+
* Now require C++20.
89
* Added view class for PairwiseField (PairwiseFieldView)
910
* Refactored use of pair-wise fields in hydro packages to avoid using pointers and allow empty PairwiseFields
1011
* ArtificialViscosity has been refactored for use on the GPU.
@@ -22,6 +23,7 @@ Notable changes include:
2223
* Bin files in install (bin/spheral and bin/spheral-ats) now use relative paths instead of being configured for one specific path.
2324
* Added a page to the docs about GPU development.
2425
* Optimized field lookups in state, reducing per-call cost from O(N) to O(log N)
26+
* Added the more aptly named SPHERAL_EXTERNAL_INSTALL in places where ENABLE_STATIC_TPLS was being used.
2527

2628
* Bug fixes:
2729
* Adiak memory leak is fixed by calling adiak::clean() before exit.
@@ -33,8 +35,9 @@ Notable changes include:
3335
For users importing from the master Spheral.py file (or it's dimensional specialization) this change is hidden,
3436
so there is no user interface impact.
3537
* Fixed bug with incorrect optimizations when for Debug builds with hip enabled.
36-
* Updated from Rocm 6.2.0 to 6.4.3.
38+
* Updated from ROCM 6.2.0 to 6.4.3.
3739
* Added update-tpls commit message trigger.
40+
* Updated LC Clang from 14.0.6 to 19.1.3 to use C++20.
3841
* Spheral mpi python interface ensures proper allocation calls are used on Flux machines to avoid strange hangs that can occur if running outside of allocations.
3942
* tpl-manager.py updates:
4043
* Added --no-upstream option for when on LC machines but cannot access upstream.

cmake/Compilers.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ if (ENABLE_WARNINGS)
2929
list(APPEND CXX_COMPILE_FLAGS -Wno-deprecated-declarations -Wno-gnu-zero-variadic-macro-arguments)
3030
if(CMAKE_CXX_COMPILER_VERSION LESS 20.0.0)
3131
list(APPEND CXX_COMPILE_FLAGS -Wno-enum-constexpr-conversion)
32+
endif()
33+
if(CMAKE_CXX_COMPILER_VERSION LESS 19.0.0)
3234
# We build some Fortran code from outside sources (like the Helmholtz EOS) that
3335
# cause building errors if the compiler is too picky...
3436
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Wno-missing-include-dirs")

cmake/InstallTPLs.cmake

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -160,24 +160,13 @@ endif()
160160

161161
message("-----------------------------------------------------------------------------")
162162
# HDF5
163-
# This is a hack to allow other codes to use old versions of hdf5
164-
# Ideally, if(NOT ENABLE_STATIC_TPL) would be replaced and the
165-
# find_package call would be moved outside of the if statement:
166-
#
167-
# find_package(hdf5 NO_DEFAULT_PATH PATHS ${hdf5_DIR})
168-
# if (hdf5_FOUND)
169163

170-
171-
if(NOT ENABLE_STATIC_TPL)
164+
if(NOT SPHERAL_EXTERNAL_INSTALL)
172165
find_package(hdf5 REQUIRED NO_DEFAULT_PATH PATHS ${hdf5_DIR})
173166
message("Found HDF5 External Package.")
174167
list(APPEND SPHERAL_FP_TPLS hdf5)
175168
list(APPEND SPHERAL_FP_DIRS ${hdf5_DIR})
176-
if(ENABLE_STATIC_TPL)
177-
list(APPEND SPHERAL_BLT_DEPENDS hdf5-static hdf5_hl-static)
178-
else()
179-
list(APPEND SPHERAL_BLT_DEPENDS hdf5-shared hdf5_hl-shared)
180-
endif()
169+
list(APPEND SPHERAL_BLT_DEPENDS hdf5-shared hdf5_hl-shared)
181170
else()
182171
list(APPEND SPHERAL_EXTERN_LIBS hdf5)
183172
endif()
@@ -224,14 +213,14 @@ if (SPHERAL_ENABLE_SUNDIALS)
224213
endif()
225214

226215
message("-----------------------------------------------------------------------------")
227-
# This is a hack to allow other codes to use an unconvential Boost install
228-
if(NOT ENABLE_STATIC_TPL)
216+
if(NOT SPHERAL_EXTERNAL_INSTALL)
229217
find_package(Boost REQUIRED NO_DEFAULT_PATH COMPONENTS filesystem PATHS ${boost_DIR})
230218
if(Boost_FOUND)
231219
list(APPEND SPHERAL_BLT_DEPENDS Boost::filesystem)
232220
message("Found Boost External Package version ${Boost_VERSION}")
233221
endif()
234222
else()
223+
# This is used in case a code wants to use an unconventional Boost install
235224
list(APPEND SPHERAL_EXTERN_LIBS boost)
236225
endif()
237226

cmake/SetupSpheral.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ include(ExternalProject)
33
#-------------------------------------------------------------------------------
44
# Configure CMake
55
#-------------------------------------------------------------------------------
6-
set(CMAKE_CXX_STANDARD 17)
6+
set(CMAKE_CXX_STANDARD 20)
77
set(CMAKE_CXX_STANDARD_REQUIRED True)
88
set(CMAKE_EXPORT_COMPILE_COMMANDS On)
99

@@ -39,7 +39,7 @@ set(Python3_EXECUTABLE ${python_DIR}/bin/python3)
3939
set(ENABLE_MPI ON CACHE BOOL "")
4040
set(ENABLE_OPENMP ON CACHE BOOL "")
4141

42-
set(BLT_CXX_STD "c++17" CACHE STRING "")
42+
set(BLT_CXX_STD "c++20" CACHE STRING "")
4343
set(BLT_DOCS_TARGET_NAME "blt_docs" CACHE STRING "")
4444

4545
if(NOT SPHERAL_BLT_DIR)

cmake/SpheralOptions.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,10 @@ endif()
5757
cmake_dependent_option(SPHERAL_ENABLE_DOCS "Enable sphinx Spheral documentation" OFF SPHERAL_ENABLE_PYTHON OFF)
5858

5959
#-------------------------------------------------------------------------------
60-
# For using static TPLs
60+
# External install
6161
#-------------------------------------------------------------------------------
62-
option(ENABLE_STATIC_TPL "Assume TPLs are built statically" OFF)
62+
option(SPHERAL_EXTERNAL_INSTALL "Enable when Spheral is a TPL" OFF)
63+
option(ENABLE_STATIC_TPL "Build Spheral TPLs as static libraries" OFF)
6364

6465
#-------------------------------------------------------------------------------
6566
# Debug options

cmake/spheral/SpheralHandleExt.cmake

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,33 @@
77
# INPUT VARIABLES
88
# ----------------------
99
# <lib_name> : REQUIRED : name of target TPL
10-
# APPLE : REQUIRED : flag for Mac OSX
1110

1211
# ----------------------
1312
# OUTPUT VARIABLES
1413
# ----------------------
1514
# <lib_name>_libs : list of library names with modified extension
1615
#----------------------------------------------------------------------------------------
1716

18-
function(Spheral_Handle_Ext lib_name APPLE)
19-
17+
function(Spheral_Handle_Ext lib_name)
2018
if(APPLE)
21-
set(SHARED_EXT "dylib")
19+
set(_lib_ext ".dylib")
20+
elseif(ENABLE_STATIC_TPL)
21+
set(_lib_ext ".a")
2222
else()
23-
set(SHARED_EXT "so")
24-
endif()
25-
26-
if(ENABLE_STATIC_TPL)
27-
string(REPLACE ".${SHARED_EXT}" ".a;" ${lib_name}_libs ${${lib_name}_libs})
23+
list(GET ${lib_name}_libs 0 _test_lib)
24+
set(_full_test_lib "${${lib_name}_DIR}/**/${_test_lib}")
25+
file(GLOB FOUND_DYLIB "${_full_test_lib}.dylib")
26+
file(GLOB FOUND_STATIC "${_full_test_lib}.a")
27+
if(FOUND_DYLIB)
28+
set(_lib_ext ".dylib")
29+
elseif(FOUND_STATIC)
30+
set(_lib_ext ".a")
31+
else()
32+
set(_lib_ext ".so")
33+
endif()
2834
endif()
2935

36+
list(TRANSFORM ${lib_name}_libs APPEND ${_lib_ext})
37+
set(${lib_name}_libs "${${lib_name}_libs}" PARENT_SCOPE)
38+
message("${${lib_name}_libs}")
3039
endfunction()

cmake/spheral_cxx-config.cmake.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if(NOT SPHERAL_FOUND)
1313
set(SPHERAL_ENABLE_HIP @ENABLE_HIP@)
1414
set(SPHERAL_ENABLE_TIMERS @SPHERAL_ENABLE_TIMERS@)
1515
set(SPHERAL_ENABLE_PYTHON @SPHERAL_ENABLE_PYTHON@)
16-
set(ENABLE_STATIC_TPL @ENABLE_STATIC_TPL@)
16+
set(SPHERAL_EXTERNAL_INSTALL @SPHERAL_EXTERNAL_INSTALL@)
1717
if(NOT axom_DIR)
1818
set(axom_DIR "@axom_DIR@" CACHE PATH "")
1919
endif()
@@ -30,7 +30,7 @@ if(NOT SPHERAL_FOUND)
3030
find_package(Python3 COMPONENTS Interpreter Development)
3131
set(PYTHON_EXE ${Python3_EXECUTABLE})
3232
endif()
33-
if(NOT ENABLE_STATIC_TPL)
33+
if(NOT SPHERAL_EXTERNAL_INSTALL)
3434
find_package(Boost REQUIRED QUIET NO_DEFAULT_PATH COMPONENTS filesystem PATHS ${Boost_DIR})
3535
endif()
3636
# Loop over TPLs that use find_package

cmake/tpl/hdf5.cmake

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
set(${lib_name}_libs libhdf5.dylib libhdf5_hl.dylib)
1+
set(${lib_name}_libs libhdf5 libhdf5_hl)
22

3-
if(ENABLE_STATIC_TPL)
4-
string(REPLACE ".dylib" ".a;" ${lib_name}_libs ${${lib_name}_libs})
5-
endif()
3+
Spheral_Handle_Ext(${lib_name})

cmake/tpl/polytope.cmake

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
set(${lib_name}_libs libpolytope.a)
1+
set(${lib_name}_libs libpolytope)
22

3-
if(APPLE)
4-
set(${lib_name}_libs libpolytope.dylib)
5-
endif()
6-
Spheral_Handle_Ext(${lib_name} APPLE)
3+
Spheral_Handle_Ext(${lib_name})

cmake/tpl/silo.cmake

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
set(${lib_name}_libs libsiloh5.a)
1+
set(${lib_name}_libs "libsiloh5")
22

3-
if(APPLE)
4-
set(${lib_name}_libs libsiloh5.dylib)
5-
endif()
6-
Spheral_Handle_Ext(${lib_name} APPLE)
3+
Spheral_Handle_Ext(${lib_name})

0 commit comments

Comments
 (0)