diff --git a/.uberenv_config.json b/.uberenv_config.json index 1bee4505..5f201a4b 100644 --- a/.uberenv_config.json +++ b/.uberenv_config.json @@ -3,9 +3,11 @@ "package_version": "develop", "package_final_phase": "lvarray_hostconfig", "package_source_dir": "../..", -"spack_url": "https://github.com/spack/spack", -"spack_commit": "734c5db2121b01c373eed6538e452f18887e9e44", "spack_configs_path": "scripts/spack_configs", "spack_packages_path": "scripts/spack_packages/packages", -"spack_packages_commit": "a75a7f75182ffc7a51c6ca7f0fec4bf9b2705be8" +"spack_url": "https://github.com/spack/spack", +"spack_commit": "0c2be44e4ece21eb091ad5de4c97716b7c6d4c87", +"spack_commit_note": "v1.1.0 (Nov 14th 2025)", +"spack_packages_commit": "cfa8d650480c409de2d568cf1355bf7e509f4c1c", +"spack_packages_note": "Jan 21st 2026" } diff --git a/CMakeLists.txt b/CMakeLists.txt index bd496662..d57e4275 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -795,8 +795,8 @@ endif() if( ENABLE_HYPRE ) set( HYPRE_DIR "${CMAKE_INSTALL_PREFIX}/hypre" ) - set( HYPRE_URL "https://github.com/hypre-space/hypre/archive/907a2d07b64fe47bdde4540c54665c83ced83a2c.tar.gz" ) - set( HYPRE_URL_HASH "ca114fe641fc804303804bef3701e1e94b579205728667a69b512410d60f9e03" ) + set( HYPRE_URL "https://github.com/hypre-space/hypre/archive/89b60a212f06bcc4d30a59f3961bcd8a937415f3.tar.gz" ) + set( HYPRE_URL_HASH "052e4d63ab9bc02451173ce8b41f4a8f5c27dce620b6d85b3079ed5281157611" ) set( HYPRE_DEPENDS "" ) diff --git a/docker/pecan-spack.yaml b/docker/pecan-spack.yaml index 822bd2a8..89ca8678 100644 --- a/docker/pecan-spack.yaml +++ b/docker/pecan-spack.yaml @@ -91,6 +91,7 @@ spack: buildable: false openmpi: + buildable: false externals: # Pecan CPU/GPU - spec: openmpi@4.0.1%gcc@8.2.0 diff --git a/docker/rocky-spack.yaml b/docker/rocky-spack.yaml index 4a8c51bd..461e297d 100644 --- a/docker/rocky-spack.yaml +++ b/docker/rocky-spack.yaml @@ -19,8 +19,8 @@ spack: toolchains: gcc-13: - - spec: cxxflags='-pthread' - - spec: cflags='-pthread' + - spec: cxxflags='-fPIC -pthread' + - spec: cflags='-fPIC -pthread' - spec: '%c=gcc@13.3.1' when: '%c' - spec: '%cxx=gcc@13.3.1' @@ -30,8 +30,8 @@ spack: - spec: '%openmpi@4.1.1' when: '%mpi' clang-17: - - spec: cxxflags='-pthread' - - spec: cflags='-pthread' + - spec: cxxflags='-fPIC -pthread' + - spec: cflags='-fPIC -pthread' - spec: '%[virtuals=c]llvm@17.0.6+clang~flang~lld~lldb' when: '%c' - spec: '%[virtuals=cxx]llvm@17.0.6+clang~flang~lld~lldb' @@ -47,7 +47,7 @@ spack: mpi: require: - - openmpi + - openmpi@4.1.1 blas: require: @@ -62,8 +62,10 @@ spack: prefix: /usr extra_attributes: compilers: - c: /usr/bin/clang - cxx: /usr/bin/clang++ + # Use wrappers that bake in --gcc-toolchain for gcc-toolset-13, so NVCC's -ccbin + # doesn't accidentally pick GCC 8 headers when compiling CUDA sources. + c: /usr/local/bin/clang-gcc13 + cxx: /usr/local/bin/clang++-gcc13 gcc: externals: - spec: gcc@13.3.1 languages:='c,c++,fortran' @@ -95,9 +97,7 @@ spack: cuda: buildable: False externals: - - spec: cuda@12.9.1 +allow-unsupported-compilers %gcc@13.3.1 - prefix: /usr/local/cuda - - spec: cuda@12.9.1 +allow-unsupported-compilers %llvm@17.0.6 + - spec: cuda@12.9.1 +allow-unsupported-compilers prefix: /usr/local/cuda m4: buildable: false @@ -116,6 +116,7 @@ spack: - spec: netlib-blas@3.8.0 prefix: /usr openmpi: + buildable: false externals: - spec: openmpi@4.1.1 prefix: /usr/lib64/openmpi diff --git a/docker/spack.yaml b/docker/spack.yaml index 1a977a5c..d59364f2 100644 --- a/docker/spack.yaml +++ b/docker/spack.yaml @@ -25,27 +25,27 @@ spack: when: '%cxx' - spec: '%[virtuals=fortran]gcc@11.4.0' when: '%fortran' - - spec: '%openmpi@4.1.2' + - spec: '%openmpi' when: '%mpi' clang-10: - - spec: '%[virtuals=c]llvm@10.0.0+clang~flang~lld~lldb' + - spec: '%[virtuals=c]llvm@10.0.0+clang~flang~lld~lldb openmp=project' when: '%c' - - spec: '%[virtuals=cxx]llvm@10.0.0+clang~flang~lld~lldb' + - spec: '%[virtuals=cxx]llvm@10.0.0+clang~flang~lld~lldb openmp=project' when: '%cxx' - - spec: '%[virtuals=fortran]gcc@9.5.0' + - spec: '%[virtuals=fortran]gcc@9.4.0' when: '%fortran' - - spec: '%openmpi@4.1.2' + - spec: '%openmpi' when: '%mpi' gcc-9: - spec: cxxflags='-pthread' - spec: cflags='-pthread' - - spec: '%c=gcc@9.5.0' + - spec: '%c=gcc@9.4.0' when: '%c' - - spec: '%cxx=gcc@9.5.0' + - spec: '%cxx=gcc@9.4.0' when: '%cxx' - - spec: '%fortran=gcc@9.5.0' + - spec: '%fortran=gcc@9.4.0' when: '%fortran' - - spec: '%openmpi@4.1.2' + - spec: '%openmpi %gcc@9.4.0' when: '%mpi' gcc-10: - spec: cxxflags='-pthread' @@ -56,7 +56,7 @@ spack: when: '%cxx' - spec: '%fortran=gcc@10.5.0' when: '%fortran' - - spec: '%openmpi@4.1.2' + - spec: '%openmpi %gcc@10.5.0' when: '%mpi' gcc-11: - spec: cxxflags='-pthread' @@ -67,7 +67,7 @@ spack: when: '%cxx' - spec: '%fortran=gcc@11.4.0' when: '%fortran' - - spec: '%openmpi@4.1.2' + - spec: '%openmpi %gcc@11.4.0' when: '%mpi' gcc-12: - spec: cxxflags='-pthread' @@ -78,7 +78,7 @@ spack: when: '%cxx' - spec: '%fortran=gcc@12.3.0' when: '%fortran' - - spec: '%openmpi@4.1.2' + - spec: '%openmpi %gcc@12.3.0' when: '%mpi' packages: @@ -87,7 +87,7 @@ spack: mpi: require: - - openmpi + - openmpi@4.1.2 blas: require: @@ -98,7 +98,7 @@ spack: llvm: externals: - - spec: llvm@10.0.0+clang~flang~lld~lldb + - spec: llvm@10.0.0+clang~flang~lld~lldb openmp=project prefix: /usr extra_attributes: compilers: @@ -113,7 +113,7 @@ spack: gcc: externals: - - spec: gcc@9.5.0 languages:='c,c++,fortran' + - spec: gcc@9.4.0 languages:='c,c++,fortran' prefix: /usr extra_attributes: compilers: @@ -193,11 +193,17 @@ spack: - spec: netlib-blas@3.10.0 prefix: /usr openmpi: + buildable: false externals: - - spec: openmpi@4.1.2 %llvm + # Ubuntu 22.04 (apt) provides OpenMPI 4.1.2. We treat it as external for all toolchains + # to prevent Spack from building OpenMPI (which may otherwise drift to v5). + - spec: openmpi@4.1.2 %clang@15.0.7 + prefix: /usr + modules: [mpi] + - spec: openmpi@4.1.2 %clang@10.0.0 prefix: /usr modules: [mpi] - - spec: openmpi@4.1.2 %gcc@9.5.0 + - spec: openmpi@4.1.2 %gcc@9.4.0 prefix: /usr - spec: openmpi@4.1.2 %gcc@10.5.0 prefix: /usr diff --git a/docker/tpl-rockylinux-clang-cuda-12.Dockerfile b/docker/tpl-rockylinux-clang-cuda-12.Dockerfile index f761368c..3c20157b 100644 --- a/docker/tpl-rockylinux-clang-cuda-12.Dockerfile +++ b/docker/tpl-rockylinux-clang-cuda-12.Dockerfile @@ -5,15 +5,16 @@ ARG BLD_DIR=$TMP_DIR/build FROM nvidia/cuda:12.9.1-devel-rockylinux8 AS tpl_toolchain_intersect_geosx_toolchain ARG SRC_DIR - ARG INSTALL_DIR ENV GEOSX_TPL_DIR=$INSTALL_DIR # Installing dependencies RUN dnf clean all && \ dnf -y update && \ + dnf -y install dnf-plugins-core && \ + dnf config-manager --set-enabled powertools || dnf config-manager --set-enabled devel && \ dnf -y install \ - which \ + which \ clang-17.0.6 \ gcc-toolset-13 \ python3 \ @@ -23,7 +24,6 @@ RUN dnf clean all && \ lapack \ openmpi \ openmpi-devel \ - # Additional spack dependencies python3-pip \ unzip \ mpfr-devel \ @@ -32,8 +32,6 @@ RUN dnf clean all && \ xz \ python3-virtualenv -RUN dnf config-manager --set-enabled & - # Install clingo for Spack RUN python3 -m pip install --upgrade pip && \ python3 -m pip install clingo @@ -45,10 +43,7 @@ FROM tpl_toolchain_intersect_geosx_toolchain AS tpl_toolchain ARG SRC_DIR ARG BLD_DIR -# Install required packages using dnf -RUN dnf clean all && \ - dnf -y update --exclude=clang*,compiler-rt,libomp*,llvm* && \ - dnf -y install \ +RUN dnf -y install \ tbb-devel \ bc \ file \ @@ -59,9 +54,24 @@ RUN dnf clean all && \ m4 \ git -# Run uberenv +# Create clang wrappers that always use gcc-toolset-13 for libstdc++ headers/libs. +# This is critical for CUDA builds where NVCC invokes the host compiler via -ccbin. +RUN printf '%s\n' '#!/usr/bin/env bash' \ + 'exec /usr/bin/clang --gcc-toolchain=/opt/rh/gcc-toolset-13/root/usr "$@"' \ + > /usr/local/bin/clang-gcc13 && \ + chmod +x /usr/local/bin/clang-gcc13 && \ + printf '%s\n' '#!/usr/bin/env bash' \ + 'exec /usr/bin/clang++ --gcc-toolchain=/opt/rh/gcc-toolset-13/root/usr "$@"' \ + > /usr/local/bin/clang++-gcc13 && \ + chmod +x /usr/local/bin/clang++-gcc13 && \ + /usr/local/bin/clang-gcc13 --version && \ + /usr/local/bin/clang++-gcc13 --version + +# RUN uberenv # Have to create install directory first for uberenv # -k flag is to ignore SSL errors +# 1. We wrap this in 'scl enable gcc-toolset-13' so the build finds GCC 13 headers. +# 2. gcc-toolchain selection is handled by the clang wrapper scripts + Spack llvm external compiler paths. RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \ mkdir -p ${GEOSX_TPL_DIR} && \ # Create symlink to openmpi include directory @@ -69,15 +79,14 @@ RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \ # Create symlinks to blas/lapack libraries ln -s /usr/lib64/libblas.so.3 /usr/lib64/libblas.so && \ ln -s /usr/lib64/liblapack.so.3 /usr/lib64/liblapack.so && \ + scl enable gcc-toolset-13 ' \ ./scripts/uberenv/uberenv.py \ --spec "+cuda~uncrustify~openmp~pygeosx cuda_arch=70 %clang-17 ^cuda@12.9.1+allow-unsupported-compilers ^caliper~gotcha~sampler~libunwind~libdw~papi" \ --spack-env-file=${SRC_DIR}/docker/rocky-spack.yaml \ --project-json=.uberenv_config.json \ --prefix ${GEOSX_TPL_DIR} \ - -k && \ -# Remove host-config generated for LvArray - rm lvarray* && \ -# Rename and copy spack-generated host-config to root directory + -k ' && \ + rm -f lvarray* && \ cp *.cmake /spack-generated.cmake && \ # Remove extraneous spack files cd ${GEOSX_TPL_DIR} && \ @@ -95,9 +104,6 @@ COPY --from=tpl_toolchain /spack-generated.cmake / # Install required packages using dnf RUN dnf clean all && \ rm -rf /var/cache/dnf && \ - dnf -y install dnf-plugins-core && \ - dnf config-manager --set-enabled devel && \ - dnf -y update --exclude=clang*,compiler-rt,libomp*,llvm* && \ dnf -y install \ openssh-clients \ ca-certificates \ @@ -115,4 +121,4 @@ RUN dnf clean all && \ # Run the installation script RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-sccache.sh -ENV SCCACHE=/opt/sccache/bin/sccache +ENV SCCACHE=/opt/sccache/bin/sccache \ No newline at end of file diff --git a/docker/tpl-rockylinux-gcc-cuda-12.Dockerfile b/docker/tpl-rockylinux-gcc-cuda-12.Dockerfile index d73e87ff..c41163ac 100644 --- a/docker/tpl-rockylinux-gcc-cuda-12.Dockerfile +++ b/docker/tpl-rockylinux-gcc-cuda-12.Dockerfile @@ -67,7 +67,7 @@ RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \ ln -s /usr/lib64/libblas.so.3 /usr/lib64/libblas.so && \ ln -s /usr/lib64/liblapack.so.3 /usr/lib64/liblapack.so && \ ./scripts/uberenv/uberenv.py \ - --spec "+cuda~uncrustify~openmp~pygeosx cuda_arch=70 %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers ^caliper~gotcha~sampler~libunwind~libdw~papi" \ + --spec "+cuda~uncrustify~openmp~pygeosx lai=hypre cuda_arch=70 %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers ^caliper~gotcha~sampler~libunwind~libdw~papi" \ --spack-env-file=${SRC_DIR}/docker/rocky-spack.yaml \ --project-json=.uberenv_config.json \ --prefix ${GEOSX_TPL_DIR} \ diff --git a/docker/tpl-ubuntu-clang-cuda.Dockerfile b/docker/tpl-ubuntu-clang-cuda.Dockerfile index 1a1b3628..9a8f7986 100644 --- a/docker/tpl-ubuntu-clang-cuda.Dockerfile +++ b/docker/tpl-ubuntu-clang-cuda.Dockerfile @@ -63,7 +63,7 @@ RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \ mkdir -p ${GEOSX_TPL_DIR} && \ ./scripts/uberenv/uberenv.py \ --spec "+cuda~uncrustify~openmp~pygeosx cuda_arch=70 %clang-10 ^cuda@11.8.0+allow-unsupported-compilers ^caliper~gotcha~sampler~libunwind~libdw~papi" \ - --spack-env-file=${SRC_DIR}/docker/spack.yaml \ + --spack-env-file=${SRC_DIR}/docker/ubuntu20-clang-cuda-spack.yaml \ --project-json=.uberenv_config.json \ --prefix ${GEOSX_TPL_DIR} \ -k && \ diff --git a/docker/ubuntu20-clang-cuda-spack.yaml b/docker/ubuntu20-clang-cuda-spack.yaml new file mode 100644 index 00000000..2e6999fe --- /dev/null +++ b/docker/ubuntu20-clang-cuda-spack.yaml @@ -0,0 +1,164 @@ +spack: + config: + install_tree: + root: $spack/.. + projections: + all: '{compiler.name}-{compiler.version}/{name}-{version}-{hash}' + misc_cache: $spack/../misc_cache + test_stage: $spack/../test_stage + build_stage:: + - $spack/../build_stage + + # Regular TPLs do not need views + view: false + + # Include shared variants and versions + include: + - ../defaults.yaml + - ../versions.yaml + + # Ubuntu 20.04 clang/cuda image only has clang/llvm 10.x available. + # Keep this environment llvm10-only to avoid concretizer conflicts with llvm@15. + toolchains: + clang-10: + - spec: '%[virtuals=c]llvm@10.0.0+clang~flang~lld~lldb openmp=project' + when: '%c' + - spec: '%[virtuals=cxx]llvm@10.0.0+clang~flang~lld~lldb openmp=project' + when: '%cxx' + - spec: '%[virtuals=fortran]gcc@9.4.0' + when: '%fortran' + - spec: '%openmpi' + when: '%mpi' + + packages: + all: + target: [x86_64] + + mpi: + require: + - openmpi@4.0.3 + + blas: + require: + - "netlib-lapack" + lapack: + require: + - "netlib-lapack" + + llvm: + externals: + - spec: llvm@10.0.0+clang~flang~lld~lldb openmp=project + prefix: /usr + extra_attributes: + compilers: + c: /usr/bin/clang + cxx: /usr/bin/clang++ + + gcc: + externals: + - spec: gcc@9.4.0 languages:='c,c++,fortran' + prefix: /usr + extra_attributes: + compilers: + c: /usr/bin/gcc-9 + cxx: /usr/bin/g++-9 + fortran: /usr/bin/gfortran-9 + + # CUDA comes from the nvidia base image. + cuda: + buildable: False + externals: + - spec: cuda@11.8.0 +allow-unsupported-compilers + prefix: /usr/local/cuda + + # Use system OpenMPI, but tag it as llvm@10-built so it can satisfy %clang-10 DAGs. + # (Spack does not validate the actual compiler used for system packages.) + openmpi: + buildable: false + externals: + - spec: openmpi@4.0.3 %llvm@10.0.0 + prefix: /usr + + autoconf: + version: [2.71] + buildable: false + externals: + - spec: autoconf@2.71 + prefix: /usr + automake: + version: [1.16.5] + buildable: false + externals: + - spec: automake@1.16.5 + prefix: /usr + cmake: + version: [3.28.3] + buildable: false + externals: + - spec: cmake@3.28.3 + prefix: /usr/local + + findutils: + version: [4.7.0] + buildable: false + externals: + - spec: findutils@4.7.0 + prefix: /usr + m4: + buildable: false + externals: + - spec: m4@1.4.18 + prefix: /usr + mpfr: + buildable: false + externals: + - spec: mpfr@6.0.2 + prefix: /usr + + netlib-lapack: + buildable: false + externals: + - spec: netlib-lapack@3.10.0 + prefix: /usr + netlib-blas: + buildable: false + externals: + - spec: netlib-blas@3.10.0 + prefix: /usr + + perl: + buildable: false + externals: + - spec: perl@5.30.0 + prefix: /usr + pkg-config: + buildable: false + externals: + - spec: pkg-config@0.29.1 + prefix: /usr + python: + buildable: false + externals: + - spec: python@3.8.10 + prefix: /usr + tar: + buildable: false + externals: + - spec: tar@1.30 + prefix: /usr + unzip: + buildable: false + externals: + - spec: unzip@6.0 + prefix: /usr + xz: + buildable: false + externals: + - spec: xz@5.2.4 + prefix: /usr + zlib: + buildable: false + externals: + - spec: zlib@1.2.11 + prefix: /usr + diff --git a/scripts/setupLC-TPL-uberenv.bash b/scripts/setupLC-TPL-uberenv.bash index 50c5d4c2..1f514e0f 100755 --- a/scripts/setupLC-TPL-uberenv.bash +++ b/scripts/setupLC-TPL-uberenv.bash @@ -88,7 +88,7 @@ function launch_jobs() { # Note: The max. time allowed on the debug queue is 1h. If we need more, switch to pbatch case "$machine" in dane) - ALLOC_CMD="salloc -N 1 --exclusive -t 60 -A vortex -ppdebug" + ALLOC_CMD="salloc -N 1 --exclusive -t 180 -A vortex" "${UBERENV_HELPER}" "$INSTALL_DIR" dane gcc-12 "+docs %gcc-12 ${COMMON}" "${ALLOC_CMD}" "$@" & "${UBERENV_HELPER}" "$INSTALL_DIR" dane gcc-13 "+docs %gcc-13 ${COMMON}" "${ALLOC_CMD}" "$@" & "${UBERENV_HELPER}" "$INSTALL_DIR" dane llvm-14 "+docs %clang-14 ${COMMON}" "${ALLOC_CMD}" "$@" & diff --git a/scripts/spack_configs/toss_4_x86_64_ib/spack.yaml b/scripts/spack_configs/toss_4_x86_64_ib/spack.yaml index fc593828..d0ffeed9 100644 --- a/scripts/spack_configs/toss_4_x86_64_ib/spack.yaml +++ b/scripts/spack_configs/toss_4_x86_64_ib/spack.yaml @@ -151,16 +151,6 @@ spack: fortran: /usr/tce/packages/gcc/gcc-13.3.1-magic/bin/gfortran extra_rpaths: [] - gcc-runtime: - buildable: False - externals: - - spec: gcc-runtime@13.3.1 - prefix: /usr/tce/packages/gcc/gcc-13.3.1/lib/gcc/x86_64-redhat-linux/13 - - spec: gcc-runtime@12.1.1 - prefix: /usr/tce/packages/gcc/gcc-12.1.1/lib/gcc/x86_64-redhat-linux/12 - - spec: gcc-runtime@11.2.1 - prefix: /usr/tce/packages/gcc/gcc-11.2.1/lib/gcc/x86_64-redhat-linux/11 - # Lock down which MPI we are using mvapich2: buildable: False diff --git a/scripts/spack_configs/toss_4_x86_64_ib_cray/spack.yaml b/scripts/spack_configs/toss_4_x86_64_ib_cray/spack.yaml index 59f648a6..668b140b 100644 --- a/scripts/spack_configs/toss_4_x86_64_ib_cray/spack.yaml +++ b/scripts/spack_configs/toss_4_x86_64_ib_cray/spack.yaml @@ -135,16 +135,6 @@ spack: - perftools-base/25.09.0 - xpmem/2.6.5 - gcc-runtime: - buildable: False - externals: - - spec: gcc-runtime@13.3.1 - prefix: /usr/tce/packages/gcc/gcc-13.3.1/lib/gcc/x86_64-redhat-linux/13 - - spec: gcc-runtime@12.1.1 - prefix: /usr/tce/packages/gcc/gcc-12.1.1/lib/gcc/x86_64-redhat-linux/12 - - spec: gcc-runtime@11.2.1 - prefix: /usr/tce/packages/gcc/gcc-11.2.1/lib/gcc/x86_64-redhat-linux/11 - # Lock down which MPI we are using cray-mpich: buildable: false diff --git a/scripts/spack_configs/versions.yaml b/scripts/spack_configs/versions.yaml index 37052ab1..3cb4ddb9 100644 --- a/scripts/spack_configs/versions.yaml +++ b/scripts/spack_configs/versions.yaml @@ -18,9 +18,9 @@ packages: blt: require: "@git.9ff77344f0b2a6ee345e452bddd6bfd46cbbfa35=develop" - # master - 06/27/25 + # master - 01/20/26 hypre: - require: "@git.907a2d07b64fe47bdde4540c54665c83ced83a2c" + require: "@git.89b60a212f06bcc4d30a59f3961bcd8a937415f3=master" # v2025.0.3.0 chai: @@ -49,7 +49,3 @@ packages: # master - 04/12/20 uncrustify: require: "@git.401a4098bce9dcc47e024987403f2d59d9ba7bd2" - - # master - 04/26/20 - superlu-dist: - require: "@git.0f6efc377df2440c235452d13d28d2c717f832a1" diff --git a/scripts/spack_packages/packages/geosx/package.py b/scripts/spack_packages/packages/geosx/package.py index 2fd7fbe0..3bcac0cb 100644 --- a/scripts/spack_packages/packages/geosx/package.py +++ b/scripts/spack_packages/packages/geosx/package.py @@ -9,8 +9,6 @@ import socket import os -import llnl.util.tty as tty - from os import environ as env from os.path import join as pjoin @@ -148,8 +146,8 @@ class Geosx(CMakePackage, CudaPackage, ROCmPackage): # # IO # - depends_on('hdf5@1.12.1') - depends_on('silo@4.11.1-bsd~fortran~shared~python') + depends_on('hdf5@1.14.6') + depends_on('silo@4.12.0~fortran~shared~python build_system=cmake') depends_on('conduit~test~fortran~hdf5_compat+shared') @@ -167,7 +165,7 @@ class Geosx(CMakePackage, CudaPackage, ROCmPackage): depends_on("parmetis@4.0.3+int64~shared cflags='-fPIC' cxxflags='-fPIC'") depends_on("metis +int64~shared cflags='-fPIC' cxxflags='-fPIC'") - depends_on("superlu-dist +int64 fflags='-fPIC'") + depends_on("superlu-dist@9.2.1 +int64 fflags='-fPIC'") depends_on("superlu-dist~openmp", when="~openmp") depends_on("superlu-dist+openmp", when="+openmp") @@ -185,9 +183,9 @@ class Geosx(CMakePackage, CudaPackage, ROCmPackage): depends_on("trilinos+openmp", when="+openmp") with when("+hypre"): - depends_on("hypre +superlu-dist+mixedint+mpi~shared cflags='-fPIC' cxxflags='-fPIC'", when='~cuda~rocm') - depends_on("hypre +cuda+superlu-dist+mixedint+mpi+umpire+unified-memory~shared cflags='-fPIC' cxxflags='-fPIC'", when='+cuda') - depends_on("hypre +rocm+superlu-dist+mixedint+mpi+umpire+unified-memory~shared cflags='-fPIC' cxxflags='-fPIC'", when='+rocm') + depends_on("hypre +superlu-dist+mixedint+mpi~shared+pic", when='~cuda~rocm') + depends_on("hypre +cuda+superlu-dist+mixedint+mpi+umpire+unified-memory~shared+pic", when='+cuda') + depends_on("hypre +rocm+superlu-dist+mixedint+mpi+umpire+unified-memory~shared+pic", when='+rocm') depends_on("hypre ~openmp", when="~openmp") depends_on("hypre +openmp", when="+openmp") diff --git a/scripts/spack_packages/packages/scotch/esmumps-ldflags-6.0.4.patch b/scripts/spack_packages/packages/scotch/esmumps-ldflags-6.0.4.patch deleted file mode 100644 index e22ba17b..00000000 --- a/scripts/spack_packages/packages/scotch/esmumps-ldflags-6.0.4.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/esmumps/Makefile 2017-06-21 10:53:31.595758201 +0200 -+++ b/src/esmumps/Makefile 2017-06-21 10:54:30.811757141 +0200 -@@ -44,7 +44,7 @@ - $(CC) $(CFLAGS) $(CLIBFLAGS) -I$(includedir) -c $(<) -o $(@) - - %$(EXE) : %.c -- $(CC) $(CFLAGS) -I$(includedir) $(<) -o $(@) -L$(libdir) $(LDFLAGS) -L. -l$(ESMUMPSLIB) -l$(SCOTCHLIB) -lscotch -l$(SCOTCHLIB)errexit -lm -+ $(CC) $(CFLAGS) -I$(includedir) $(<) -o $(@) -L$(libdir) -L. -l$(ESMUMPSLIB) -l$(SCOTCHLIB) -lscotch -l$(SCOTCHLIB)errexit -lm $(LDFLAGS) - - ## - ## Project rules. diff --git a/scripts/spack_packages/packages/scotch/libscotch-scotcherr-link-7.0.1.patch b/scripts/spack_packages/packages/scotch/libscotch-scotcherr-link-7.0.1.patch deleted file mode 100644 index 40e4ade8..00000000 --- a/scripts/spack_packages/packages/scotch/libscotch-scotcherr-link-7.0.1.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/src/libscotch/CMakeLists.txt -+++ b/src/libscotch/CMakeLists.txt -@@ -508,7 +508,7 @@ add_library(scotch - set_target_properties(scotch PROPERTIES VERSION - ${SCOTCH_VERSION}.${SCOTCH_RELEASE}.${SCOTCH_PATCHLEVEL}) - add_dependencies(scotch parser_yy_c parser_ll_c) --target_link_libraries(scotch PUBLIC m) -+target_link_libraries(scotch PUBLIC m scotcherr) - target_include_directories(scotch PUBLIC - $ - $ -@@ -748,7 +748,7 @@ if(BUILD_PTSCOTCH) - set_target_properties(ptscotch PROPERTIES - VERSION ${SCOTCH_VERSION}.${SCOTCH_RELEASE}.${SCOTCH_PATCHLEVEL} - COMPILE_FLAGS -DSCOTCH_PTSCOTCH) -- target_link_libraries(ptscotch PUBLIC scotch MPI::MPI_C) -+ target_link_libraries(ptscotch PUBLIC ptscotcherr scotch MPI::MPI_C) - target_include_directories(ptscotch PUBLIC - $ - $ diff --git a/scripts/spack_packages/packages/scotch/libscotchmetis-return-6.0.5a.patch b/scripts/spack_packages/packages/scotch/libscotchmetis-return-6.0.5a.patch deleted file mode 100644 index 7e124c6a..00000000 --- a/scripts/spack_packages/packages/scotch/libscotchmetis-return-6.0.5a.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/libscotchmetis/metis_graph_part.c 2018-07-13 14:25:50.000000000 -0500 -+++ b/src/libscotchmetis/metis_graph_part.c 2018-07-13 14:21:08.000000000 -0500 -@@ -298,7 +298,7 @@ - - edgenbr = xadj[vertnbr] - baseval; - if ((edlotax = memAlloc (edgenbr * sizeof (SCOTCH_Num))) == NULL) -- return; -+ return (METIS_ERROR); - edlotax -= baseval; /* Base access to edlotax */ - vsiztax = vsize2 - baseval; diff --git a/scripts/spack_packages/packages/scotch/metis-headers-6.0.4.patch b/scripts/spack_packages/packages/scotch/metis-headers-6.0.4.patch deleted file mode 100644 index 9c902a62..00000000 --- a/scripts/spack_packages/packages/scotch/metis-headers-6.0.4.patch +++ /dev/null @@ -1,634 +0,0 @@ ---- A/src/libscotch/Makefile 2014-09-23 21:28:28.000000000 +0200 -+++ B/src/libscotch/Makefile 2015-07-24 12:51:31.357132922 +0200 -@@ -60,7 +60,7 @@ scotch : - libscotcherrexit$(LIB) - - ptscotch : scotch -- $(MAKE) CFLAGS="$(CFLAGS) -DSCOTCH_PTSCOTCH" CC="$(CCP)" \ -+ $(MAKE) CFLAGS="$(CFLAGS) -DSCOTCH_PTSCOTCH" CC="$(CCP)" CCD="$(CCP)" \ - ptscotch.h \ - ptscotchf.h \ - libptscotch$(LIB) \ ---- A/src/libscotchmetis/Makefile 2011-09-06 18:46:48.000000000 +0200 -+++ B/src/libscotchmetis/Makefile 2015-08-25 13:37:31.424467916 +0200 -@@ -54,10 +54,12 @@ include ../Makefile.inc - - scotch : - $(MAKE) CC="$(CCS)" SCOTCHLIB=ptscotch \ -+ metis.h \ - libscotchmetis$(LIB) - - ptscotch : - $(MAKE) CFLAGS="$(CFLAGS) -DSCOTCH_PTSCOTCH" CC="$(CCP)" SCOTCHLIB=ptscotch \ -+ parmetis.h \ - libptscotchparmetis$(LIB) - - install : scotch -@@ -69,7 +71,7 @@ ptinstall : ptscotch - -$(CP) libptscotchparmetis$(LIB) $(libdir) - - clean : -- -$(RM) *~ *$(OBJ) lib*$(LIB) -+ -$(RM) *~ *$(OBJ) lib*$(LIB) metis.h parmetis.h - - realclean : clean - -@@ -138,3 +140,10 @@ libscotchmetis$(LIB) : metis_graph_orde - metis_graph_part_f$(OBJ) - $(AR) $(ARFLAGS) $(@) $(^) - -$(RANLIB) $(@) -+metis.h : metis_skeleton.h \ -+ ../libscotch/dummysizes -+ ../libscotch/dummysizes metis_skeleton.h metis.h -+ -+parmetis.h : parmetis_skeleton.h \ -+ ../libscotch/dummysizes -+ ../libscotch/dummysizes parmetis_skeleton.h parmetis.h ---- A/src/libscotchmetis/metis.h 2012-09-13 17:43:52.000000000 +0200 -+++ B/src/libscotchmetis/metis.h 1970-01-01 01:00:00.000000000 +0100 -@@ -1,97 +0,0 @@ --/********************************************************* --** ** --** WARNING: THIS IS NOT THE ORIGINAL INCLUDE FILE OF ** --** THE MeTiS SOFTWARE PACKAGE. ** --** This file is a compatibility include file provided ** --** as part of the Scotch software distribution. ** --** Preferably use the original MeTiS include file to ** --** keep definitions of routines not overloaded by ** --** the libScotchMeTiS library. ** --** ** --*********************************************************/ --/* Copyright 2007,2010,2012 IPB, Universite de Bordeaux, INRIA & CNRS --** --** This file is part of the Scotch software package for static mapping, --** graph partitioning and sparse matrix ordering. --** --** This software is governed by the CeCILL-C license under French law --** and abiding by the rules of distribution of free software. You can --** use, modify and/or redistribute the software under the terms of the --** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following --** URL: "http://www.cecill.info". --** --** As a counterpart to the access to the source code and rights to copy, --** modify and redistribute granted by the license, users are provided --** only with a limited warranty and the software's author, the holder of --** the economic rights, and the successive licensors have only limited --** liability. --** --** In this respect, the user's attention is drawn to the risks associated --** with loading, using, modifying and/or developing or reproducing the --** software by the user in light of its specific status of free software, --** that may mean that it is complicated to manipulate, and that also --** therefore means that it is reserved for developers and experienced --** professionals having in-depth computer knowledge. Users are therefore --** encouraged to load and test the software's suitability as regards --** their requirements in conditions enabling the security of their --** systems and/or data to be ensured and, more generally, to use and --** operate it in the same conditions as regards security. --** --** The fact that you are presently reading this means that you have had --** knowledge of the CeCILL-C license and that you accept its terms. --*/ --/************************************************************/ --/** **/ --/** NAME : metis.h **/ --/** **/ --/** AUTHOR : Francois PELLEGRINI **/ --/** **/ --/** FUNCTION : Compatibility declaration file for the **/ --/** MeTiS interface routines provided by **/ --/** the Scotch project. **/ --/** **/ --/** DATES : # Version 5.0 : from : 08 sep 2006 **/ --/** to 07 jun 2007 **/ --/** # Version 5.1 : from : 30 jun 2010 **/ --/** to 30 jun 2010 **/ --/** # Version 6.0 : from : 13 sep 2012 **/ --/** to 13 sep 2012 **/ --/** **/ --/************************************************************/ -- --/* --** The defines. --*/ -- --#ifdef SCOTCH_METIS_PREFIX --#define SCOTCH_METIS_PREFIXL scotch_ --#define SCOTCH_METIS_PREFIXU SCOTCH_ --#endif /* SCOTCH_METIS_PREFIX */ -- --#ifndef SCOTCH_METIS_PREFIXL --#define SCOTCH_METIS_PREFIXL --#endif /* SCOTCH_METIS_PREFIXL */ -- --#ifndef SCOTCH_METIS_PREFIXU --#define SCOTCH_METIS_PREFIXU --#endif /* SCOTCH_METIS_PREFIXU */ -- --#ifndef METISNAMEL --#define METISNAMEL(s) METISNAME2(METISNAME3(SCOTCH_METIS_PREFIXL),s) --#define METISNAMEU(s) METISNAME2(METISNAME3(SCOTCH_METIS_PREFIXU),s) --#define METISNAME2(p,s) METISNAME4(p,s) --#define METISNAME3(s) s --#define METISNAME4(p,s) p##s --#endif /* METISNAMEL */ -- --/* --** The function prototypes. --*/ -- --void METISNAMEU(METIS_EdgeND) (const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const); --void METISNAMEU(METIS_NodeND) (const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const); --void METISNAMEU(METIS_NodeWND) (const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const); -- --void METISNAMEU(METIS_PartGraphKway) (const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const); --void METISNAMEU(METIS_PartGraphRecursive) (const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const); --void METISNAMEU(METIS_PartGraphVKway) (const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const); ---- A/src/libscotchmetis/metis_skeleton.h 1970-01-01 01:00:00.000000000 +0100 -+++ B/src/libscotchmetis/metis_skeleton.h 2015-08-25 13:27:07.224497875 +0200 -@@ -0,0 +1,103 @@ -+/********************************************************* -+** ** -+** WARNING: THIS IS NOT THE ORIGINAL INCLUDE FILE OF ** -+** THE MeTiS SOFTWARE PACKAGE. ** -+** This file is a compatibility include file provided ** -+** as part of the Scotch software distribution. ** -+** Preferably use the original MeTiS include file to ** -+** keep definitions of routines not overloaded by ** -+** the libScotchMeTiS library. ** -+** ** -+*********************************************************/ -+/* Copyright 2007,2010,2012 IPB, Universite de Bordeaux, INRIA & CNRS -+** -+** This file is part of the Scotch software package for static mapping, -+** graph partitioning and sparse matrix ordering. -+** -+** This software is governed by the CeCILL-C license under French law -+** and abiding by the rules of distribution of free software. You can -+** use, modify and/or redistribute the software under the terms of the -+** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following -+** URL: "http://www.cecill.info". -+** -+** As a counterpart to the access to the source code and rights to copy, -+** modify and redistribute granted by the license, users are provided -+** only with a limited warranty and the software's author, the holder of -+** the economic rights, and the successive licensors have only limited -+** liability. -+** -+** In this respect, the user's attention is drawn to the risks associated -+** with loading, using, modifying and/or developing or reproducing the -+** software by the user in light of its specific status of free software, -+** that may mean that it is complicated to manipulate, and that also -+** therefore means that it is reserved for developers and experienced -+** professionals having in-depth computer knowledge. Users are therefore -+** encouraged to load and test the software's suitability as regards -+** their requirements in conditions enabling the security of their -+** systems and/or data to be ensured and, more generally, to use and -+** operate it in the same conditions as regards security. -+** -+** The fact that you are presently reading this means that you have had -+** knowledge of the CeCILL-C license and that you accept its terms. -+*/ -+/************************************************************/ -+/** **/ -+/** NAME : metis.h **/ -+/** **/ -+/** AUTHOR : Francois PELLEGRINI **/ -+/** **/ -+/** FUNCTION : Compatibility declaration file for the **/ -+/** MeTiS interface routines provided by **/ -+/** the Scotch project. **/ -+/** **/ -+/** DATES : # Version 5.0 : from : 08 sep 2006 **/ -+/** to 07 jun 2007 **/ -+/** # Version 5.1 : from : 30 jun 2010 **/ -+/** to 30 jun 2010 **/ -+/** # Version 6.0 : from : 13 sep 2012 **/ -+/** to 13 sep 2012 **/ -+/** **/ -+/************************************************************/ -+ -+#include -+ -+/* -+** The defines. -+*/ -+ -+#ifdef SCOTCH_METIS_PREFIX -+#define SCOTCH_METIS_PREFIXL scotch_ -+#define SCOTCH_METIS_PREFIXU SCOTCH_ -+#endif /* SCOTCH_METIS_PREFIX */ -+ -+#ifndef SCOTCH_METIS_PREFIXL -+#define SCOTCH_METIS_PREFIXL -+#endif /* SCOTCH_METIS_PREFIXL */ -+ -+#ifndef SCOTCH_METIS_PREFIXU -+#define SCOTCH_METIS_PREFIXU -+#endif /* SCOTCH_METIS_PREFIXU */ -+ -+#ifndef METISNAMEL -+#define METISNAMEL(s) METISNAME2(METISNAME3(SCOTCH_METIS_PREFIXL),s) -+#define METISNAMEU(s) METISNAME2(METISNAME3(SCOTCH_METIS_PREFIXU),s) -+#define METISNAME2(p,s) METISNAME4(p,s) -+#define METISNAME3(s) s -+#define METISNAME4(p,s) p##s -+#endif /* METISNAMEL */ -+ -+/*+ Integer type. +*/ -+ -+typedef DUMMYINT SCOTCH_Num; -+ -+/* -+** The function prototypes. -+*/ -+ -+void METISNAMEU(METIS_EdgeND) (const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const); -+void METISNAMEU(METIS_NodeND) (const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const); -+void METISNAMEU(METIS_NodeWND) (const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const); -+ -+void METISNAMEU(METIS_PartGraphKway) (const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const); -+void METISNAMEU(METIS_PartGraphRecursive) (const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const); -+void METISNAMEU(METIS_PartGraphVKway) (const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const); ---- A/src/libscotchmetis/parmetis.h 2012-09-13 17:41:21.000000000 +0200 -+++ B/src/libscotchmetis/parmetis.h 1970-01-01 01:00:00.000000000 +0100 -@@ -1,100 +0,0 @@ --/********************************************************* --** ** --** WARNING: THIS IS NOT THE ORIGINAL INCLUDE FILE OF ** --** THE ParMeTiS SOFTWARE PACKAGE. ** --** This file is a compatibility include file provided ** --** as part of the Scotch software distribution. ** --** Preferably use the original ParMeTiS include file ** --** to keep definitions of routines not overloaded by ** --** the libPTScotchMeTiS library. ** --** ** --*********************************************************/ --/* Copyright 2007,2008,2010,2012 IPB, Universite de Bordeaux, INRIA & CNRS --** --** This file is part of the Scotch software package for static mapping, --** graph partitioning and sparse matrix ordering. --** --** This software is governed by the CeCILL-C license under French law --** and abiding by the rules of distribution of free software. You can --** use, modify and/or redistribute the software under the terms of the --** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following --** URL: "http://www.cecill.info". --** --** As a counterpart to the access to the source code and rights to copy, --** modify and redistribute granted by the license, users are provided --** only with a limited warranty and the software's author, the holder of --** the economic rights, and the successive licensors have only limited --** liability. --** --** In this respect, the user's attention is drawn to the risks associated --** with loading, using, modifying and/or developing or reproducing the --** software by the user in light of its specific status of free software, --** that may mean that it is complicated to manipulate, and that also --** therefore means that it is reserved for developers and experienced --** professionals having in-depth computer knowledge. Users are therefore --** encouraged to load and test the software's suitability as regards --** their requirements in conditions enabling the security of their --** systems and/or data to be ensured and, more generally, to use and --** operate it in the same conditions as regards security. --** --** The fact that you are presently reading this means that you have had --** knowledge of the CeCILL-C license and that you accept its terms. --*/ --/************************************************************/ --/** **/ --/** NAME : parmetis.h **/ --/** **/ --/** AUTHOR : Francois PELLEGRINI **/ --/** **/ --/** FUNCTION : Compatibility declaration file for the **/ --/** MeTiS interface routines provided by **/ --/** the Scotch project. **/ --/** **/ --/** DATES : # Version 5.0 : from : 17 oct 2007 **/ --/** to 18 oct 2007 **/ --/** # Version 5.1 : from : 19 jun 2008 **/ --/** to 30 jun 2010 **/ --/** # Version 6.0 : from : 13 sep 2012 **/ --/** to 13 sep 2012 **/ --/** **/ --/************************************************************/ -- --/* --** The defines and includes. --*/ -- --#ifndef __parmetis_h__ --#define __parmetis_h__ -- --#include /* Since ParMeTiS does it, do it too */ -- --#endif /* __parmetis_h__ */ -- --#ifdef SCOTCH_METIS_PREFIX --#define SCOTCH_METIS_PREFIXL scotch_ --#define SCOTCH_METIS_PREFIXU SCOTCH_ --#endif /* SCOTCH_METIS_PREFIX */ -- --#ifndef SCOTCH_METIS_PREFIXL --#define SCOTCH_METIS_PREFIXL --#endif /* SCOTCH_METIS_PREFIXL */ -- --#ifndef SCOTCH_METIS_PREFIXU --#define SCOTCH_METIS_PREFIXU --#endif /* SCOTCH_METIS_PREFIXU */ -- --#ifndef METISNAMEL --#define METISNAMEL(s) METISNAME2(METISNAME3(SCOTCH_METIS_PREFIXL),s) --#define METISNAMEU(s) METISNAME2(METISNAME3(SCOTCH_METIS_PREFIXU),s) --#define METISNAME2(p,s) METISNAME4(p,s) --#define METISNAME3(s) s --#define METISNAME4(p,s) p##s --#endif /* METISNAMEL */ -- --/* --** The function prototypes. --*/ -- --void METISNAMEU(ParMETIS_V3_NodeND) (const SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const, MPI_Comm * const); --void METISNAMEU(ParMETIS_V3_PartGeomKway) (const SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const float * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const float * const, const float * const, const SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const, MPI_Comm * const); --void METISNAMEU(ParMETIS_V3_PartKway) (const SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const float * const, const float * const, const SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const, MPI_Comm * const); ---- A/src/libscotchmetis/parmetis_skeleton.h 1970-01-01 01:00:00.000000000 +0100 -+++ B/src/libscotchmetis/parmetis_skeleton.h 2015-08-25 13:42:17.972454163 +0200 -@@ -0,0 +1,105 @@ -+/********************************************************* -+** ** -+** WARNING: THIS IS NOT THE ORIGINAL INCLUDE FILE OF ** -+** THE ParMeTiS SOFTWARE PACKAGE. ** -+** This file is a compatibility include file provided ** -+** as part of the Scotch software distribution. ** -+** Preferably use the original ParMeTiS include file ** -+** to keep definitions of routines not overloaded by ** -+** the libPTScotchMeTiS library. ** -+** ** -+*********************************************************/ -+/* Copyright 2007,2008,2010,2012 IPB, Universite de Bordeaux, INRIA & CNRS -+** -+** This file is part of the Scotch software package for static mapping, -+** graph partitioning and sparse matrix ordering. -+** -+** This software is governed by the CeCILL-C license under French law -+** and abiding by the rules of distribution of free software. You can -+** use, modify and/or redistribute the software under the terms of the -+** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following -+** URL: "http://www.cecill.info". -+** -+** As a counterpart to the access to the source code and rights to copy, -+** modify and redistribute granted by the license, users are provided -+** only with a limited warranty and the software's author, the holder of -+** the economic rights, and the successive licensors have only limited -+** liability. -+** -+** In this respect, the user's attention is drawn to the risks associated -+** with loading, using, modifying and/or developing or reproducing the -+** software by the user in light of its specific status of free software, -+** that may mean that it is complicated to manipulate, and that also -+** therefore means that it is reserved for developers and experienced -+** professionals having in-depth computer knowledge. Users are therefore -+** encouraged to load and test the software's suitability as regards -+** their requirements in conditions enabling the security of their -+** systems and/or data to be ensured and, more generally, to use and -+** operate it in the same conditions as regards security. -+** -+** The fact that you are presently reading this means that you have had -+** knowledge of the CeCILL-C license and that you accept its terms. -+*/ -+/************************************************************/ -+/** **/ -+/** NAME : parmetis.h **/ -+/** **/ -+/** AUTHOR : Francois PELLEGRINI **/ -+/** **/ -+/** FUNCTION : Compatibility declaration file for the **/ -+/** MeTiS interface routines provided by **/ -+/** the Scotch project. **/ -+/** **/ -+/** DATES : # Version 5.0 : from : 17 oct 2007 **/ -+/** to 18 oct 2007 **/ -+/** # Version 5.1 : from : 19 jun 2008 **/ -+/** to 30 jun 2010 **/ -+/** # Version 6.0 : from : 13 sep 2012 **/ -+/** to 13 sep 2012 **/ -+/** **/ -+/************************************************************/ -+ -+/* -+** The defines and includes. -+*/ -+ -+#ifndef __parmetis_h__ -+#define __parmetis_h__ -+ -+#include -+#include /* Since ParMeTiS does it, do it too */ -+ -+#endif /* __parmetis_h__ */ -+ -+#ifdef SCOTCH_METIS_PREFIX -+#define SCOTCH_METIS_PREFIXL scotch_ -+#define SCOTCH_METIS_PREFIXU SCOTCH_ -+#endif /* SCOTCH_METIS_PREFIX */ -+ -+#ifndef SCOTCH_METIS_PREFIXL -+#define SCOTCH_METIS_PREFIXL -+#endif /* SCOTCH_METIS_PREFIXL */ -+ -+#ifndef SCOTCH_METIS_PREFIXU -+#define SCOTCH_METIS_PREFIXU -+#endif /* SCOTCH_METIS_PREFIXU */ -+ -+#ifndef METISNAMEL -+#define METISNAMEL(s) METISNAME2(METISNAME3(SCOTCH_METIS_PREFIXL),s) -+#define METISNAMEU(s) METISNAME2(METISNAME3(SCOTCH_METIS_PREFIXU),s) -+#define METISNAME2(p,s) METISNAME4(p,s) -+#define METISNAME3(s) s -+#define METISNAME4(p,s) p##s -+#endif /* METISNAMEL */ -+ -+/*+ Integer type. +*/ -+ -+typedef DUMMYINT SCOTCH_Num; -+ -+/* -+** The function prototypes. -+*/ -+ -+void METISNAMEU(ParMETIS_V3_NodeND) (const SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const, MPI_Comm * const); -+void METISNAMEU(ParMETIS_V3_PartGeomKway) (const SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const float * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const float * const, const float * const, const SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const, MPI_Comm * const); -+void METISNAMEU(ParMETIS_V3_PartKway) (const SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const float * const, const float * const, const SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const, MPI_Comm * const); ---- A/src/Makefile 2014-10-02 17:31:36.000000000 +0200 -+++ B/src/Makefile 2015-08-25 13:00:50.288573562 +0200 -@@ -115,6 +115,7 @@ install : required $(bindir) $(includ - -$(CP) -f ../bin/[agm]*$(EXE) $(bindir) - -$(CP) -f ../bin/d[agm]*$(EXE) $(bindir) - -$(CP) -f ../include/*scotch*.h $(includedir) -+ -$(CP) -f ../include/*metis*.h $(includedir) - -$(CP) -f ../lib/*scotch*$(LIB) $(libdir) - -$(CP) -Rf ../man/* $(mandir) - ---- A/src/Makefile~ 1970-01-01 01:00:00.000000000 +0100 -+++ B/src/Makefile~ 2014-10-02 17:31:36.000000000 +0200 -@@ -0,0 +1,134 @@ -+## Copyright 2004,2007,2008,2010-2012,2014 IPB, Universite de Bordeaux, INRIA & CNRS -+## -+## This file is part of the Scotch software package for static mapping, -+## graph partitioning and sparse matrix ordering. -+## -+## This software is governed by the CeCILL-C license under French law -+## and abiding by the rules of distribution of free software. You can -+## use, modify and/or redistribute the software under the terms of the -+## CeCILL-C license as circulated by CEA, CNRS and INRIA at the following -+## URL: "http://www.cecill.info". -+## -+## As a counterpart to the access to the source code and rights to copy, -+## modify and redistribute granted by the license, users are provided -+## only with a limited warranty and the software's author, the holder of -+## the economic rights, and the successive licensors have only limited -+## liability. -+## -+## In this respect, the user's attention is drawn to the risks associated -+## with loading, using, modifying and/or developing or reproducing the -+## software by the user in light of its specific status of free software, -+## that may mean that it is complicated to manipulate, and that also -+## therefore means that it is reserved for developers and experienced -+## professionals having in-depth computer knowledge. Users are therefore -+## encouraged to load and test the software's suitability as regards -+## their requirements in conditions enabling the security of their -+## systems and/or data to be ensured and, more generally, to use and -+## operate it in the same conditions as regards security. -+## -+## The fact that you are presently reading this means that you have had -+## knowledge of the CeCILL-C license and that you accept its terms. -+## -+ -+VERSION = 6 -+RELEASE = 0 -+PATCHLEVEL = 4 -+ -+.PHONY : clean default install ptscotch realclean required scotch -+ -+default : scotch -+ -+required : Makefile.inc ../bin ../include ../lib -+ -+Makefile.inc : -+ @echo "#####################################################################" -+ @echo "BEFORE COMPILING Scotch OR PT-Scotch, YOU SHOULD HAVE AN APPROPRIATE" -+ @echo "Makefile.inc FILE IN THIS DIRECTORY. PLEASE LOOK INTO DIRECTORY" -+ @echo " ./Make.inc FOR AN EXISTING Makefile.inc FILE THAT FITS YOUR NEED, OR" -+ @echo "USE THEM AS MODELS IN CASE YOU NEED TO BUILD A NEW ONE FOR YOUR" -+ @echo "PARTICULAR PLATFORM." -+ @echo "#####################################################################" -+ @echo "Then, type \"make scotch\" (default) for the sequential library" -+ @echo "and software, or \"make ptscotch\" for the parallel library and" -+ @echo "software." -+ @exit 1 -+ -+include Makefile.inc -+ -+prefix ?= /usr/local -+bindir ?= $(prefix)/bin -+includedir ?= $(prefix)/include -+libdir ?= $(prefix)/lib -+datarootdir ?= $(prefix)/share -+mandir ?= $(datarootdir)/man -+ -+../bin : -+ -$(MKDIR) ../bin -+ -+../include : -+ -$(MKDIR) ../include -+ -+../lib : -+ -$(MKDIR) ../lib -+ -+$(bindir) : -+ -$(MKDIR) $(bindir) -+ -+$(datarootdir) : -+ -$(MKDIR) $(datarootdir) -+ -+$(includedir) : -+ -$(MKDIR) $(includedir) -+ -+$(libdir) : -+ -$(MKDIR) $(libdir) -+ -+$(mandir) : $(datarootdir) -+ -$(MKDIR) $(mandir) -+ -+$(mandir)/man1 : $(mandir) -+ -$(MKDIR) $(mandir)/man1 -+ -+scotch : required -+ (cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install) -+ (cd scotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install) -+ (cd libscotchmetis ; $(MAKE) scotch && $(MAKE) install) -+ -+ptscotch : required -+ (cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) ptscotch && $(MAKE) ptinstall) -+ (cd scotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) ptscotch && $(MAKE) ptinstall) -+ (cd libscotchmetis ; $(MAKE) ptscotch && $(MAKE) ptinstall) -+ -+check : scotch -+ (cd check ; $(MAKE) check) -+ -+ptcheck : ptscotch -+ (cd check ; $(MAKE) ptcheck) -+ -+esmumps : scotch -+ (cd esmumps ; $(MAKE) scotch && $(MAKE) install) -+ -+ptesmumps : ptscotch -+ (cd esmumps ; $(MAKE) ptscotch && $(MAKE) ptinstall) -+ -+install : required $(bindir) $(includedir) $(libdir) $(mandir)/man1 -+ -$(CP) -f ../bin/[agm]*$(EXE) $(bindir) -+ -$(CP) -f ../bin/d[agm]*$(EXE) $(bindir) -+ -$(CP) -f ../include/*scotch*.h $(includedir) -+ -$(CP) -f ../lib/*scotch*$(LIB) $(libdir) -+ -$(CP) -Rf ../man/* $(mandir) -+ -+clean : required -+ (cd libscotch ; $(MAKE) clean) -+ (cd scotch ; $(MAKE) clean) -+ (cd libscotchmetis ; $(MAKE) clean) -+ (cd check ; $(MAKE) clean) -+ (cd esmumps ; $(MAKE) clean) -+ -+realclean : required -+ (cd libscotch ; $(MAKE) realclean) -+ (cd scotch ; $(MAKE) realclean) -+ (cd libscotchmetis ; $(MAKE) realclean) -+ (cd check ; $(MAKE) realclean) -+ (cd esmumps ; $(MAKE) realclean) -+ -$(RM) ../bin/* ../include/* ../lib/* ---- A/src/Make.inc/Makefile.inc.x86-64_pc_linux2~ 1970-01-01 01:00:00.000000000 +0100 -+++ B/src/Make.inc/Makefile.inc.x86-64_pc_linux2~ 2015-08-25 13:09:33.984548426 +0200 -@@ -0,0 +1,21 @@ -+EXE = -+LIB = .a -+OBJ = .o -+ -+MAKE = make -+AR = ar -+ARFLAGS = -ruv -+CAT = cat -+CCS = gcc -+CCP = mpicc -+CCD = gcc -+CFLAGS = -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -Drestrict=__restrict -DIDXSIZE64 -DINT=int64_t -+CLIBFLAGS = -+LDFLAGS = -lz -lm -lrt -pthread -+CP = cp -+LEX = flex -Pscotchyy -olex.yy.c -+LN = ln -+MKDIR = mkdir -+MV = mv -+RANLIB = ranlib -+YACC = bison -pscotchyy -y -b y diff --git a/scripts/spack_packages/packages/scotch/nonthreaded-6.0.4.patch b/scripts/spack_packages/packages/scotch/nonthreaded-6.0.4.patch deleted file mode 100644 index 89d17e25..00000000 --- a/scripts/spack_packages/packages/scotch/nonthreaded-6.0.4.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- scotch_6.0.4.orig/src/libscotch/common.h 2015-03-01 10:14:02.000000000 +0100 -+++ scotch_6.0.4/src/libscotch/common.h 2017-03-27 13:07:18.644221999 +0200 -@@ -306,6 +306,8 @@ - ThreadLaunchStartFunc stafptr; /*+ Pointer to start routine +*/ - ThreadLaunchJoinFunc joifptr; /*+ Pointer to join routine +*/ - ThreadBarrier barrdat; /*+ Barrier data structure +*/ -+#else -+ int thrdnbr; /* dummy for non-threaded */ - #endif /* ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD)) */ - } ThreadGroupHeader; - diff --git a/scripts/spack_packages/packages/scotch/package.py b/scripts/spack_packages/packages/scotch/package.py deleted file mode 100644 index ace6057a..00000000 --- a/scripts/spack_packages/packages/scotch/package.py +++ /dev/null @@ -1,324 +0,0 @@ -# Copyright Spack Project Developers. See COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack_repo.builtin.build_systems import cmake, makefile -from spack_repo.builtin.build_systems.cmake import CMakePackage -from spack_repo.builtin.build_systems.makefile import MakefilePackage - -from spack.package import * - - -class Scotch(CMakePackage, MakefilePackage): - """Scotch is a software package for graph and mesh/hypergraph - partitioning, graph clustering, and sparse matrix ordering. - """ - - homepage = "https://gitlab.inria.fr/scotch/scotch" - git = "https://gitlab.inria.fr/scotch/scotch.git" - url = "https://gitlab.inria.fr/scotch/scotch/-/archive/v7.0.1/scotch-v7.0.1.tar.gz" - list_url = "https://gforge.inria.fr/frs/?group_id=248" - - maintainers("pghysels") - - version("7.0.8", sha256="21f48ac85c7991a5eb5fae9232dd68584556ccc500f85e2ebd6b5b275617e11a") - version("7.0.7", sha256="02084471d2ca525f8a59b4bb8c607eb5cca452d6a38cf5c89f5f92f7edc1a5b5") - version("7.0.6", sha256="b44acd0d2f53de4b578fa3a88944cccc45c4d2961cd8cefa9b9a1d5431de8e2b") - version("7.0.4", sha256="8ef4719d6a3356e9c4ca7fefd7e2ac40deb69779a5c116f44da75d13b3d2c2c3") - version("7.0.3", sha256="5b5351f0ffd6fcae9ae7eafeccaa5a25602845b9ffd1afb104db932dd4d4f3c5") - version("7.0.1", sha256="0618e9bc33c02172ea7351600fce4fccd32fe00b3359c4aabb5e415f17c06fed") - version("6.1.3", sha256="4e54f056199e6c23d46581d448fcfe2285987e5554a0aa527f7931684ef2809e") - version("6.1.2", sha256="9c2c75c75f716914a2bd1c15dffac0e29a2f8069b2df1ad2b6207c984b699450") - version("6.1.1", sha256="14daf151399fc67f83fd3ff2933854f5e8d2207c7d35dd66a05660bf0bbd583c") - version("6.1.0", sha256="4fe537f608f0fe39ec78807f90203f9cca1181deb16bfa93b7d4cd440e01bbd1") - version("6.0.10", sha256="e5542b6102b5616f0f5c6619e3e9d52f9d0e48cb991e9b30670f598deeac0553") - version("6.0.9", sha256="b9bc86c50b65781eb416663e938d57555373c2517ea8b9acf680fd3acde0cb0c") - version("6.0.8", sha256="9457c1e7c30f073686cc217345b5a96af4166d6abbf148af84cdbab4e144b299") - version("6.0.6", sha256="e932b4c04636fcf5d21b9a76376868de052c9b000bdaf96f8967dcec61bdaa10") - version("6.0.5a", sha256="5b21b95e33acd5409d682fa7253cefbdffa8db82875549476c006d8cbe7c556f") - version("6.0.4", sha256="f53f4d71a8345ba15e2dd4e102a35fd83915abf50ea73e1bf6efe1bc2b4220c7") - version("6.0.3", sha256="6461cc9f28319a9dbe6cc10e28c0cbe90b4b25e205723c3edcde9a3ff974d6d8") - version("6.0.0", sha256="8206127d038bda868dda5c5a7f60ef8224f2e368298fbb01bf13fa250e378dd4") - version("5.1.10b", sha256="54c9e7fafefd49d8b2017d179d4f11a655abe10365961583baaddc4eeb6a9add") - - build_system(conditional("cmake", when="@7:"), "makefile", default="cmake") - variant("threads", default=True, description="use POSIX Pthreads within Scotch and PT-Scotch") - variant( - "mpi_thread", - default=False, - description="use multi-threaded algorithms in conjunction with MPI", - ) - variant("mpi", default=True, description="Compile parallel libraries") - variant("compression", default=True, description="May use compressed files") - variant("esmumps", default=False, description="Compile esmumps (needed by mumps)") - variant("shared", default=True, description="Build a shared version of the library") - variant( - "metis", default=False, description="Expose vendored METIS/ParMETIS libraries and wrappers" - ) - variant("int64", default=False, description="Use int64_t for SCOTCH_Num typedef") - variant("noarch", default=False, description="Unset SPACK_TARGET_ARGS") - variant( - "link_error_lib", - default=False, - when="@7.0.1", - description="Link error handling library to libscotch/libptscotch", - ) - variant("determinism", default="FULL", values=("NONE", "FIXED_SEED", "FULL"), multi=False, description="Determinism configuration") - - depends_on("c", type="build") - depends_on("cxx", type="build") - depends_on("fortran", type="build") - - # Does not build with flex 2.6.[23] - depends_on("flex@:2.6.1,2.6.4:", type="build") - depends_on("bison@3.4:", type="build") - depends_on("mpi", when="+mpi") - depends_on("zlib-api", when="+compression") - - # Version-specific patches - patch("nonthreaded-6.0.4.patch", when="@6.0.4") - patch("esmumps-ldflags-6.0.4.patch", when="@6.0.4") - patch("metis-headers-6.0.4.patch", when="@6.0.4") - - patch("libscotchmetis-return-6.0.5a.patch", when="@6.0.5a") - patch("libscotch-scotcherr-link-7.0.1.patch", when="@7.0.1 +link_error_lib") - - # Avoid OpenMPI segfaults by using MPI_Comm_F2C for parmetis communicator - patch("parmetis-mpi.patch", when="@6.1.1:7.0.3 +metis ^openmpi") - - # Vendored dependency of METIS/ParMETIS conflicts with standard - # installations - conflicts("metis", when="+metis") - conflicts("parmetis", when="+metis") - - parallel = False - - # NOTE: Versions of Scotch up to version 6.0.0 don't include support for - # building with 'esmumps' in their default packages. In order to enable - # support for this feature, we must grab the 'esmumps' enabled archives - # from the Scotch hosting site. These alternative archives include a - # superset of the behavior in their default counterparts, so we choose to - # always grab these versions for older Scotch versions for simplicity. - @when("@:6.0.0") - def url_for_version(self, version): - url = "https://gforge.inria.fr/frs/download.php/latestfile/298/scotch_{0}_esmumps.tar.gz" - return url.format(version) - - @property - def libs(self): - shared = "+shared" in self.spec - libraries = ["libscotch", "libscotcherr"] - zlibs = [] - - if "+mpi" in self.spec: - libraries = ["libptscotch", "libptscotcherr"] + libraries - - if "+esmumps" in self.spec: - if "~mpi" in self.spec or self.spec.version >= Version("7.0.0"): - libraries = ["libesmumps"] + libraries - else: - libraries = ["libptesmumps"] + libraries - - scotchlibs = find_libraries(libraries, root=self.prefix, recursive=True, shared=shared) - if "+compression" in self.spec: - zlibs = self.spec["zlib-api"].libs - - return scotchlibs + zlibs - - -class CMakeBuilder(cmake.CMakeBuilder): - - def cmake_args(self): - args = [ - self.define_from_variant("BUILD_LIBSCOTCHMETIS", "metis"), - self.define_from_variant("INSTALL_METIS_HEADERS", "metis"), - self.define_from_variant("BUILD_LIBESMUMPS", "esmumps"), - self.define_from_variant("BUILD_SHARED_LIBS", "shared"), - self.define_from_variant("BUILD_PTSCOTCH", "mpi"), - self.define_from_variant("THREADS", "threads"), - self.define_from_variant("MPI_THREAD_MULTIPLE", "mpi_thread"), - self.define_from_variant("SCOTCH_DETERMINISTIC", "determinism"), - ] - - if self.pkg.version > Version("7.0.4"): - args.append(self.define("ENABLE_TESTS", self.pkg.run_tests)) - - if "+int64" in self.spec: - args.append("-DINTSIZE=64") - elif self.is_64bit(): - c_flags = [] - c_flags.append("-DIDXSIZE64") - c_flags.append("-DINTSIZE32") - args.append(self.define("CMAKE_C_FLAGS", " ".join(c_flags))) - - return args - - def is_64bit(self): - return "64" in str(self.pkg.spec.target.family) - - @when("+noarch") - def setup_build_environment(self, env) -> None: - env.unset("SPACK_TARGET_ARGS") - - -class MakefileBuilder(makefile.MakefileBuilder): - build_directory = "src" - - def edit(self, pkg, spec, prefix): - makefile_inc = [] - cflags = ["-O3", "-DSCOTCH_RENAME"] - - if "determinism=FIXED_SEED" in self.spec: - cflags.append("-DCOMMON_RANDOM_FIXED_SEED") - - if "determinism=FULL" in self.spec: - cflags.append("-DCOMMON_RANDOM_FIXED_SEED") - cflags.append("-DSCOTCH_DETERMINISTIC") - - # SCOTCH_Num typedef: size of integers in arguments - # SCOTCH_Idx typedef: indices for addressing - if "+int64" in self.spec: - cflags.append("-DINTSIZE64") - cflags.append("-DIDXSIZE64") - elif self.is_64bit(): - cflags.append("-DINTSIZE32") - cflags.append("-DIDXSIZE64") - else: - cflags.append("-DINTSIZE32") - cflags.append("-DIDXSIZE32") - - if self.spec.satisfies("platform=darwin"): - cflags.extend(["-Drestrict=__restrict"]) - - if "~metis" in self.spec: - # Scotch requires METIS to build, but includes its own patched, - # vendored dependency. Prefix its internal symbols so they won't - # conflict with another installation. - cflags.append("-DSCOTCH_METIS_PREFIX") - - if self.spec.satisfies("+mpi"): - cflags.append("-DSCOTCH_PTHREAD_MPI") - if self.spec.satisfies("@7.0:"): - cflags.append("-DSCOTCH_MPI_ASYNC_COLL") - - if self.spec.satisfies("platform=linux"): - cflags.append("-DCOMMON_PTHREAD_AFFINITY_LINUX") - - # Library Build Type # - if "+shared" in self.spec: - if self.spec.satisfies("platform=darwin"): - makefile_inc.extend( - [ - "LIB = .dylib", - "CLIBFLAGS = -dynamiclib {0}".format(pkg.compiler.cc_pic_flag), - "RANLIB = echo", - "AR = $(CC)", - ( - "ARFLAGS = -dynamiclib $(LDFLAGS) " - "-Wl,-install_name -Wl,%s/$(notdir $@) " - "-undefined dynamic_lookup -o " - ) - % prefix.lib, - ] - ) - else: - makefile_inc.extend( - [ - "LIB = .so", - "CLIBFLAGS = -shared {0}".format(pkg.compiler.cc_pic_flag), - "RANLIB = echo", - "AR = $(CC)", - "ARFLAGS = -shared $(LDFLAGS) -o", - ] - ) - cflags.append(pkg.compiler.cc_pic_flag) - else: - makefile_inc.extend( - [ - "LIB = .a", - "CLIBFLAGS = ", - "RANLIB = ranlib", - "AR = ar", - "ARFLAGS = -ruv ", - ] - ) - - # Compiler-Specific Options # - - if pkg.compiler.name == "gcc": - cflags.append("-Drestrict=__restrict") - elif pkg.compiler.name == "intel": - cflags.append("-Drestrict=") - - mpicc_path = self.spec["mpi"].mpicc if "+mpi" in self.spec else "mpicc" - makefile_inc.append("CCS = $(CC)") - makefile_inc.append("CCP = %s" % mpicc_path) - makefile_inc.append("CCD = $(CCS)") - - # Extra Features # - - ldflags = [] - - if "+compression" in self.spec: - cflags.append("-DCOMMON_FILE_COMPRESS_GZ") - ldflags.append(" {0} ".format(self.spec["zlib-api"].libs.joined())) - - cflags.append("-DCOMMON_PTHREAD") - - # NOTE: bg-q platform needs -lpthread (and not -pthread) - # otherwise we get illegal instruction error during runtime - if self.spec.satisfies("platform=darwin"): - cflags.append("-DCOMMON_PTHREAD_BARRIER") - ldflags.append("-lm -pthread") - else: - ldflags.append("-lm -lrt -pthread") - - makefile_inc.append("LDFLAGS = %s" % " ".join(ldflags)) - - # General Features # - - flex_path = self.spec["flex"].command.path - bison_path = self.spec["bison"].command.path - makefile_inc.extend( - [ - "EXE =", - "OBJ = .o", - "MAKE = make", - "CAT = cat", - "LN = ln", - "MKDIR = mkdir", - "MV = mv", - "CP = cp", - "CFLAGS = %s" % " ".join(cflags), - "prefix = %s" % self.prefix, - ] - ) - if self.spec.satisfies("@7.0:"): - makefile_inc.extend(["FLEX = %s" % flex_path, "BISON = %s" % bison_path]) - else: - makefile_inc.extend( - [ - "LEX = %s -Pscotchyy -olex.yy.c" % flex_path, - "YACC = %s -pscotchyy -y -b y" % bison_path, - ] - ) - - with working_dir("src"): - with open("Makefile.inc", "w") as fh: - fh.write("\n".join(makefile_inc)) - - def is_64bit(self): - return "64" in str(self.pkg.spec.target.family) - - @property - def build_targets(self): - targets = ["scotch"] - if "+mpi" in self.spec: - targets.append("ptscotch") - - if self.spec.version >= Version("6.0.0"): - if "+esmumps" in self.spec: - targets.append("esmumps") - if "+mpi" in self.spec: - targets.append("ptesmumps") - return targets diff --git a/scripts/spack_packages/packages/scotch/parmetis-mpi.patch b/scripts/spack_packages/packages/scotch/parmetis-mpi.patch deleted file mode 100644 index 23190ad5..00000000 --- a/scripts/spack_packages/packages/scotch/parmetis-mpi.patch +++ /dev/null @@ -1,127 +0,0 @@ -diff --git a/src/libscotchmetis/parmetis_dgraph_order_f.c b/src/libscotchmetis/parmetis_dgraph_order_f.c -index 44c2ede..549a834 100644 ---- a/src/libscotchmetis/parmetis_dgraph_order_f.c -+++ b/src/libscotchmetis/parmetis_dgraph_order_f.c -@@ -46,7 +46,7 @@ - /** # Version 6.0 : from : 13 sep 2012 **/ - /** to : 18 may 2019 **/ - /** # Version 7.0 : from : 21 jan 2023 **/ --/** to : 21 jan 2023 **/ -+/** to : 30 jun 2023 **/ - /** **/ - /************************************************************/ - -@@ -76,11 +76,14 @@ const SCOTCH_Num * const numflag, \ - const SCOTCH_Num * const options, \ - SCOTCH_Num * const order, \ - SCOTCH_Num * const sizes, \ --MPI_Comm * const commptr, \ -+const MPI_Fint * const commptr, \ - int * const revaptr), \ - (vtxdist, xadj, adjncy, numflag, options, order, sizes, commptr, revaptr)) - { -- *revaptr = SCOTCH_ParMETIS_V3_NodeND (vtxdist, xadj, adjncy, numflag, options, order, sizes, commptr); -+ MPI_Comm commdat; -+ -+ commdat = MPI_Comm_f2c (*commptr); -+ *revaptr = SCOTCH_ParMETIS_V3_NodeND (vtxdist, xadj, adjncy, numflag, options, order, sizes, &commdat); - } - - /*******************/ -@@ -101,10 +104,13 @@ const SCOTCH_Num * const numflag, \ - const SCOTCH_Num * const options, \ - SCOTCH_Num * const order, \ - SCOTCH_Num * const sizes, \ --MPI_Comm * const commptr), \ -+const MPI_Fint * const commptr), \ - (vtxdist, xadj, adjncy, numflag, options, order, sizes, commptr)) - { -- METISNAMEU (ParMETIS_V3_NodeND) (vtxdist, xadj, adjncy, numflag, options, order, sizes, commptr); -+ MPI_Comm commdat; -+ -+ commdat = MPI_Comm_f2c (*commptr); -+ METISNAMEU (ParMETIS_V3_NodeND) (vtxdist, xadj, adjncy, numflag, options, order, sizes, &commdat); - } - - #endif /* SCOTCH_METIS_PREFIX */ -diff --git a/src/libscotchmetis/parmetis_dgraph_part_f.c b/src/libscotchmetis/parmetis_dgraph_part_f.c -index 2b76818..3bf66af 100644 ---- a/src/libscotchmetis/parmetis_dgraph_part_f.c -+++ b/src/libscotchmetis/parmetis_dgraph_part_f.c -@@ -44,7 +44,7 @@ - /** # Version 6.0 : from : 13 sep 2012 **/ - /** to : 18 may 2019 **/ - /** # Version 7.0 : from : 21 jan 2023 **/ --/** to : 21 jan 2023 **/ -+/** to : 30 jun 2023 **/ - /** **/ - /************************************************************/ - -@@ -81,12 +81,15 @@ const float * const ubvec, \ - const SCOTCH_Num * const options, \ - SCOTCH_Num * const edgecut, \ - SCOTCH_Num * const part, \ --MPI_Comm * const commptr, \ -+const MPI_Fint * const commptr, \ - int * const revaptr), \ - (vtxdist, xadj, adjncy, vwgt, adjwgt, wgtflag, numflag, ncon, nparts, tpwgts, ubvec, options, edgecut, part, commptr, revaptr)) - { -+ MPI_Comm commdat; -+ -+ commdat = MPI_Comm_f2c (*commptr); - *revaptr = SCOTCH_ParMETIS_V3_PartKway (vtxdist, xadj, adjncy, vwgt, adjwgt, wgtflag, numflag, -- ncon, nparts, tpwgts, ubvec, options, edgecut, part, commptr); -+ ncon, nparts, tpwgts, ubvec, options, edgecut, part, &commdat); - } - - /* -@@ -111,12 +114,15 @@ const float * const ubvec, \ - const SCOTCH_Num * const options, \ - SCOTCH_Num * const edgecut, \ - SCOTCH_Num * const part, \ --MPI_Comm * const commptr, \ -+const MPI_Fint * const commptr, \ - int * const revaptr), \ - (vtxdist, xadj, adjncy, vwgt, adjwgt, wgtflag, numflag, ndims, xyz, ncon, nparts, tpwgts, ubvec, options, edgecut, part, commptr, revaptr)) - { -+ MPI_Comm commdat; -+ -+ commdat = MPI_Comm_f2c (*commptr); - *revaptr = SCOTCH_ParMETIS_V3_PartGeomKway (vtxdist, xadj, adjncy, vwgt, adjwgt, wgtflag, numflag, -- ndims, xyz, ncon, nparts, tpwgts, ubvec, options, edgecut, part, commptr); -+ ndims, xyz, ncon, nparts, tpwgts, ubvec, options, edgecut, part, &commdat); - } - - /*******************/ -@@ -144,10 +150,13 @@ const float * const ubvec, \ - const SCOTCH_Num * const options, \ - SCOTCH_Num * const edgecut, \ - SCOTCH_Num * const part, \ --MPI_Comm * const commptr), \ -+const MPI_Fint * const commptr), \ - (vtxdist, xadj, adjncy, vwgt, adjwgt, wgtflag, numflag, ncon, nparts, tpwgts, ubvec, options, edgecut, part, commptr)) - { -- METISNAMEU (ParMETIS_V3_PartKway) (vtxdist, xadj, adjncy, vwgt, adjwgt, wgtflag, numflag, ncon, nparts, tpwgts, ubvec, options, edgecut, part, commptr); -+ MPI_Comm commdat; -+ -+ commdat = MPI_Comm_f2c (*commptr); -+ METISNAMEU (ParMETIS_V3_PartKway) (vtxdist, xadj, adjncy, vwgt, adjwgt, wgtflag, numflag, ncon, nparts, tpwgts, ubvec, options, edgecut, part, &commdat); - } - - /* -@@ -172,10 +181,13 @@ const float * const ubvec, - const SCOTCH_Num * const options, \ - SCOTCH_Num * const edgecut, \ - SCOTCH_Num * const part, \ --MPI_Comm * const commptr), \ -+const MPI_Fint * const commptr), \ - (vtxdist, xadj, adjncy, vwgt, adjwgt, wgtflag, numflag, ndims, xyz, ncon, nparts, tpwgts, ubvec, options, edgecut, part, commptr)) - { -- METISNAMEU (ParMETIS_V3_PartGeomKway) (vtxdist, xadj, adjncy, vwgt, adjwgt, wgtflag, numflag, ndims, xyz, ncon, nparts, tpwgts, ubvec, options, edgecut, part, commptr); -+ MPI_Comm commdat; -+ -+ commdat = MPI_Comm_f2c (*commptr); -+ METISNAMEU (ParMETIS_V3_PartGeomKway) (vtxdist, xadj, adjncy, vwgt, adjwgt, wgtflag, numflag, ndims, xyz, ncon, nparts, tpwgts, ubvec, options, edgecut, part, &commdat); - } - - #endif /* SCOTCH_METIS_PREFIX */ diff --git a/scripts/uberenv b/scripts/uberenv index eb185358..bf2f438f 160000 --- a/scripts/uberenv +++ b/scripts/uberenv @@ -1 +1 @@ -Subproject commit eb1853586821360613f1c6c415ebf65d370a47e7 +Subproject commit bf2f438fc1fe97bb8290a11e5d4f2d56085b4ee3