diff --git a/CMakeLists.txt b/CMakeLists.txt index 355ebf2c..5929ac1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -565,7 +565,7 @@ list(APPEND build_list pugixml ) ################################ if (ENABLE_TRILINOS) set(TRILINOS_DIR "${CMAKE_INSTALL_PREFIX}/trilinos") - set(TRILINOS_URL "${TPL_MIRROR_DIR}/trilinos-release-16-0-0.tar.gz") + set(TRILINOS_URL "${TPL_MIRROR_DIR}/trilinos-release-16-1-0.tar.gz") message(STATUS "Building TRILINOS found at ${TRILINOS_URL}") @@ -1136,7 +1136,7 @@ endif() ################################ if( ENABLE_VTK ) set( VTK_DIR "${CMAKE_INSTALL_PREFIX}/vtk" ) - set( VTK_URL "${TPL_MIRROR_DIR}/VTK-9.3.1.tar.gz" ) + set( VTK_URL "${TPL_MIRROR_DIR}/VTK-9.4.2.tar.gz" ) message( STATUS "Building VTK found at ${VTK_URL}" ) @@ -1164,6 +1164,9 @@ endif( ENABLE_MPI ) PREFIX ${PROJECT_BINARY_DIR}/vtk URL ${VTK_URL} INSTALL_DIR ${VTK_DIR} + PATCH_COMMAND patch --forward -p0 < ${CMAKE_SOURCE_DIR}/patch/vtkCellGridReader.cxx.patch && + patch --forward -p0 < ${CMAKE_SOURCE_DIR}/patch/vtkLegacyCellGridReader.cxx.patch && + patch --forward -p0 < ${CMAKE_SOURCE_DIR}/patch/vtkformat.h.patch BUILD_COMMAND ${TPL_BUILD_COMMAND} INSTALL_COMMAND "${TPL_INSTALL_COMMAND}" CMAKE_GENERATOR ${TPL_GENERATOR} diff --git a/patch/vtkCellGridReader.cxx.patch b/patch/vtkCellGridReader.cxx.patch new file mode 100644 index 00000000..f79eee59 --- /dev/null +++ b/patch/vtkCellGridReader.cxx.patch @@ -0,0 +1,14 @@ +--- IO/CellGrid/vtkCellGridReader.cxx 2025-03-27 23:59:55 ++++ IO/CellGrid/vtkCellGridReader.cxx.modified 2025-04-15 13:17:03 +@@ -409,7 +409,10 @@ + // The final "false" below allows the data to not be fully consumed, + // which may happen if sizeof(istream::char_type) > 1. In the future, + // it may also happen that a file contains multiple JSON streams. +- jj = nlohmann::json::from_msgpack(data.begin(), data.end(), false); ++ ++ char const * const begin = reinterpret_cast(data.data()); ++ char const * const end = begin + data.size(); ++ jj = nlohmann::json::from_msgpack(begin, end, false); + } + catch (...) + { diff --git a/patch/vtkLegacyCellGridReader.cxx.patch b/patch/vtkLegacyCellGridReader.cxx.patch new file mode 100644 index 00000000..7ab84279 --- /dev/null +++ b/patch/vtkLegacyCellGridReader.cxx.patch @@ -0,0 +1,14 @@ +--- IO/Legacy/vtkLegacyCellGridReader.cxx 2025-03-27 23:59:55 ++++ IO/Legacy/vtkLegacyCellGridReader.cxx.modified 2025-04-15 13:28:24 +@@ -115,7 +115,10 @@ + // The final argument (false) indicates that the decoder should allow + // partial consumption of raw.data() (meaning the trailing newline will + // not cause an exception): +- jdata = nlohmann::json::from_msgpack(raw.data(), raw.data() + contentLength, false); ++ ++ char const * const begin = reinterpret_cast(raw.data()); ++ char const * const end = begin + contentLength; ++ jdata = nlohmann::json::from_msgpack(begin, end, false); + } + catch (nlohmann::json::exception& e) + { diff --git a/patch/vtkfmt.patch b/patch/vtkfmt.patch new file mode 100644 index 00000000..b62e6b9d --- /dev/null +++ b/patch/vtkfmt.patch @@ -0,0 +1,18 @@ +--- ThirdParty/diy2/vtkdiy2/include/vtkdiy2/fmt/format.h 2025-04-15 14:30:09 ++++ ThirdParty/diy2/vtkdiy2/include/vtkdiy2/fmt/format.h.patched 2025-04-15 14:29:55 +@@ -481,12 +481,12 @@ + } // namespace internal + + // A UTF-8 string view. +-class u8string_view : public basic_string_view { ++class u8string_view : public basic_string_view { + public: + u8string_view(const char* s) +- : basic_string_view(reinterpret_cast(s)) {} ++ : basic_string_view( s ) {} + u8string_view(const char* s, size_t count) FMT_NOEXCEPT +- : basic_string_view(reinterpret_cast(s), count) { ++ : basic_string_view( s, count) { + } + }; + diff --git a/patch/vtkformat.h.patch b/patch/vtkformat.h.patch new file mode 100644 index 00000000..b62e6b9d --- /dev/null +++ b/patch/vtkformat.h.patch @@ -0,0 +1,18 @@ +--- ThirdParty/diy2/vtkdiy2/include/vtkdiy2/fmt/format.h 2025-04-15 14:30:09 ++++ ThirdParty/diy2/vtkdiy2/include/vtkdiy2/fmt/format.h.patched 2025-04-15 14:29:55 +@@ -481,12 +481,12 @@ + } // namespace internal + + // A UTF-8 string view. +-class u8string_view : public basic_string_view { ++class u8string_view : public basic_string_view { + public: + u8string_view(const char* s) +- : basic_string_view(reinterpret_cast(s)) {} ++ : basic_string_view( s ) {} + u8string_view(const char* s, size_t count) FMT_NOEXCEPT +- : basic_string_view(reinterpret_cast(s), count) { ++ : basic_string_view( s, count) { + } + }; + diff --git a/scripts/setupLC-TPL-uberenv.bash b/scripts/setupLC-TPL-uberenv.bash index 6d34fc98..490eed00 100755 --- a/scripts/setupLC-TPL-uberenv.bash +++ b/scripts/setupLC-TPL-uberenv.bash @@ -46,9 +46,10 @@ echo "Building all LC TPLs from $GEOS_BRANCH to be installed at $INSTALL_DIR..." ./scripts/setupLC-TPL-uberenv-helper.bash $INSTALL_DIR ruby gcc-12noAVX "%gcc@12noAVX +docs" "salloc -N 1 -n 1 -t 150 -A vortex" $@ & ./scripts/setupLC-TPL-uberenv-helper.bash $INSTALL_DIR dane gcc-12 "%gcc@12.1.1 +docs" "salloc -N 1 -n 1 -t 150 -A vortex" $@ & ./scripts/setupLC-TPL-uberenv-helper.bash $INSTALL_DIR lassen gcc-8-cuda-11 "%gcc@8.3.1+cuda~uncrustify cuda_arch=70 ^cuda@11.8.0+allow-unsupported-compilers" "lalloc 1 -W 150" $@ & +./scripts/setupLC-TPL-uberenv-helper.bash $INSTALL_DIR lassen gcc-12-cuda-11 "%gcc@12.2.1+cuda~uncrustify cuda_arch=70 ^cuda@11.8.0+allow-unsupported-compilers" "lalloc 1 -W 150" $@ & ./scripts/setupLC-TPL-uberenv-helper.bash $INSTALL_DIR lassen clang-13-cuda-11 "%clang@13.0.1+cuda~uncrustify cuda_arch=70 ^cuda@11.8.0+allow-unsupported-compilers" "lalloc 1 -W 150" $@ & ./scripts/setupLC-TPL-uberenv-helper.bash $INSTALL_DIR lassen clang-10-cuda-11 "%clang@10.0.1+cuda~uncrustify cuda_arch=70 ^cuda@11.8.0+allow-unsupported-compilers" "lalloc 1 -W 150" $@ & -./scripts/setupLC-TPL-uberenv-helper.bash $INSTALL_DIR lassen clang-13-cuda-12 "%clang@13.0.1+cuda~uncrustify cuda_arch=70 ^cuda@12.0.0+allow-unsupported-compilers" "lalloc 1 -W 150" $@ & +./scripts/setupLC-TPL-uberenv-helper.bash $INSTALL_DIR lassen clang-13-cuda-12 "%clang@13.0.1+cuda~uncrustify cuda_arch=70 ^cuda@12.2.2+allow-unsupported-compilers" "lalloc 1 -W 150" $@ & # Note: Estimated completion time is ~90 minutes. # Check log files for unreported completion of jobs. diff --git a/scripts/spack_configs/blueos_3_ppc64le_ib_p9/spack.yaml b/scripts/spack_configs/blueos_3_ppc64le_ib_p9/spack.yaml index 045401d1..3fef70f7 100644 --- a/scripts/spack_configs/blueos_3_ppc64le_ib_p9/spack.yaml +++ b/scripts/spack_configs/blueos_3_ppc64le_ib_p9/spack.yaml @@ -13,7 +13,7 @@ # geosx@develop%clang@10.0.1+cuda cuda_arch=70 ^cuda@11.8.0+allow-unsupported-compilers # geosx@develop%gcc@8.3.1+cuda cuda_arch=70 ^cuda@11.8.0+allow-unsupported-compilers # geosx@develop%clang@13.0.1+cuda cuda_arch=70 ^cuda@11.8.0+allow-unsupported-compilers -# geosx@develop%clang@13.0.1+cuda cuda_arch=70 ^cuda@12.0.0+allow-unsupported-compilers +# geosx@develop%clang@13.0.1+cuda cuda_arch=70 ^cuda@12.2.2+allow-unsupported-compilers # # Uberenv command to build geos dependencies: # python3 ./scripts/uberenv/uberenv.py --spec="%clang@10.0.1+cuda~uncrustify cuda_arch=70 ^cuda@11.8.0+allow-unsupported-compilers" @@ -22,7 +22,7 @@ # # python3 ./scripts/uberenv/uberenv.py --spec="%clang@13.0.1+cuda~uncrustify cuda_arch=70 ^cuda@11.8.0+allow-unsupported-compilers" # -# python3 ./scripts/uberenv/uberenv.py --spec="%clang@13.0.1+cuda~openmp~uncrustify cuda_arch=70 ^cuda@12.0.0+allow-unsupported-compilers" +# python3 ./scripts/uberenv/uberenv.py --spec="%clang@13.0.1+cuda~openmp~uncrustify cuda_arch=70 ^cuda@12.2.2+allow-unsupported-compilers" spack: @@ -90,6 +90,24 @@ spack: BISON: bison FLEX: flex extra_rpaths: [] + - compiler: + spec: gcc@12.2.1 + paths: + cc: /usr/tce/packages/gcc/gcc-12.2.1/bin/gcc + cxx: /usr/tce/packages/gcc/gcc-12.2.1/bin/g++ + f77: /usr/tce/packages/gcc/gcc-12.2.1/bin/gfortran + fc: /usr/tce/packages/gcc/gcc-12.2.1/bin/gfortran + flags: + # Fix for "undefined reference to `_gfortran_transfer_integer_write'" + ldlibs: -lgfortran + operating_system: rhel7 + target: ppc64le + modules: [] + environment: + set: # Needed for scotch + BISON: bison + FLEX: flex + extra_rpaths: [] packages: all: @@ -141,6 +159,8 @@ spack: externals: - spec: spectrum-mpi@release%gcc@8.3.1 prefix: /usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1 + - spec: spectrum-mpi@release%gcc@12.2.1 + prefix: /usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-12.2.1 # Previously clang@upstream - clingo doesn't like "upstream" version - spec: spectrum-mpi@release%clang@10.0.1 prefix: /usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1 @@ -158,8 +178,8 @@ spack: externals: - spec: cuda@11.8.0 +allow-unsupported-compilers prefix: /usr/tce/packages/cuda/cuda-11.8.0 - - spec: cuda@12.0.0 +allow-unsupported-compilers - prefix: /usr/tce/packages/cuda/cuda-12.0.0 + - spec: cuda@12.2.2 +allow-unsupported-compilers + prefix: /usr/tce/packages/cuda/cuda-12.2.2 # System level packages to not build cmake: diff --git a/scripts/spack_configs/macOS/spack.yaml b/scripts/spack_configs/macOS/spack.yaml index 71ab3714..64828992 100644 --- a/scripts/spack_configs/macOS/spack.yaml +++ b/scripts/spack_configs/macOS/spack.yaml @@ -24,6 +24,29 @@ spack: cflags: cxxflags: fflags: + cppflags: -I/opt/homebrew/opt/openblas/include + ldflags: -L/opt/homebrew/opt/openblas/lib + operating_system: sequoia + target: aarch64 + modules: [] + environment: + set: # Needed for scotch + BISON: bison + FLEX: flex + extra_rpaths: [] + - compiler: + spec: apple-clang@17.0.0 + paths: + cc: /usr/bin/clang + cxx: /usr/bin/clang++ + f77: /opt/homebrew/bin/gfortran + fc: /opt/homebrew/bin/gfortran + flags: + cppflags: -I/opt/homebrew/opt/openblas/include + ldflags: -L/opt/homebrew/opt/openblas/lib + cflags: + cxxflags: + fflags: operating_system: sequoia target: aarch64 modules: [] @@ -39,8 +62,14 @@ spack: compiler: [apple-clang] providers: mpi: [openmpi] - blas: [netlib-lapack] - lapack: [netlib-lapack] + blas: [openblas] + lapack: [openblas] + + openblas: + buildable: False + externals: + - spec: openblas@0.3.29 + prefix: /opt/homebrew/opt/openblas # v0.6.2 blt: @@ -151,4 +180,16 @@ spack: buildable: False externals: - spec: addr2line@2.43.1 - prefix: /opt/homebrew/opt/binutils \ No newline at end of file + prefix: /opt/homebrew/opt/binutils + + zlib: + buildable: False + externals: + - spec: zlib@1.3.1 + prefix: /opt/homebrew/opt/zlib + + python: + buildable: false + externals: + - spec: python@3.13.2 + prefix: /opt/homebrew/opt/python@3.13 diff --git a/scripts/spack_packages/packages/geosx/package.py b/scripts/spack_packages/packages/geosx/package.py index d2b8815e..e02d5321 100644 --- a/scripts/spack_packages/packages/geosx/package.py +++ b/scripts/spack_packages/packages/geosx/package.py @@ -125,7 +125,7 @@ class Geosx(CMakePackage, CudaPackage): # IO # depends_on('hdf5@1.12.1') - depends_on('silo@4.11.1-bsd~fortran~shared') + depends_on('silo@4.11.1-bsd~fortran~shared~python') depends_on('conduit~test~fortran~hdf5_compat~shared') @@ -135,7 +135,7 @@ class Geosx(CMakePackage, CudaPackage): depends_on('pugixml@1.13 ~shared') depends_on('fmt@10.0.0 cxxstd=14') - depends_on('vtk@9.3.1', when='+vtk') + depends_on('vtk@9.4.2', when='+vtk') # # Math @@ -156,7 +156,7 @@ class Geosx(CMakePackage, CudaPackage): with when("+trilinos"): trilinos_packages = '+aztec+stratimikos~amesos2~anasazi~belos~ifpack2~muelu~sacado+thyra+zoltan' - depends_on("trilinos@16.0.0 cflags='-fPIC' cxxflags='-fPIC -include cstdint' fflags='-fPIC'" + trilinos_packages) + depends_on("trilinos@16.1.0 cflags='-fPIC' cxxflags='-fPIC -include cstdint' fflags='-fPIC'" + trilinos_packages) depends_on("trilinos~openmp", when="~openmp") depends_on("trilinos+openmp", when="+openmp") @@ -462,6 +462,7 @@ def geos_hostconfig(self, spec, prefix, py_site_pkgs_dir=None): # yapf: disable io_tpls = ( + ('zlib', 'ZLIB', True), ('hdf5', 'HDF5', True), ('conduit', 'CONDUIT', True), ('silo', 'SILO', True), diff --git a/scripts/spack_packages/packages/trilinos/package.py b/scripts/spack_packages/packages/trilinos/package.py index ee4ed49c..20600933 100644 --- a/scripts/spack_packages/packages/trilinos/package.py +++ b/scripts/spack_packages/packages/trilinos/package.py @@ -47,6 +47,7 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage): version('master', branch='master') version('develop', branch='develop') # GEOS Added + version("16.1.0", sha256="e9651c88f581049457036cfc01b527a9d3903c257338eeeab942befd7452f23a") version("16.0.0", sha256="46bfc40419ed2aa2db38c144fb8e61d4aa8170eaa654a88d833ba6b92903f309") version("13.4.1", sha256="5465cbff3de7ef4ac7d40eeff9d99342c00d9d20eee0a5f64f0a523093f5f1b3") diff --git a/scripts/spack_packages/packages/vtk/9.4.2-patch/vtkCellGridReader.cxx.patch b/scripts/spack_packages/packages/vtk/9.4.2-patch/vtkCellGridReader.cxx.patch new file mode 100644 index 00000000..46e6c31f --- /dev/null +++ b/scripts/spack_packages/packages/vtk/9.4.2-patch/vtkCellGridReader.cxx.patch @@ -0,0 +1,14 @@ +--- a/IO/CellGrid/vtkCellGridReader.cxx 2025-03-27 23:59:55 ++++ b/IO/CellGrid/vtkCellGridReader.cxx 2025-04-15 13:17:03 +@@ -409,7 +409,10 @@ + // The final "false" below allows the data to not be fully consumed, + // which may happen if sizeof(istream::char_type) > 1. In the future, + // it may also happen that a file contains multiple JSON streams. +- jj = nlohmann::json::from_msgpack(data.begin(), data.end(), false); ++ ++ char const * const begin = reinterpret_cast(data.data()); ++ char const * const end = begin + data.size(); ++ jj = nlohmann::json::from_msgpack(begin, end, false); + } + catch (...) + { diff --git a/scripts/spack_packages/packages/vtk/9.4.2-patch/vtkLegacyCellGridReader.cxx.patch b/scripts/spack_packages/packages/vtk/9.4.2-patch/vtkLegacyCellGridReader.cxx.patch new file mode 100644 index 00000000..ff248681 --- /dev/null +++ b/scripts/spack_packages/packages/vtk/9.4.2-patch/vtkLegacyCellGridReader.cxx.patch @@ -0,0 +1,14 @@ +--- a/IO/Legacy/vtkLegacyCellGridReader.cxx 2025-03-27 23:59:55 ++++ b/IO/Legacy/vtkLegacyCellGridReader.cxx 2025-04-15 13:28:24 +@@ -115,7 +115,10 @@ + // The final argument (false) indicates that the decoder should allow + // partial consumption of raw.data() (meaning the trailing newline will + // not cause an exception): +- jdata = nlohmann::json::from_msgpack(raw.data(), raw.data() + contentLength, false); ++ ++ char const * const begin = reinterpret_cast(raw.data()); ++ char const * const end = begin + contentLength; ++ jdata = nlohmann::json::from_msgpack(begin, end, false); + } + catch (nlohmann::json::exception& e) + { diff --git a/scripts/spack_packages/packages/vtk/9.4.2-patch/vtkfmt.patch b/scripts/spack_packages/packages/vtk/9.4.2-patch/vtkfmt.patch new file mode 100644 index 00000000..457da680 --- /dev/null +++ b/scripts/spack_packages/packages/vtk/9.4.2-patch/vtkfmt.patch @@ -0,0 +1,18 @@ +--- a/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/fmt/format.h 2025-04-15 14:30:09 ++++ b/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/fmt/format.h 2025-04-15 14:29:55 +@@ -481,12 +481,12 @@ + } // namespace internal + + // A UTF-8 string view. +-class u8string_view : public basic_string_view { ++class u8string_view : public basic_string_view { + public: + u8string_view(const char* s) +- : basic_string_view(reinterpret_cast(s)) {} ++ : basic_string_view( s ) {} + u8string_view(const char* s, size_t count) FMT_NOEXCEPT +- : basic_string_view(reinterpret_cast(s), count) { ++ : basic_string_view( s, count) { + } + }; + diff --git a/scripts/spack_packages/packages/vtk/package.py b/scripts/spack_packages/packages/vtk/package.py index db5aa7fb..39be1dfb 100644 --- a/scripts/spack_packages/packages/vtk/package.py +++ b/scripts/spack_packages/packages/vtk/package.py @@ -15,11 +15,12 @@ class Vtk(CMakePackage): processing and visualization. """ homepage = "http://www.vtk.org" - url = "https://www.vtk.org/files/release/9.0/VTK-9.0.0.tar.gz" + url = "https://www.vtk.org/files/release/9.4/VTK-9.4.2.tar.gz" list_url = "http://www.vtk.org/download/" maintainers = ['chuckatkins', 'danlipsa'] - + + version("9.4.2", sha256="36c98e0da96bb12a30fe53708097aa9492e7b66d5c3b366e1c8dc251e2856a02", preferred=True) version("9.3.1", sha256="8354ec084ea0d2dc3d23dbe4243823c4bfc270382d0ce8d658939fd50061cab8") version("9.2.6", sha256="06fc8d49c4e56f498c40fcb38a563ed8d4ec31358d0101e8988f0bb4d539dd12") version('9.1.0', sha256='8fed42f4f8f1eb8083107b68eaa9ad71da07110161a3116ad807f43e5ca5ce96') @@ -52,6 +53,13 @@ class Vtk(CMakePackage): depends_on('py-mpi4py', when='+python+mpi', type='run') depends_on('mpi', when='+mpi') + + patch_dir = os.path.join(os.path.dirname(__file__), '9.4.2-patch') + if os.path.isdir(patch_dir): + for fname in sorted(os.listdir(patch_dir)): + full_path = os.path.join(patch_dir, fname) + if fname.endswith('.patch') and os.path.isfile(full_path): + patch(os.path.join('9.4.2-patch', fname), when='@9.4.2') def cmake_args(self): spec = self.spec diff --git a/tplMirror/VTK-9.3.1.tar.gz b/tplMirror/VTK-9.3.1.tar.gz deleted file mode 100644 index af0dec3b..00000000 --- a/tplMirror/VTK-9.3.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8354ec084ea0d2dc3d23dbe4243823c4bfc270382d0ce8d658939fd50061cab8 -size 99964158 diff --git a/tplMirror/VTK-9.4.2.tar.gz b/tplMirror/VTK-9.4.2.tar.gz new file mode 100644 index 00000000..4a9c9cc5 --- /dev/null +++ b/tplMirror/VTK-9.4.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36c98e0da96bb12a30fe53708097aa9492e7b66d5c3b366e1c8dc251e2856a02 +size 118621433 diff --git a/tplMirror/trilinos-release-16-0-0.tar.gz b/tplMirror/trilinos-release-16-0-0.tar.gz deleted file mode 100644 index 917acdf6..00000000 --- a/tplMirror/trilinos-release-16-0-0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:46bfc40419ed2aa2db38c144fb8e61d4aa8170eaa654a88d833ba6b92903f309 -size 198059287 diff --git a/tplMirror/trilinos-release-16-1-0.tar.gz b/tplMirror/trilinos-release-16-1-0.tar.gz new file mode 100644 index 00000000..3cc35c68 --- /dev/null +++ b/tplMirror/trilinos-release-16-1-0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e9651c88f581049457036cfc01b527a9d3903c257338eeeab942befd7452f23a +size 197260161