From a1dd666fb800a93888e8645ddc6d7c12c1864812 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Tue, 28 Apr 2026 22:23:30 -0700 Subject: [PATCH 01/29] retry first round of revisions --- .github/workflows/docker_build_tpls.yml | 106 ++++--------- docker/spack.yaml | 191 ++++++++++++++---------- docker/tpl-ubuntu.Dockerfile | 155 +++++++++++++++++++ scripts/docker-build.sh | 49 +++--- 4 files changed, 331 insertions(+), 170 deletions(-) create mode 100644 docker/tpl-ubuntu.Dockerfile diff --git a/.github/workflows/docker_build_tpls.yml b/.github/workflows/docker_build_tpls.yml index 2f4151e6..c6650714 100644 --- a/.github/workflows/docker_build_tpls.yml +++ b/.github/workflows/docker_build_tpls.yml @@ -7,85 +7,40 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +# TPL images build on top of the base images produced by +# https://github.com/GEOS-DEV/docker_base_images. +env: + DOCKER_BASE_IMAGE_SHA: 47ddae2621f6fc0c2da8bf36305d3fd3730a7db7 + jobs: build_images: name: ${{ matrix.name }} runs-on: ${{ matrix.RUNS_ON }} strategy: - # In-progress jobs will not be cancelled if there is a failure - fail-fast : false + fail-fast: false matrix: include: - - name: Ubuntu (20.04, gcc 9.4.0, open-mpi 4.0.3) - DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc9 - TPL_DOCKERFILE: docker/tpl-ubuntu-gcc.Dockerfile - DOCKER_ROOT_IMAGE: ubuntu:20.04 - DOCKER_COMPILER_BUILD_ARG: "--build-arg GCC_MAJOR_VERSION=9" - RUNS_ON: ubuntu-latest - - name: Ubuntu (20.04, gcc 10.5.0, open-mpi 4.0.3) - github codespaces - DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10 - TPL_DOCKERFILE: docker/tpl-ubuntu-gcc.Dockerfile - DOCKER_ROOT_IMAGE: mcr.microsoft.com/devcontainers/base:ubuntu-20.04 - DOCKER_COMPILER_BUILD_ARG: "--build-arg GCC_MAJOR_VERSION=10" - RUNS_ON: ubuntu-latest - - name: Ubuntu (22.04, gcc 11.4.0, open-mpi 4.1.2) - DOCKER_ROOT_IMAGE: ubuntu:22.04 - DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc11 - TPL_DOCKERFILE: docker/tpl-ubuntu-gcc.Dockerfile - DOCKER_COMPILER_BUILD_ARG: "--build-arg GCC_MAJOR_VERSION=11" - RUNS_ON: ubuntu-latest - - name: Ubuntu (22.04, gcc 12.3.0, open-mpi 4.1.2) - DOCKER_ROOT_IMAGE: ubuntu:22.04 - DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc12 - TPL_DOCKERFILE: docker/tpl-ubuntu-gcc.Dockerfile - DOCKER_COMPILER_BUILD_ARG: "--build-arg GCC_MAJOR_VERSION=12" - RUNS_ON: ubuntu-latest - - name: Ubuntu (22.04, gcc 12.3.0, open-mpi 4.1.2, +hypredrive) - DOCKER_ROOT_IMAGE: ubuntu:22.04 - DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc12-hypredrive - TPL_DOCKERFILE: docker/tpl-ubuntu-gcc.Dockerfile - DOCKER_COMPILER_BUILD_ARG: "--build-arg GCC_MAJOR_VERSION=12" - SPEC: "~pygeosx +docs +hypredrive %gcc-12" + # Minimal restart slice: only known-good Ubuntu host builds. + - name: Ubuntu 24.04 - gcc 12 RUNS_ON: ubuntu-latest - - name: Ubuntu (22.04, clang 15.0.7 + gcc 11.4.0, open-mpi 4.1.2) - DOCKER_ROOT_IMAGE: ubuntu:22.04 - DOCKER_REPOSITORY: geosx/ubuntu22.04-clang15 - TPL_DOCKERFILE: docker/tpl-ubuntu-clang.Dockerfile - DOCKER_COMPILER_BUILD_ARG: "--build-arg CLANG_MAJOR_VERSION=15 --build-arg GCC_MAJOR_VERSION=11" + TPL_DOCKERFILE: docker/tpl-ubuntu.Dockerfile + DOCKER_BASE_IMAGE_TAG: 24.04-gcc12 + DOCKER_BASE_IMAGE_REPO: geosx/ubuntu + DOCKER_REPOSITORY: geosx/ubuntu24.04-gcc12 + GCC_VERSION: 12 + SPEC: "~pygeosx +docs %gcc-12" + + - name: Ubuntu 24.04 - gcc 13 RUNS_ON: ubuntu-latest - - name: Ubuntu (20.04, clang 10.0.0 + gcc 9.4.0, open-mpi 4.0.3, cuda-11.8.89) - DOCKER_REPOSITORY: geosx/ubuntu20.04-clang10.0.0-cuda11.8.89 - TPL_DOCKERFILE: docker/tpl-ubuntu-clang-cuda.Dockerfile - RUNS_ON: ubuntu-latest - - name: Rockylinux (8, gcc 13.3, cuda 12.9.1) - DOCKER_REPOSITORY: geosx/rockylinux8-gcc13-cuda12.9.1 - TPL_DOCKERFILE: docker/tpl-rockylinux-gcc-cuda-12.Dockerfile - RUNS_ON: streak2 - NPROC: 8 - DOCKER_RUN_ARGS: "--cpus=8 --memory=128g --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=all -v /etc/pki/tls/certs/ca-bundle.crt:/etc/pki/tls/certs/ca-bundle.crt:ro -v /etc/pki/tls/certs/ca-bundle.crt:/certs/ca-bundle.crt:ro" - - name: Rockylinux (8, clang 17.0.6, cuda 12.9.1) - DOCKER_REPOSITORY: geosx/rockylinux8-clang17-cuda12.9.1 - TPL_DOCKERFILE: docker/tpl-rockylinux-clang-cuda-12.Dockerfile - RUNS_ON: streak2 - NPROC: 8 - DOCKER_RUN_ARGS: "--cpus=8 --memory=128g --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=all -v /etc/pki/tls/certs/ca-bundle.crt:/etc/pki/tls/certs/ca-bundle.crt:ro -v /etc/pki/tls/certs/ca-bundle.crt:/certs/ca-bundle.crt:ro" - # - name: Sherlock CPU (centos 7.9.2009, gcc 10.1.0, open-mpi 4.1.2, openblas 0.3.10, zlib 1.2.11) - # DOCKER_REPOSITORY: geosx/sherlock-gcc10.1.0-openmpi4.1.2-openblas0.3.10-zlib1.2.11 - # TPL_DOCKERFILE: docker/Stanford/Dockerfile - # DOCKER_ROOT_IMAGE: matteofrigo5/sherlock-gcc10.1.0-openmpi4.1.2-cuda12.4.0-openblas0.3.10-zlib1.2.11-cmake3.31.4-no-geosx:0.0.1 - # SPEC: "~pygeosx~openmp %gcc@10.1.0" - # INSTALL_DIR_ROOT: /oak/stanford/groups/tchelepi/geos-sherlock/CPU - # RUNS_ON: ubuntu-latest - # - name: Sherlock GPU (centos 7.9.2009, gcc 10.1.0, open-mpi 4.1.2, cuda 12.4.0, openblas 0.3.10, zlib 1.2.11) - # DOCKER_REPOSITORY: geosx/sherlock-gcc10.1.0-openmpi4.1.2-cuda12.4.0-openblas0.3.10-zlib1.2.11 - # TPL_DOCKERFILE: docker/Stanford/Dockerfile - # DOCKER_ROOT_IMAGE: matteofrigo5/sherlock-gcc10.1.0-openmpi4.1.2-cuda12.4.0-openblas0.3.10-zlib1.2.11-cmake3.31.4-no-geosx:0.0.1 - # SPEC: "~pygeosx~openmp cuda_arch=86 %gcc@10.1.0 ^cuda@12.4.0+allow-unsupported-compilers" - # INSTALL_DIR_ROOT: /oak/stanford/groups/tchelepi/geos-sherlock/GPU - # RUNS_ON: ubuntu-latest + TPL_DOCKERFILE: docker/tpl-ubuntu.Dockerfile + DOCKER_BASE_IMAGE_TAG: 24.04-gcc13 + DOCKER_BASE_IMAGE_REPO: geosx/ubuntu + DOCKER_REPOSITORY: geosx/ubuntu24.04-gcc13 + GCC_VERSION: 13 + SPEC: "~pygeosx +docs %gcc-13" steps: - name: Checkout @@ -100,28 +55,30 @@ jobs: - name: Print environment run: printenv + - name: Compose DOCKER_BASE_IMAGE + id: base + run: | + echo "DOCKER_BASE_IMAGE=${{ matrix.DOCKER_BASE_IMAGE_REPO }}:${{ matrix.DOCKER_BASE_IMAGE_TAG }}-${DOCKER_BASE_IMAGE_SHA}" >> "$GITHUB_OUTPUT" + - name: Inject CA certificate into Docker build if: matrix.RUNS_ON == 'streak2' run: | - # 1. Copy the host's CA bundle into the Docker build context cp /etc/pki/tls/certs/ca-bundle.crt ./ca-bundle.crt - - # 2. Inject the COPY and update-ca-trust commands right before dnf runs sed -i '/RUN dnf clean all/i COPY ca-bundle.crt /etc/pki/ca-trust/source/anchors/ca-bundle.crt\nRUN update-ca-trust extract' ${{ matrix.TPL_DOCKERFILE }} - name: Run the docker build docker script env: TPL_DOCKERFILE: ${{ matrix.TPL_DOCKERFILE }} DOCKER_REPOSITORY: ${{ matrix.DOCKER_REPOSITORY }} - DOCKER_COMPILER_BUILD_ARG: ${{ matrix.DOCKER_COMPILER_BUILD_ARG }} + DOCKER_BASE_IMAGE: ${{ steps.base.outputs.DOCKER_BASE_IMAGE }} + GCC_VERSION: ${{ matrix.GCC_VERSION }} + CLANG_VERSION: ${{ matrix.CLANG_VERSION }} INSTALL_DIR_ROOT: ${{ matrix.INSTALL_DIR_ROOT || '/opt/GEOS' }} - HOST_CONFIG: ${{ matrix.HOST_CONFIG || 'host-configs/environment.cmake'}} + HOST_CONFIG: ${{ matrix.HOST_CONFIG || 'host-configs/environment.cmake' }} SPEC: ${{ matrix.SPEC || 'undefined' }} - DOCKER_ROOT_IMAGE: ${{ matrix.DOCKER_ROOT_IMAGE || 'undefined' }} COMMIT: ${{ github.sha }} BUILD_DIR: ${{ github.workspace }} DOCKER_TAG: ${{ github.event.number }}-${{ github.run_number }} - run: bash -x ./scripts/docker-build.sh - name: Login to DockerHub @@ -135,7 +92,6 @@ jobs: env: DOCKER_REPOSITORY: ${{ matrix.DOCKER_REPOSITORY }} DOCKER_TAG: ${{ github.event.number }}-${{ github.run_number }} - run: docker push ${DOCKER_REPOSITORY}:${DOCKER_TAG} # Convenience job - passes when all docker images are built. diff --git a/docker/spack.yaml b/docker/spack.yaml index 50c71756..a1917089 100644 --- a/docker/spack.yaml +++ b/docker/spack.yaml @@ -17,68 +17,90 @@ spack: - ../defaults.yaml - ../versions.yaml + # --------------------------------------------------------------------------- + # Toolchains + # + # Aligned with the geosx/ubuntu:* base images produced by + # https://github.com/GEOS-DEV/docker_base_images. Each base image installs + # exactly one of these toolchains; the matrix in + # .github/workflows/docker_build_tpls.yml picks the matching '%' + # selector via the SPEC build-arg. + # --------------------------------------------------------------------------- toolchains: - clang-15: - - spec: '%[virtuals=c]llvm@15.0.7+clang~flang~lld~lldb' + clang-19: + - spec: '%[virtuals=c]llvm@19+clang~flang~lld~lldb' when: '%c' - - spec: '%[virtuals=cxx]llvm@15.0.7+clang~flang~lld~lldb' + - spec: '%[virtuals=cxx]llvm@19+clang~flang~lld~lldb' when: '%cxx' - - spec: '%[virtuals=fortran]gcc@11.4.0' + - spec: '%[virtuals=fortran]gcc@13' when: '%fortran' - spec: '%openmpi' when: '%mpi' - clang-10: - - spec: '%[virtuals=c]llvm@10.0.0+clang~flang~lld~lldb openmp=project' + clang-20: + - spec: cxxflags='-pthread' + - spec: cflags='-pthread' + - spec: '%[virtuals=c]llvm@20+clang~flang~lld~lldb' when: '%c' - - spec: '%[virtuals=cxx]llvm@10.0.0+clang~flang~lld~lldb openmp=project' + - spec: '%[virtuals=cxx]llvm@20+clang~flang~lld~lldb' when: '%cxx' - - spec: '%[virtuals=fortran]gcc@9.4.0' + - spec: '%[virtuals=fortran]gcc@13' when: '%fortran' - spec: '%openmpi' when: '%mpi' - gcc-9: + clang-22: - spec: cxxflags='-pthread' - spec: cflags='-pthread' - - spec: '%c=gcc@9.4.0' + - spec: '%[virtuals=c]llvm@22+clang~flang~lld~lldb' when: '%c' - - spec: '%cxx=gcc@9.4.0' + - spec: '%[virtuals=cxx]llvm@22+clang~flang~lld~lldb' when: '%cxx' - - spec: '%fortran=gcc@9.4.0' + - spec: '%[virtuals=fortran]gcc@13' when: '%fortran' - - spec: '%openmpi %gcc@9.4.0' + - spec: '%openmpi' when: '%mpi' - gcc-10: + gcc-12: - spec: cxxflags='-pthread' - spec: cflags='-pthread' - - spec: '%c=gcc@10.5.0' + - spec: '%c=gcc@12' when: '%c' - - spec: '%cxx=gcc@10.5.0' + - spec: '%cxx=gcc@12' when: '%cxx' - - spec: '%fortran=gcc@10.5.0' + - spec: '%fortran=gcc@12' when: '%fortran' - - spec: '%openmpi %gcc@10.5.0' + - spec: '%openmpi %gcc@12' when: '%mpi' - gcc-11: + gcc-13: - spec: cxxflags='-pthread' - spec: cflags='-pthread' - - spec: '%c=gcc@11.4.0' + - spec: '%c=gcc@13' when: '%c' - - spec: '%cxx=gcc@11.4.0' + - spec: '%cxx=gcc@13' when: '%cxx' - - spec: '%fortran=gcc@11.4.0' + - spec: '%fortran=gcc@13' when: '%fortran' - - spec: '%openmpi %gcc@11.4.0' + - spec: '%openmpi %gcc@13' when: '%mpi' - gcc-12: + gcc-14: - spec: cxxflags='-pthread' - spec: cflags='-pthread' - - spec: '%c=gcc@12.3.0' + - spec: '%c=gcc@14' when: '%c' - - spec: '%cxx=gcc@12.3.0' + - spec: '%cxx=gcc@14' when: '%cxx' - - spec: '%fortran=gcc@12.3.0' + - spec: '%fortran=gcc@14' when: '%fortran' - - spec: '%openmpi %gcc@12.3.0' + - spec: '%openmpi %gcc@14' + when: '%mpi' + gcc-15: + - spec: cxxflags='-pthread' + - spec: cflags='-pthread' + - spec: '%c=gcc@15' + when: '%c' + - spec: '%cxx=gcc@15' + when: '%cxx' + - spec: '%fortran=gcc@15' + when: '%fortran' + - spec: '%openmpi %gcc@15' when: '%mpi' packages: @@ -87,7 +109,7 @@ spack: mpi: require: - - openmpi@4.1.2 + - openmpi@4.1.6 zlib-api: require: @@ -100,51 +122,65 @@ spack: require: - "netlib-lapack" + # ---- Compilers (point at the actual binaries in /usr/bin) ---- llvm: externals: - - spec: llvm@10.0.0+clang~flang~lld~lldb openmp=project + - spec: llvm@19+clang~flang~lld~lldb prefix: /usr extra_attributes: compilers: - c: /usr/bin/clang - cxx: /usr/bin/clang++ - - spec: llvm@15.0.7+clang~flang~lld~lldb + c: /usr/bin/clang-19 + cxx: /usr/bin/clang++-19 + - spec: llvm@20+clang~flang~lld~lldb prefix: /usr extra_attributes: compilers: - c: /usr/bin/clang-15 - cxx: /usr/bin/clang++-15 + c: /usr/bin/clang-20 + cxx: /usr/bin/clang++-20 + - spec: llvm@22+clang~flang~lld~lldb + prefix: /usr + extra_attributes: + compilers: + c: /usr/bin/clang-22 + cxx: /usr/bin/clang++-22 gcc: externals: - - spec: gcc@9.4.0 languages:='c,c++,fortran' + - spec: gcc@12 languages:='c,c++,fortran' prefix: /usr extra_attributes: compilers: - c: /usr/bin/gcc-9 - cxx: /usr/bin/g++-9 - fortran: /usr/bin/gfortran-9 - - spec: gcc@10.5.0 languages:='c,c++,fortran' + c: /usr/bin/gcc-12 + cxx: /usr/bin/g++-12 + fortran: /usr/bin/gfortran-12 + - spec: gcc@13 languages:='c,c++,fortran' prefix: /usr extra_attributes: compilers: - c: /usr/bin/gcc-10 - cxx: /usr/bin/g++-10 - fortran: /usr/bin/gfortran-10 - - spec: gcc@11.4.0 languages:='c,c++,fortran' + c: /usr/bin/gcc-13 + cxx: /usr/bin/g++-13 + fortran: /usr/bin/gfortran-13 + - spec: gcc@14 languages:='c,c++,fortran' prefix: /usr extra_attributes: compilers: - c: /usr/bin/gcc-11 - cxx: /usr/bin/g++-11 - fortran: /usr/bin/gfortran-11 - - spec: gcc@12.3.0 languages:='c,c++,fortran' + c: /usr/bin/gcc-14 + cxx: /usr/bin/g++-14 + fortran: /usr/bin/gfortran-14 + - spec: gcc@15 languages:='c,c++,fortran' prefix: /usr extra_attributes: compilers: - c: /usr/bin/gcc-12 - cxx: /usr/bin/g++-12 - fortran: /usr/bin/gfortran-12 + c: /usr/bin/gcc-15 + cxx: /usr/bin/g++-15 + fortran: /usr/bin/gfortran-15 + + + doxygen: + buildable: false + externals: + - spec: doxygen@1.8.20 + prefix: /usr autoconf: version: [2.71] @@ -159,21 +195,24 @@ spack: - spec: automake@1.16.5 prefix: /usr cmake: - version: [3.28.3] + version: [3.31.9] buildable: false externals: - - spec: cmake@3.28.3 + - spec: cmake@3.31.9 prefix: /usr/local cuda: buildable: False externals: - - spec: cuda@11.8.0 +allow-unsupported-compilers + - spec: cuda@12.9.1 +allow-unsupported-compilers + prefix: /usr/local/cuda + - spec: cuda@13.2.1 +allow-unsupported-compilers prefix: /usr/local/cuda + findutils: - version: [4.7.0] + version: [4.9.0] buildable: false externals: - - spec: findutils@4.7.0 + - spec: findutils@4.9.0 prefix: /usr m4: buildable: false @@ -183,42 +222,40 @@ spack: mpfr: buildable: false externals: - - spec: mpfr@6.0.2 + - spec: mpfr@4.2.0 prefix: /usr - netlib-lapack: buildable: false externals: - - spec: netlib-lapack@3.10.0 + - spec: netlib-lapack@3.12.0 prefix: /usr netlib-blas: buildable: false externals: - - spec: netlib-blas@3.10.0 + - spec: netlib-blas@3.12.0 prefix: /usr + # ---- OpenMPI: same prefix for every compiler binding (Ubuntu 24.04 ships one) openmpi: buildable: false externals: - # 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 + - spec: openmpi@4.1.6 %clang@19 + prefix: /usr + - spec: openmpi@4.1.6 %clang@20 prefix: /usr - modules: [mpi] - - spec: openmpi@4.1.2 %clang@10.0.0 + - spec: openmpi@4.1.6 %clang@22 prefix: /usr - modules: [mpi] - - spec: openmpi@4.1.2 %gcc@9.4.0 + - spec: openmpi@4.1.6 %gcc@12 prefix: /usr - - spec: openmpi@4.1.2 %gcc@10.5.0 + - spec: openmpi@4.1.6 %gcc@13 prefix: /usr - - spec: openmpi@4.1.2 %gcc@11.4.0 + - spec: openmpi@4.1.6 %gcc@14 prefix: /usr - - spec: openmpi@4.1.2 %gcc@12.3.0 + - spec: openmpi@4.1.6 %gcc@15 prefix: /usr perl: buildable: false externals: - - spec: perl@5.34.0 + - spec: perl@5.38.2 prefix: /usr pkg-config: buildable: false @@ -228,22 +265,22 @@ spack: py-sphinx: buildable: false externals: - - spec: py-sphinx@4.3.2 + - spec: py-sphinx@7.4.7 prefix: /usr python: buildable: false externals: - - spec: python@3.10.12 + - spec: python@3.12.3 prefix: /usr readline: buildable: false externals: - - spec: readline@8.0 + - spec: readline@8.2 prefix: /usr tar: buildable: false externals: - - spec: tar@1.34 + - spec: tar@1.35 prefix: /usr unzip: buildable: false @@ -253,10 +290,10 @@ spack: xz: buildable: false externals: - - spec: xz@5.2.5 + - spec: xz@5.6.1 prefix: /usr zlib: buildable: false externals: - - spec: zlib@1.2.11 + - spec: zlib@1.3 prefix: /usr diff --git a/docker/tpl-ubuntu.Dockerfile b/docker/tpl-ubuntu.Dockerfile new file mode 100644 index 00000000..b97ba843 --- /dev/null +++ b/docker/tpl-ubuntu.Dockerfile @@ -0,0 +1,155 @@ +# TPL build Dockerfile for Ubuntu-based images. +# +# This Dockerfile expects DOCKER_BASE_IMAGE to point at one of the geosx/ubuntu:* +# images produced by https://github.com/GEOS-DEV/docker_base_images. Those images +# already provide: +# * the toolchain (gcc or clang) under /opt/compiler/bin/, with CC/CXX/FC set +# * cmake (under /usr/local) +# * the upstream NVIDIA CUDA toolkit when DOCKER_BASE_IMAGE is a CUDA variant +# +# This file is intentionally agnostic of compiler vendor and CUDA-or-not: those +# choices are baked into DOCKER_BASE_IMAGE. The matrix in +# .github/workflows/docker_build_tpls.yml selects the right base image for each +# build. + +# Temporary local variables dedicated to the TPL build +ARG TMP_DIR=/tmp +ARG SRC_DIR=$TMP_DIR/thirdPartyLibs +ARG BLD_DIR=$TMP_DIR/build + +ARG DOCKER_BASE_IMAGE=ubuntu:24.04 +FROM ${DOCKER_BASE_IMAGE} AS tpl_toolchain_intersect_geosx_toolchain +ARG SRC_DIR + +# Install directory provided as a docker build argument; forwarded via ENV +# (GEOSX_TPL_DIR is part of the image contract consumed by GEOS). +ARG INSTALL_DIR +ENV GEOSX_TPL_DIR=$INSTALL_DIR + +# Packages needed both for the TPL build and for the downstream GEOS build. +# We avoid reinstalling anything already present in the base image (compiler, +# cmake, doxygen, blas/lapack-dev when included by base PACKAGES, etc.). +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive TZ=America/Los_Angeles \ + apt-get install -y --no-install-recommends \ + ca-certificates \ + curl \ + libtbb12 \ + libgfortran5 \ + zlib1g-dev \ + doxygen \ + openmpi-bin \ + libopenmpi-dev \ + python3 \ + python3-pip \ + python3-sphinx \ + python3-dev \ + python3-venv \ + python3-virtualenv \ + pkg-config \ + xz-utils \ + unzip \ + libmpfr-dev \ + lbzip2 \ + bzip2 \ + gnupg && \ + apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install clingo for Spack. Do not upgrade Ubuntu's Debian-managed pip in +# place; Ubuntu 24.04's pip package cannot be uninstalled by pip. +RUN python3 -m pip install --break-system-packages clingo + +# MPI environment. CC/CXX/FC come from the base image. +ENV MPICC=/usr/bin/mpicc \ + MPICXX=/usr/bin/mpicxx \ + MPIEXEC=/usr/bin/mpirun +ENV OMPI_CC=${CC} \ + OMPI_CXX=${CXX} + +# Ubuntu OpenMPI defaults wrappers to gcc/g++. For clang-based base images we +# retarget the wrappers to clang/clang++ so mpi wrapper compilers are aligned +# with the image toolchain contract. +RUN if echo "${CC}" | grep -q "clang"; then \ + for f in /usr/share/openmpi/mpicc-wrapper-data.txt /usr/share/openmpi/mpicc.openmpi-wrapper-data.txt; do \ + if [ -f "${f}" ]; then sed -i "s|^compiler=.*$|compiler=${CC}|" "${f}" ; fi ; \ + done && \ + for f in /usr/share/openmpi/mpic++-wrapper-data.txt /usr/share/openmpi/mpic++.openmpi-wrapper-data.txt /usr/share/openmpi/mpicxx-wrapper-data.txt /usr/share/openmpi/mpicxx.openmpi-wrapper-data.txt /usr/share/openmpi/mpiCC-wrapper-data.txt /usr/share/openmpi/mpiCC.openmpi-wrapper-data.txt; do \ + if [ -f "${f}" ]; then sed -i "s|^compiler=.*$|compiler=${CXX}|" "${f}" ; fi ; \ + done && \ + mpicc --showme:command && \ + mpic++ --showme:command ; \ + fi + +# ----- TPL build stage ----- +FROM tpl_toolchain_intersect_geosx_toolchain AS tpl_toolchain +ARG SRC_DIR +ARG BLD_DIR +ARG SPEC + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive TZ=America/Los_Angeles \ + apt-get install -y --no-install-recommends \ + libtbb-dev \ + make \ + bc \ + file \ + patch \ + git \ + autoconf \ + automake \ + m4 && \ + apt-get clean && rm -rf /var/lib/apt/lists/* + +# Run uberenv. The SPEC is supplied by the matrix because the spack toolchain +# tag depends on the compiler+version baked into the base image. +RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \ + mkdir -p ${GEOSX_TPL_DIR} && \ + GEOSX_SPEC="${SPEC}" && \ + if [ -z "${GEOSX_SPEC}" ] || [ "${GEOSX_SPEC}" = "undefined" ]; then \ + echo "ERROR: SPEC build-arg must be supplied" >&2 ; \ + exit 1 ; \ + fi && \ + GEOSX_SPACK_ENV_FILE=${SRC_DIR}/docker/spack.yaml && \ + if echo "${CC:-}" | grep -q "clang"; then \ + GEOSX_SPACK_ENV_FILE=/tmp/geosx-spack.yaml && \ + cp ${SRC_DIR}/docker/spack.yaml ${GEOSX_SPACK_ENV_FILE} && \ + sed -i -E "s/gcc@([0-9]+) languages:='c,c\\+\\+,fortran'/gcc@\\1 languages:='fortran'/g" ${GEOSX_SPACK_ENV_FILE} && \ + sed -i -E '/c: \/usr\/bin\/gcc-[0-9]+/d; /cxx: \/usr\/bin\/g\+\+-[0-9]+/d' ${GEOSX_SPACK_ENV_FILE} ; \ + fi && \ + ./scripts/uberenv/uberenv.py \ + --spec "${GEOSX_SPEC}" \ + --spack-env-file=${GEOSX_SPACK_ENV_FILE} \ + --project-json=${SRC_DIR}/.uberenv_config.json \ + --prefix ${GEOSX_TPL_DIR} \ + -k && \ + rm -f lvarray* && \ + cp *.cmake /spack-generated.cmake && \ + cd ${GEOSX_TPL_DIR} && \ + rm -rf bin/ build_stage/ builtin_spack_packages_repo/ misc_cache/ spack/ spack_env/ .spack-db/ + +# ----- Final GEOS-build image ----- +FROM tpl_toolchain_intersect_geosx_toolchain AS geosx_toolchain +ARG SRC_DIR +COPY --from=tpl_toolchain $GEOSX_TPL_DIR $GEOSX_TPL_DIR +COPY --from=tpl_toolchain /spack-generated.cmake / + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive TZ=America/Los_Angeles \ + apt-get install -y --no-install-recommends \ + openssh-client \ + git \ + texlive \ + texlive-latex-extra \ + graphviz \ + libxml2-utils \ + ghostscript \ + ninja-build \ + python3-mpi4py \ + python3-scipy \ + python3-matplotlib \ + python3-pytest && \ + apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install sccache to speed up downstream GEOS builds +RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-sccache.sh +ENV SCCACHE=/opt/sccache/bin/sccache diff --git a/scripts/docker-build.sh b/scripts/docker-build.sh index 8cd56c39..9ab6a3f5 100644 --- a/scripts/docker-build.sh +++ b/scripts/docker-build.sh @@ -8,27 +8,40 @@ echo .git > .dockerignore git submodule update --init scripts/uberenv -# This script will build an image from TPL_DOCKERFILE -# with (optional) DOCKER_COMPILER_BUILD_ARG build arguments. -# This image will be tagged with the DOCKER_REPOSITORY:DOCKER_TAG tag +# This script will build an image from TPL_DOCKERFILE. +# The new TPL Dockerfiles (docker/tpl-ubuntu.Dockerfile, +# docker/tpl-rockylinux.Dockerfile) layer on top of one of the geosx/: +# base images produced by https://github.com/GEOS-DEV/docker_base_images. The +# matrix in .github/workflows/docker_build_tpls.yml selects which base image +# (DOCKER_BASE_IMAGE) and which spack toolchain (SPEC) to use. +# +# This image will be tagged with the DOCKER_REPOSITORY:DOCKER_TAG tag. # A specific host-config file can be defined through variable HOST_CONFIG. -# For the case of Total cluster only, DOCKER_ROOT_IMAGE is used to define docker base image. -# Where the TPL are installed in the docker can be specified by parameter INSTALL_DIR. -# These variables shall be defined by the "yaml derived classes" in a stage prior to `script` stage. +# Where the TPL are installed in the docker can be specified by parameter +# INSTALL_DIR. echo "Docker tag is ${DOCKER_REPOSITORY}:${DOCKER_TAG}" INSTALL_DIR=${INSTALL_DIR_ROOT}/GEOS_TPL-${DOCKER_TAG}-${COMMIT:0:7} echo "Installation directory is ${INSTALL_DIR}" +echo "Docker base image is ${DOCKER_BASE_IMAGE}" -docker build --progress=plain ${DOCKER_COMPILER_BUILD_ARG} \ ---build-arg HOST_CONFIG=${HOST_CONFIG} \ ---build-arg DOCKER_ROOT_IMAGE=${DOCKER_ROOT_IMAGE} \ ---build-arg INSTALL_DIR=${INSTALL_DIR} \ ---build-arg SPEC="${SPEC}" \ ---tag ${DOCKER_REPOSITORY}:${DOCKER_TAG} \ ---file ${TPL_DOCKERFILE} \ ---label "org.opencontainers.image.created=$(date --rfc-3339=seconds)" \ ---label "org.opencontainers.image.source=https://github.com/GEOS-DEV/thirdPartyLibs" \ ---label "org.opencontainers.image.revision=${COMMIT}" \ ---label "org.opencontainers.image.title=Building environment for GEOS" \ -. +# Optional build-args are only forwarded when set, so the Dockerfiles can rely +# on `[ -z "${ARG}" ]` checks. +EXTRA_BUILD_ARGS=() +if [ -n "${GCC_VERSION}" ]; then EXTRA_BUILD_ARGS+=(--build-arg "GCC_VERSION=${GCC_VERSION}"); fi +if [ -n "${CLANG_VERSION}" ]; then EXTRA_BUILD_ARGS+=(--build-arg "CLANG_VERSION=${CLANG_VERSION}"); fi + +docker build --progress=plain \ + --build-arg HOST_CONFIG=${HOST_CONFIG} \ + --build-arg DOCKER_BASE_IMAGE=${DOCKER_BASE_IMAGE} \ + --build-arg INSTALL_DIR=${INSTALL_DIR} \ + --build-arg SPEC="${SPEC}" \ + "${EXTRA_BUILD_ARGS[@]}" \ + --tag ${DOCKER_REPOSITORY}:${DOCKER_TAG} \ + --file ${TPL_DOCKERFILE} \ + --label "org.opencontainers.image.created=$(date --rfc-3339=seconds)" \ + --label "org.opencontainers.image.source=https://github.com/GEOS-DEV/thirdPartyLibs" \ + --label "org.opencontainers.image.revision=${COMMIT}" \ + --label "org.opencontainers.image.base.name=${DOCKER_BASE_IMAGE}" \ + --label "org.opencontainers.image.title=Building environment for GEOS" \ + . From 39dcdfc89f32a095f59867a4b9195e2c32884853 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Tue, 28 Apr 2026 23:48:20 -0700 Subject: [PATCH 02/29] adding rocky gcc13 --- .github/workflows/docker_build_tpls.yml | 10 ++ docker/tpl-rockylinux.Dockerfile | 173 ++++++++++++++++++++++++ 2 files changed, 183 insertions(+) create mode 100644 docker/tpl-rockylinux.Dockerfile diff --git a/.github/workflows/docker_build_tpls.yml b/.github/workflows/docker_build_tpls.yml index c6650714..254b4ee9 100644 --- a/.github/workflows/docker_build_tpls.yml +++ b/.github/workflows/docker_build_tpls.yml @@ -42,6 +42,16 @@ jobs: GCC_VERSION: 13 SPEC: "~pygeosx +docs %gcc-13" + # First Rocky non-CUDA row re-enabled for incremental validation. + - name: Rocky Linux 8 - gcc 13 + RUNS_ON: ubuntu-latest + TPL_DOCKERFILE: docker/tpl-rockylinux.Dockerfile + DOCKER_BASE_IMAGE_TAG: 8-gcc13 + DOCKER_BASE_IMAGE_REPO: geosx/rockylinux + DOCKER_REPOSITORY: geosx/rockylinux8-gcc13 + GCC_VERSION: 13 + SPEC: "~pygeosx +docs %gcc-13" + steps: - name: Checkout uses: actions/checkout@v6 diff --git a/docker/tpl-rockylinux.Dockerfile b/docker/tpl-rockylinux.Dockerfile new file mode 100644 index 00000000..91a25fc9 --- /dev/null +++ b/docker/tpl-rockylinux.Dockerfile @@ -0,0 +1,173 @@ +# TPL build Dockerfile for Rocky Linux-based images. +# +# This Dockerfile expects DOCKER_BASE_IMAGE to point at one of the +# geosx/rockylinux:* images produced by +# https://github.com/GEOS-DEV/docker_base_images. Those images already provide: +# * the toolchain (gcc-toolset-N or clang) under /opt/compiler/bin/, with +# CC/CXX/FC set +# * cmake (under /usr/local) +# * the upstream NVIDIA CUDA toolkit when DOCKER_BASE_IMAGE is a CUDA variant +# +# Temporary local variables dedicated to the TPL build +ARG TMP_DIR=/tmp +ARG SRC_DIR=$TMP_DIR/thirdPartyLibs +ARG BLD_DIR=$TMP_DIR/build + +ARG DOCKER_BASE_IMAGE=rockylinux:8 +FROM ${DOCKER_BASE_IMAGE} AS tpl_toolchain_intersect_geosx_toolchain +ARG SRC_DIR + +ARG INSTALL_DIR +ENV GEOSX_TPL_DIR=$INSTALL_DIR + +ARG GCC_VERSION + +# Packages needed both for the TPL build and for the downstream GEOS build. +# Some Rocky 8 vs 9 differences are handled by the base image already +# (curl vs curl-minimal, etc.); here we only add things the base images +# don't preinstall. +RUN dnf clean all && \ + dnf -y install dnf-plugins-core || true && \ + (dnf config-manager --set-enabled powertools 2>/dev/null || \ + dnf config-manager --set-enabled crb 2>/dev/null || \ + dnf config-manager --set-enabled devel 2>/dev/null || true) && \ + dnf -y install \ + which \ + zlib-devel \ + tbb \ + doxygen \ + openmpi \ + openmpi-devel \ + python3-pip \ + unzip \ + mpfr-devel \ + bzip2 \ + gnupg2 \ + perl-open \ + xz && \ + (dnf -y install python3-virtualenv || \ + python3 -m pip install --no-cache-dir virtualenv) && \ + dnf clean all && rm -rf /var/cache/dnf /var/lib/dnf + +# Install clingo for Spack +RUN python3 -m pip install --upgrade pip && \ + python3 -m pip install clingo + +# Make `mpicc`/`mpicxx` resolve without a `module load` step. +ENV PATH="/usr/lib64/openmpi/bin:${PATH}" \ + MPICC=/usr/lib64/openmpi/bin/mpicc \ + MPICXX=/usr/lib64/openmpi/bin/mpicxx \ + MPIEXEC=/usr/lib64/openmpi/bin/mpirun +ENV OMPI_CC=${CC} \ + OMPI_CXX=${CXX} + +# Some downstream builds expect /usr/lib64/openmpi/include to point at the +# headers; on Rocky those live under /usr/include/openmpi-x86_64. +RUN if [ -d /usr/include/openmpi-x86_64 ] && [ ! -e /usr/lib64/openmpi/include ]; then \ + mkdir -p /usr/lib64/openmpi && \ + ln -s /usr/include/openmpi-x86_64 /usr/lib64/openmpi/include ; \ + fi && \ + if [ -e /usr/lib64/libblas.so.3 ] && [ ! -e /usr/lib64/libblas.so ]; then ln -s /usr/lib64/libblas.so.3 /usr/lib64/libblas.so ; fi && \ + if [ -e /usr/lib64/liblapack.so.3 ] && [ ! -e /usr/lib64/liblapack.so ]; then ln -s /usr/lib64/liblapack.so.3 /usr/lib64/liblapack.so ; fi + +# Rocky OpenMPI defaults wrappers to gcc/g++. For clang-based base images we +# retarget the wrappers to clang/clang++ so mpi wrapper compilers are aligned +# with the image toolchain contract. +RUN if echo "${CC:-}" | grep -q "clang"; then \ + for f in /usr/share/openmpi/mpicc-wrapper-data.txt /usr/share/openmpi/mpicc.openmpi-wrapper-data.txt; do \ + if [ -f "${f}" ]; then sed -i "s|^compiler=.*$|compiler=${CC}|" "${f}" ; fi ; \ + done && \ + for f in /usr/share/openmpi/mpic++-wrapper-data.txt /usr/share/openmpi/mpic++.openmpi-wrapper-data.txt /usr/share/openmpi/mpicxx-wrapper-data.txt /usr/share/openmpi/mpicxx.openmpi-wrapper-data.txt /usr/share/openmpi/mpiCC-wrapper-data.txt /usr/share/openmpi/mpiCC.openmpi-wrapper-data.txt; do \ + if [ -f "${f}" ]; then sed -i "s|^compiler=.*$|compiler=${CXX}|" "${f}" ; fi ; \ + done && \ + mpicc --showme:command && \ + mpic++ --showme:command ; \ + fi + +# ----- TPL build stage ----- +FROM tpl_toolchain_intersect_geosx_toolchain AS tpl_toolchain +ARG SRC_DIR +ARG BLD_DIR +ARG SPEC + +RUN dnf -y install \ + tbb-devel \ + bc \ + file \ + patch \ + ca-certificates \ + autoconf \ + automake \ + make \ + m4 \ + git && \ + dnf clean all && rm -rf /var/cache/dnf /var/lib/dnf + +# Run uberenv. The SPEC is supplied by the matrix because the spack toolchain +# tag depends on the compiler+version baked into the base image. +# +# GCC toolset rows wrap the build in `scl enable gcc-toolset-${GCC_VERSION}` so +# direct compiler invocations resolve to that toolset. Clang rows do not enable +# the GCC toolset; their generated Spack config leaves GCC available only as +# the explicit Fortran compiler. +RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \ + mkdir -p ${GEOSX_TPL_DIR} && \ + GEOSX_SPEC="${SPEC}" && \ + if [ -z "${GEOSX_SPEC}" ] || [ "${GEOSX_SPEC}" = "undefined" ]; then \ + echo "ERROR: SPEC build-arg must be supplied" >&2 ; \ + exit 1 ; \ + fi && \ + GEOSX_SPACK_ENV_FILE=${SRC_DIR}/docker/rocky-spack.yaml && \ + if echo "${CC:-}" | grep -q "clang"; then \ + GEOSX_SPACK_ENV_FILE=/tmp/geosx-rocky-spack.yaml && \ + cp ${SRC_DIR}/docker/rocky-spack.yaml ${GEOSX_SPACK_ENV_FILE} && \ + sed -i -E "s/gcc@([0-9]+) languages:='c,c\\+\\+,fortran'/gcc@\\1 languages:='fortran'/g" ${GEOSX_SPACK_ENV_FILE} && \ + sed -i -E '/c: \/opt\/rh\/gcc-toolset-[0-9]+\/root\/usr\/bin\/gcc$/d; /cxx: \/opt\/rh\/gcc-toolset-[0-9]+\/root\/usr\/bin\/g\+\+$/d' ${GEOSX_SPACK_ENV_FILE} ; \ + fi && \ + if [ -n "${GCC_VERSION}" ] && [ -d "/opt/rh/gcc-toolset-${GCC_VERSION}" ] && ! echo "${CC:-}" | grep -q "clang"; then \ + scl enable "gcc-toolset-${GCC_VERSION}" " \ + ./scripts/uberenv/uberenv.py \ + --spec '${GEOSX_SPEC}' \ + --spack-env-file=${GEOSX_SPACK_ENV_FILE} \ + --project-json=${SRC_DIR}/.uberenv_config.json \ + --prefix ${GEOSX_TPL_DIR} \ + -k " ; \ + else \ + ./scripts/uberenv/uberenv.py \ + --spec "${GEOSX_SPEC}" \ + --spack-env-file=${GEOSX_SPACK_ENV_FILE} \ + --project-json=${SRC_DIR}/.uberenv_config.json \ + --prefix ${GEOSX_TPL_DIR} \ + -k ; \ + fi && \ + rm -f lvarray* && \ + cp *.cmake /spack-generated.cmake && \ + cd ${GEOSX_TPL_DIR} && \ + rm -rf bin/ build_stage/ builtin_spack_packages_repo/ misc_cache/ spack/ spack_env/ .spack-db/ + +# ----- Final GEOS-build image ----- +FROM tpl_toolchain_intersect_geosx_toolchain AS geosx_toolchain +ARG SRC_DIR +COPY --from=tpl_toolchain $GEOSX_TPL_DIR $GEOSX_TPL_DIR +COPY --from=tpl_toolchain /spack-generated.cmake / + +RUN dnf -y install \ + openssh-clients \ + ca-certificates \ + curl \ + python3 \ + texlive \ + graphviz \ + ninja-build \ + git && \ + dnf clean all && rm -rf /var/cache/dnf /var/lib/dnf && \ + if [ -d /usr/include/openmpi-x86_64 ] && [ ! -e /usr/lib64/openmpi/include ]; then \ + mkdir -p /usr/lib64/openmpi && \ + ln -s /usr/include/openmpi-x86_64 /usr/lib64/openmpi/include ; \ + fi && \ + if [ -e /usr/lib64/libblas.so.3 ] && [ ! -e /usr/lib64/libblas.so ]; then ln -s /usr/lib64/libblas.so.3 /usr/lib64/libblas.so ; fi && \ + if [ -e /usr/lib64/liblapack.so.3 ] && [ ! -e /usr/lib64/liblapack.so ]; then ln -s /usr/lib64/liblapack.so.3 /usr/lib64/liblapack.so ; fi + +# Install sccache to speed up downstream GEOS builds +RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-sccache.sh +ENV SCCACHE=/opt/sccache/bin/sccache From 4c06cad860401cec5ab4b198dd03b1b714f17155 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Wed, 29 Apr 2026 11:48:53 -0700 Subject: [PATCH 03/29] turn off docs for rocky build --- .github/workflows/docker_build_tpls.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker_build_tpls.yml b/.github/workflows/docker_build_tpls.yml index 254b4ee9..42df8aa3 100644 --- a/.github/workflows/docker_build_tpls.yml +++ b/.github/workflows/docker_build_tpls.yml @@ -50,7 +50,7 @@ jobs: DOCKER_BASE_IMAGE_REPO: geosx/rockylinux DOCKER_REPOSITORY: geosx/rockylinux8-gcc13 GCC_VERSION: 13 - SPEC: "~pygeosx +docs %gcc-13" + SPEC: "~pygeosx ~docs %gcc-13" steps: - name: Checkout From 8fd0a6609a5fc2ecff94cd449e954bd3d6de9630 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Wed, 29 Apr 2026 15:07:46 -0700 Subject: [PATCH 04/29] python update --- .github/workflows/docker_build_tpls.yml | 6 +++--- docker/rocky-spack.yaml | 4 ++-- docker/spack.yaml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker_build_tpls.yml b/.github/workflows/docker_build_tpls.yml index 42df8aa3..a85e19a2 100644 --- a/.github/workflows/docker_build_tpls.yml +++ b/.github/workflows/docker_build_tpls.yml @@ -31,7 +31,7 @@ jobs: DOCKER_BASE_IMAGE_REPO: geosx/ubuntu DOCKER_REPOSITORY: geosx/ubuntu24.04-gcc12 GCC_VERSION: 12 - SPEC: "~pygeosx +docs %gcc-12" + SPEC: "~pygeosx +docs ~vtk ~trilinos %gcc-12" - name: Ubuntu 24.04 - gcc 13 RUNS_ON: ubuntu-latest @@ -40,7 +40,7 @@ jobs: DOCKER_BASE_IMAGE_REPO: geosx/ubuntu DOCKER_REPOSITORY: geosx/ubuntu24.04-gcc13 GCC_VERSION: 13 - SPEC: "~pygeosx +docs %gcc-13" + SPEC: "~pygeosx +docs ~vtk ~trilinos %gcc-13" # First Rocky non-CUDA row re-enabled for incremental validation. - name: Rocky Linux 8 - gcc 13 @@ -50,7 +50,7 @@ jobs: DOCKER_BASE_IMAGE_REPO: geosx/rockylinux DOCKER_REPOSITORY: geosx/rockylinux8-gcc13 GCC_VERSION: 13 - SPEC: "~pygeosx ~docs %gcc-13" + SPEC: "~pygeosx ~docs ~vtk ~trilinos %gcc-13" steps: - name: Checkout diff --git a/docker/rocky-spack.yaml b/docker/rocky-spack.yaml index b8f4d457..e825b2d5 100644 --- a/docker/rocky-spack.yaml +++ b/docker/rocky-spack.yaml @@ -135,8 +135,8 @@ spack: python: buildable: false externals: - - spec: python@3.6.8 - prefix: /usr + - spec: python@3.12 + prefix: /usr/local tar: buildable: false externals: diff --git a/docker/spack.yaml b/docker/spack.yaml index a1917089..b2fed5f6 100644 --- a/docker/spack.yaml +++ b/docker/spack.yaml @@ -270,8 +270,8 @@ spack: python: buildable: false externals: - - spec: python@3.12.3 - prefix: /usr + - spec: python@3.12 + prefix: /usr/local readline: buildable: false externals: From 97924fd01c5aa37d4f5c4bf1e13a3ff31ac1a31d Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Wed, 29 Apr 2026 15:26:43 -0700 Subject: [PATCH 05/29] update to the correct hash --- .github/workflows/docker_build_tpls.yml | 4 ++-- docker/rocky-spack.yaml | 2 +- docker/spack.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker_build_tpls.yml b/.github/workflows/docker_build_tpls.yml index a85e19a2..953533bb 100644 --- a/.github/workflows/docker_build_tpls.yml +++ b/.github/workflows/docker_build_tpls.yml @@ -10,7 +10,7 @@ concurrency: # TPL images build on top of the base images produced by # https://github.com/GEOS-DEV/docker_base_images. env: - DOCKER_BASE_IMAGE_SHA: 47ddae2621f6fc0c2da8bf36305d3fd3730a7db7 + DOCKER_BASE_IMAGE_SHA: 3fd2acfba977cf3369ecec55e27cd35b7258cf31 jobs: build_images: @@ -50,7 +50,7 @@ jobs: DOCKER_BASE_IMAGE_REPO: geosx/rockylinux DOCKER_REPOSITORY: geosx/rockylinux8-gcc13 GCC_VERSION: 13 - SPEC: "~pygeosx ~docs ~vtk ~trilinos %gcc-13" + SPEC: "~pygeosx +docs ~vtk ~trilinos %gcc-13" steps: - name: Checkout diff --git a/docker/rocky-spack.yaml b/docker/rocky-spack.yaml index e825b2d5..600d06a6 100644 --- a/docker/rocky-spack.yaml +++ b/docker/rocky-spack.yaml @@ -136,7 +136,7 @@ spack: buildable: false externals: - spec: python@3.12 - prefix: /usr/local + prefix: /usr tar: buildable: false externals: diff --git a/docker/spack.yaml b/docker/spack.yaml index b2fed5f6..c1f4bec4 100644 --- a/docker/spack.yaml +++ b/docker/spack.yaml @@ -271,7 +271,7 @@ spack: buildable: false externals: - spec: python@3.12 - prefix: /usr/local + prefix: /usr readline: buildable: false externals: From 5da365188dd8c551fb423c9b4974513126a5e446 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Wed, 29 Apr 2026 15:35:16 -0700 Subject: [PATCH 06/29] pip clingo patch --- docker/tpl-rockylinux-clang-cuda-12.Dockerfile | 5 ++++- docker/tpl-rockylinux-gcc-cuda-12.Dockerfile | 5 ++++- docker/tpl-rockylinux.Dockerfile | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docker/tpl-rockylinux-clang-cuda-12.Dockerfile b/docker/tpl-rockylinux-clang-cuda-12.Dockerfile index f5dc00b4..9e738305 100644 --- a/docker/tpl-rockylinux-clang-cuda-12.Dockerfile +++ b/docker/tpl-rockylinux-clang-cuda-12.Dockerfile @@ -33,7 +33,10 @@ RUN dnf clean all && \ python3-virtualenv # Install clingo for Spack -RUN python3 -m pip install --upgrade pip && \ +RUN (python3 -m pip --version >/dev/null 2>&1 || \ + python3 -m ensurepip --upgrade || \ + (dnf -y install python3.12-pip || dnf -y install python3-pip)) && \ + python3 -m pip install --upgrade pip && \ python3 -m pip install clingo RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-cmake.sh diff --git a/docker/tpl-rockylinux-gcc-cuda-12.Dockerfile b/docker/tpl-rockylinux-gcc-cuda-12.Dockerfile index ac0ede2c..5c727a6b 100644 --- a/docker/tpl-rockylinux-gcc-cuda-12.Dockerfile +++ b/docker/tpl-rockylinux-gcc-cuda-12.Dockerfile @@ -31,7 +31,10 @@ RUN dnf clean all && \ python3-virtualenv # Install clingo for Spack -RUN python3 -m pip install --upgrade pip && \ +RUN (python3 -m pip --version >/dev/null 2>&1 || \ + python3 -m ensurepip --upgrade || \ + (dnf -y install python3.12-pip || dnf -y install python3-pip)) && \ + python3 -m pip install --upgrade pip && \ python3 -m pip install clingo # Custom install script for CMake or other tools diff --git a/docker/tpl-rockylinux.Dockerfile b/docker/tpl-rockylinux.Dockerfile index 91a25fc9..c568b2d4 100644 --- a/docker/tpl-rockylinux.Dockerfile +++ b/docker/tpl-rockylinux.Dockerfile @@ -50,7 +50,10 @@ RUN dnf clean all && \ dnf clean all && rm -rf /var/cache/dnf /var/lib/dnf # Install clingo for Spack -RUN python3 -m pip install --upgrade pip && \ +RUN (python3 -m pip --version >/dev/null 2>&1 || \ + python3 -m ensurepip --upgrade || \ + (dnf -y install python3.12-pip || dnf -y install python3-pip)) && \ + python3 -m pip install --upgrade pip && \ python3 -m pip install clingo # Make `mpicc`/`mpicxx` resolve without a `module load` step. From 852de35bebde625c3c8e8b62d4f0b486cf47b3cb Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Wed, 29 Apr 2026 15:47:17 -0700 Subject: [PATCH 07/29] renamed spack.yaml to ubuntu-spack.yaml --- docker/tpl-centos-gcc-cuda.Dockerfile | 2 +- docker/tpl-ubuntu-clang.Dockerfile | 2 +- docker/tpl-ubuntu-gcc.Dockerfile | 2 +- docker/tpl-ubuntu.Dockerfile | 4 ++-- docker/{spack.yaml => ubuntu-spack.yaml} | 0 5 files changed, 5 insertions(+), 5 deletions(-) rename docker/{spack.yaml => ubuntu-spack.yaml} (100%) diff --git a/docker/tpl-centos-gcc-cuda.Dockerfile b/docker/tpl-centos-gcc-cuda.Dockerfile index dbea5b7b..c82daa32 100644 --- a/docker/tpl-centos-gcc-cuda.Dockerfile +++ b/docker/tpl-centos-gcc-cuda.Dockerfile @@ -82,7 +82,7 @@ RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \ ln -s /usr/include/openmpi-x86_64 /usr/lib64/openmpi/include && \ ./scripts/uberenv/uberenv.py \ --spec "%gcc@8+cuda~uncrustify~openmp~pygeosx cuda_arch=86 ^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/ubuntu-spack.yaml \ --project-json=.uberenv_config.json \ --prefix ${GEOSX_TPL_DIR} \ -k && \ diff --git a/docker/tpl-ubuntu-clang.Dockerfile b/docker/tpl-ubuntu-clang.Dockerfile index fe75f418..dc3c9020 100644 --- a/docker/tpl-ubuntu-clang.Dockerfile +++ b/docker/tpl-ubuntu-clang.Dockerfile @@ -92,7 +92,7 @@ RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \ if [ -z "${GEOSX_SPEC}" ] || [ "${GEOSX_SPEC}" = "undefined" ]; then GEOSX_SPEC="~shared~openmp+docs %clang-${CLANG_MAJOR_VERSION} ^caliper~gotcha~sampler~libunwind~libdw~papi"; fi && \ ./scripts/uberenv/uberenv.py \ --spec "${GEOSX_SPEC}" \ - --spack-env-file=${SRC_DIR}/docker/spack.yaml \ + --spack-env-file=${SRC_DIR}/docker/ubuntu-spack.yaml \ --project-json=.uberenv_config.json \ --prefix ${GEOSX_TPL_DIR} \ -k && \ diff --git a/docker/tpl-ubuntu-gcc.Dockerfile b/docker/tpl-ubuntu-gcc.Dockerfile index 70341fb5..52f6cc22 100644 --- a/docker/tpl-ubuntu-gcc.Dockerfile +++ b/docker/tpl-ubuntu-gcc.Dockerfile @@ -115,7 +115,7 @@ RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \ if [ -z "${GEOSX_SPEC}" ] || [ "${GEOSX_SPEC}" = "undefined" ]; then GEOSX_SPEC="~pygeosx +docs %gcc-${GCC_MAJOR_VERSION}"; fi && \ ./scripts/uberenv/uberenv.py \ --spec "${GEOSX_SPEC}" \ - --spack-env-file=${SRC_DIR}/docker/spack.yaml \ + --spack-env-file=${SRC_DIR}/docker/ubuntu-spack.yaml \ --project-json=${SRC_DIR}/.uberenv_config.json \ --prefix ${GEOSX_TPL_DIR} \ -k && \ diff --git a/docker/tpl-ubuntu.Dockerfile b/docker/tpl-ubuntu.Dockerfile index b97ba843..6d7aa602 100644 --- a/docker/tpl-ubuntu.Dockerfile +++ b/docker/tpl-ubuntu.Dockerfile @@ -109,10 +109,10 @@ RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \ echo "ERROR: SPEC build-arg must be supplied" >&2 ; \ exit 1 ; \ fi && \ - GEOSX_SPACK_ENV_FILE=${SRC_DIR}/docker/spack.yaml && \ + GEOSX_SPACK_ENV_FILE=${SRC_DIR}/docker/ubuntu-spack.yaml && \ if echo "${CC:-}" | grep -q "clang"; then \ GEOSX_SPACK_ENV_FILE=/tmp/geosx-spack.yaml && \ - cp ${SRC_DIR}/docker/spack.yaml ${GEOSX_SPACK_ENV_FILE} && \ + cp ${SRC_DIR}/docker/ubuntu-spack.yaml ${GEOSX_SPACK_ENV_FILE} && \ sed -i -E "s/gcc@([0-9]+) languages:='c,c\\+\\+,fortran'/gcc@\\1 languages:='fortran'/g" ${GEOSX_SPACK_ENV_FILE} && \ sed -i -E '/c: \/usr\/bin\/gcc-[0-9]+/d; /cxx: \/usr\/bin\/g\+\+-[0-9]+/d' ${GEOSX_SPACK_ENV_FILE} ; \ fi && \ diff --git a/docker/spack.yaml b/docker/ubuntu-spack.yaml similarity index 100% rename from docker/spack.yaml rename to docker/ubuntu-spack.yaml From de399d10c0828bd956fd9310a9cd2e729b121b9d Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Wed, 29 Apr 2026 16:27:38 -0700 Subject: [PATCH 08/29] move from perl-open to perl --- .github/workflows/docker_build_tpls.yml | 9 +++++++++ docker/tpl-rockylinux.Dockerfile | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker_build_tpls.yml b/.github/workflows/docker_build_tpls.yml index 953533bb..a5e51c8e 100644 --- a/.github/workflows/docker_build_tpls.yml +++ b/.github/workflows/docker_build_tpls.yml @@ -43,6 +43,15 @@ jobs: SPEC: "~pygeosx +docs ~vtk ~trilinos %gcc-13" # First Rocky non-CUDA row re-enabled for incremental validation. + - name: Rocky Linux 8 - gcc 12 + RUNS_ON: ubuntu-latest + TPL_DOCKERFILE: docker/tpl-rockylinux.Dockerfile + DOCKER_BASE_IMAGE_TAG: 8-gcc12 + DOCKER_BASE_IMAGE_REPO: geosx/rockylinux + DOCKER_REPOSITORY: geosx/rockylinux8-gcc12 + GCC_VERSION: 12 + SPEC: "~pygeosx +docs ~vtk ~trilinos %gcc-12" + - name: Rocky Linux 8 - gcc 13 RUNS_ON: ubuntu-latest TPL_DOCKERFILE: docker/tpl-rockylinux.Dockerfile diff --git a/docker/tpl-rockylinux.Dockerfile b/docker/tpl-rockylinux.Dockerfile index c568b2d4..d59c4e27 100644 --- a/docker/tpl-rockylinux.Dockerfile +++ b/docker/tpl-rockylinux.Dockerfile @@ -43,7 +43,7 @@ RUN dnf clean all && \ mpfr-devel \ bzip2 \ gnupg2 \ - perl-open \ + perl \ xz && \ (dnf -y install python3-virtualenv || \ python3 -m pip install --no-cache-dir virtualenv) && \ From 2c0dbe8adb6e4ef3906b8cfbea5f39c4dd54020e Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Wed, 29 Apr 2026 16:46:33 -0700 Subject: [PATCH 09/29] add gcc12 spec to rocky --- docker/rocky-spack.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docker/rocky-spack.yaml b/docker/rocky-spack.yaml index 600d06a6..3ed4e5c2 100644 --- a/docker/rocky-spack.yaml +++ b/docker/rocky-spack.yaml @@ -18,6 +18,17 @@ spack: - ../versions.yaml toolchains: + gcc-12: + - spec: cxxflags='-fPIC -pthread' + - spec: cflags='-fPIC -pthread' + - spec: '%c=gcc@12.2.1' + when: '%c' + - spec: '%cxx=gcc@12.2.1' + when: '%cxx' + - spec: '%fortran=gcc@12.2.1' + when: '%fortran' + - spec: '%openmpi@4.1.1' + when: '%mpi' gcc-13: - spec: cxxflags='-fPIC -pthread' - spec: cflags='-fPIC -pthread' @@ -70,6 +81,13 @@ spack: cxx: /usr/local/bin/clang++-gcc13 gcc: externals: + - spec: gcc@12.2.1 languages:='c,c++,fortran' + prefix: /opt/rh/gcc-toolset-12/root/usr + extra_attributes: + compilers: + c: /opt/rh/gcc-toolset-12/root/usr/bin/gcc + cxx: /opt/rh/gcc-toolset-12/root/usr/bin/g++ + fortran: /opt/rh/gcc-toolset-12/root/usr/bin/gfortran - spec: gcc@13.3.1 languages:='c,c++,fortran' prefix: /opt/rh/gcc-toolset-13/root/usr extra_attributes: From f99304cb235370403f1275547bb90ab482f15def Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Wed, 29 Apr 2026 18:15:21 -0700 Subject: [PATCH 10/29] add clang builds --- .github/workflows/docker_build_tpls.yml | 36 +++++++++++++++++++ docker/rocky-spack.yaml | 48 +++++++++++++++++++++++++ 2 files changed, 84 insertions(+) diff --git a/.github/workflows/docker_build_tpls.yml b/.github/workflows/docker_build_tpls.yml index a5e51c8e..fcc2bb70 100644 --- a/.github/workflows/docker_build_tpls.yml +++ b/.github/workflows/docker_build_tpls.yml @@ -42,6 +42,24 @@ jobs: GCC_VERSION: 13 SPEC: "~pygeosx +docs ~vtk ~trilinos %gcc-13" + - name: Ubuntu 24.04 - clang 19 + RUNS_ON: ubuntu-latest + TPL_DOCKERFILE: docker/tpl-ubuntu.Dockerfile + DOCKER_BASE_IMAGE_TAG: 24.04-clang19 + DOCKER_BASE_IMAGE_REPO: geosx/ubuntu + DOCKER_REPOSITORY: geosx/ubuntu24.04-clang19 + CLANG_VERSION: 19 + SPEC: "~pygeosx +docs ~vtk ~trilinos %clang-19" + + - name: Ubuntu 24.04 - clang 20 + RUNS_ON: ubuntu-latest + TPL_DOCKERFILE: docker/tpl-ubuntu.Dockerfile + DOCKER_BASE_IMAGE_TAG: 24.04-clang20 + DOCKER_BASE_IMAGE_REPO: geosx/ubuntu + DOCKER_REPOSITORY: geosx/ubuntu24.04-clang20 + CLANG_VERSION: 20 + SPEC: "~pygeosx +docs ~vtk ~trilinos %clang-20" + # First Rocky non-CUDA row re-enabled for incremental validation. - name: Rocky Linux 8 - gcc 12 RUNS_ON: ubuntu-latest @@ -61,6 +79,24 @@ jobs: GCC_VERSION: 13 SPEC: "~pygeosx +docs ~vtk ~trilinos %gcc-13" + - name: Rocky Linux 8 - clang 19 + RUNS_ON: ubuntu-latest + TPL_DOCKERFILE: docker/tpl-rockylinux.Dockerfile + DOCKER_BASE_IMAGE_TAG: 8-clang19 + DOCKER_BASE_IMAGE_REPO: geosx/rockylinux + DOCKER_REPOSITORY: geosx/rockylinux8-clang19 + CLANG_VERSION: 19 + SPEC: "~pygeosx +docs ~vtk ~trilinos %clang-19" + + - name: Rocky Linux 9 - clang 22 + RUNS_ON: ubuntu-latest + TPL_DOCKERFILE: docker/tpl-rockylinux.Dockerfile + DOCKER_BASE_IMAGE_TAG: 9-clang22 + DOCKER_BASE_IMAGE_REPO: geosx/rockylinux + DOCKER_REPOSITORY: geosx/rockylinux9-clang22 + CLANG_VERSION: 22 + SPEC: "~pygeosx +docs ~vtk ~trilinos %clang-22" + steps: - name: Checkout uses: actions/checkout@v6 diff --git a/docker/rocky-spack.yaml b/docker/rocky-spack.yaml index 3ed4e5c2..5c7bddb9 100644 --- a/docker/rocky-spack.yaml +++ b/docker/rocky-spack.yaml @@ -51,6 +51,28 @@ spack: when: '%fortran' - spec: '%openmpi@4.1.1' when: '%mpi' + clang-19: + - spec: cxxflags='-fPIC -pthread' + - spec: cflags='-fPIC -pthread' + - spec: '%[virtuals=c]llvm@19+clang~flang~lld~lldb' + when: '%c' + - spec: '%[virtuals=cxx]llvm@19+clang~flang~lld~lldb' + when: '%cxx' + - spec: '%[virtuals=fortran]gcc@8' + when: '%fortran' + - spec: '%openmpi@4.1.1' + when: '%mpi' + clang-22: + - spec: cxxflags='-fPIC -pthread' + - spec: cflags='-fPIC -pthread' + - spec: '%[virtuals=c]llvm@22+clang~flang~lld~lldb' + when: '%c' + - spec: '%[virtuals=cxx]llvm@22+clang~flang~lld~lldb' + when: '%cxx' + - spec: '%[virtuals=fortran]gcc@11' + when: '%fortran' + - spec: '%openmpi@4.1.1' + when: '%mpi' packages: all: @@ -79,8 +101,34 @@ spack: # doesn't accidentally pick GCC 8 headers when compiling CUDA sources. c: /usr/local/bin/clang-gcc13 cxx: /usr/local/bin/clang++-gcc13 + - spec: llvm@19+clang~flang~lld~lldb + prefix: /usr + extra_attributes: + compilers: + c: /usr/bin/clang + cxx: /usr/bin/clang++ + - spec: llvm@22+clang~flang~lld~lldb + prefix: /usr + extra_attributes: + compilers: + c: /usr/bin/clang + cxx: /usr/bin/clang++ gcc: externals: + - spec: gcc@8 languages:='c,c++,fortran' + prefix: /usr + extra_attributes: + compilers: + c: /usr/bin/gcc + cxx: /usr/bin/g++ + fortran: /usr/bin/gfortran + - spec: gcc@11 languages:='c,c++,fortran' + prefix: /usr + extra_attributes: + compilers: + c: /usr/bin/gcc + cxx: /usr/bin/g++ + fortran: /usr/bin/gfortran - spec: gcc@12.2.1 languages:='c,c++,fortran' prefix: /opt/rh/gcc-toolset-12/root/usr extra_attributes: From 3a2048b47a1eee8dd7153503e4ebd5b3a024d71b Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Wed, 29 Apr 2026 23:15:07 -0700 Subject: [PATCH 11/29] add libtool --- docker/tpl-ubuntu.Dockerfile | 2 ++ docker/ubuntu-spack.yaml | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/docker/tpl-ubuntu.Dockerfile b/docker/tpl-ubuntu.Dockerfile index 6d7aa602..625d373d 100644 --- a/docker/tpl-ubuntu.Dockerfile +++ b/docker/tpl-ubuntu.Dockerfile @@ -97,6 +97,8 @@ RUN apt-get update && \ git \ autoconf \ automake \ + libtool \ + libtool-bin \ m4 && \ apt-get clean && rm -rf /var/lib/apt/lists/* diff --git a/docker/ubuntu-spack.yaml b/docker/ubuntu-spack.yaml index c1f4bec4..5465f41a 100644 --- a/docker/ubuntu-spack.yaml +++ b/docker/ubuntu-spack.yaml @@ -194,6 +194,12 @@ spack: externals: - spec: automake@1.16.5 prefix: /usr + libtool: + version: [2.4.7] + buildable: false + externals: + - spec: libtool@2.4.7 + prefix: /usr cmake: version: [3.31.9] buildable: false From b43a221b259f73c491894ac5ec19a4ebd66acc6f Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Thu, 30 Apr 2026 00:13:52 -0700 Subject: [PATCH 12/29] some potential fixes for ubuntu clang --- docker/tpl-ubuntu.Dockerfile | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/docker/tpl-ubuntu.Dockerfile b/docker/tpl-ubuntu.Dockerfile index 625d373d..868490bd 100644 --- a/docker/tpl-ubuntu.Dockerfile +++ b/docker/tpl-ubuntu.Dockerfile @@ -20,6 +20,7 @@ ARG BLD_DIR=$TMP_DIR/build ARG DOCKER_BASE_IMAGE=ubuntu:24.04 FROM ${DOCKER_BASE_IMAGE} AS tpl_toolchain_intersect_geosx_toolchain ARG SRC_DIR +ARG CLANG_VERSION # Install directory provided as a docker build argument; forwarded via ENV # (GEOSX_TPL_DIR is part of the image contract consumed by GEOS). @@ -66,10 +67,28 @@ ENV MPICC=/usr/bin/mpicc \ ENV OMPI_CC=${CC} \ OMPI_CXX=${CXX} -# Ubuntu OpenMPI defaults wrappers to gcc/g++. For clang-based base images we -# retarget the wrappers to clang/clang++ so mpi wrapper compilers are aligned -# with the image toolchain contract. +# For clang-based base images: +# 1) install a matching OpenMP runtime (libomp) +# 2) retarget OpenMPI wrappers to clang/clang++ RUN if echo "${CC}" | grep -q "clang"; then \ + CLANG_MAJOR="${CLANG_VERSION:-}" ; \ + if [ -z "${CLANG_MAJOR}" ]; then \ + CLANG_MAJOR="$(echo "${CC:-}" | sed -nE 's|.*clang-([0-9]+).*|\\1|p')" ; \ + fi ; \ + if [ -z "${CLANG_MAJOR}" ] && command -v clang >/dev/null 2>&1; then \ + CLANG_MAJOR="$(clang --version | sed -nE '1s/.*version ([0-9]+).*/\\1/p')" ; \ + fi ; \ + apt-get update ; \ + if [ -n "${CLANG_MAJOR}" ]; then \ + DEBIAN_FRONTEND=noninteractive TZ=America/Los_Angeles \ + apt-get install -y --no-install-recommends "libomp-${CLANG_MAJOR}-dev" || \ + (apt-get update && DEBIAN_FRONTEND=noninteractive TZ=America/Los_Angeles \ + apt-get install -y --no-install-recommends libomp-dev) ; \ + else \ + DEBIAN_FRONTEND=noninteractive TZ=America/Los_Angeles \ + apt-get install -y --no-install-recommends libomp-dev ; \ + fi ; \ + apt-get clean && rm -rf /var/lib/apt/lists/* && \ for f in /usr/share/openmpi/mpicc-wrapper-data.txt /usr/share/openmpi/mpicc.openmpi-wrapper-data.txt; do \ if [ -f "${f}" ]; then sed -i "s|^compiler=.*$|compiler=${CC}|" "${f}" ; fi ; \ done && \ From c96e5fd4c99c3ac2a72a0b92150ecb5dc8332754 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Thu, 30 Apr 2026 09:00:03 -0700 Subject: [PATCH 13/29] enforce python3 pip --- docker/tpl-rockylinux.Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docker/tpl-rockylinux.Dockerfile b/docker/tpl-rockylinux.Dockerfile index d59c4e27..64635f86 100644 --- a/docker/tpl-rockylinux.Dockerfile +++ b/docker/tpl-rockylinux.Dockerfile @@ -46,15 +46,15 @@ RUN dnf clean all && \ perl \ xz && \ (dnf -y install python3-virtualenv || \ - python3 -m pip install --no-cache-dir virtualenv) && \ + /usr/bin/python3 -m pip install --no-cache-dir virtualenv) && \ dnf clean all && rm -rf /var/cache/dnf /var/lib/dnf # Install clingo for Spack -RUN (python3 -m pip --version >/dev/null 2>&1 || \ - python3 -m ensurepip --upgrade || \ +RUN (/usr/bin/python3 -m pip --version >/dev/null 2>&1 || \ + /usr/bin/python3 -m ensurepip --upgrade || \ (dnf -y install python3.12-pip || dnf -y install python3-pip)) && \ - python3 -m pip install --upgrade pip && \ - python3 -m pip install clingo + /usr/bin/python3 -m pip install --upgrade pip && \ + /usr/bin/python3 -m pip install clingo # Make `mpicc`/`mpicxx` resolve without a `module load` step. ENV PATH="/usr/lib64/openmpi/bin:${PATH}" \ From e18b6ded67031bd8b4778949948572116f4e1437 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Thu, 30 Apr 2026 11:13:05 -0700 Subject: [PATCH 14/29] use updated base images with correct gfortran for clang --- .github/workflows/docker_build_tpls.yml | 2 +- docker/rocky-spack.yaml | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker_build_tpls.yml b/.github/workflows/docker_build_tpls.yml index fcc2bb70..4ae26474 100644 --- a/.github/workflows/docker_build_tpls.yml +++ b/.github/workflows/docker_build_tpls.yml @@ -10,7 +10,7 @@ concurrency: # TPL images build on top of the base images produced by # https://github.com/GEOS-DEV/docker_base_images. env: - DOCKER_BASE_IMAGE_SHA: 3fd2acfba977cf3369ecec55e27cd35b7258cf31 + DOCKER_BASE_IMAGE_SHA: 1c3c049b3f629d9d44838656fd306b2a0c04c9e8 jobs: build_images: diff --git a/docker/rocky-spack.yaml b/docker/rocky-spack.yaml index 5c7bddb9..dfb4129f 100644 --- a/docker/rocky-spack.yaml +++ b/docker/rocky-spack.yaml @@ -58,7 +58,7 @@ spack: when: '%c' - spec: '%[virtuals=cxx]llvm@19+clang~flang~lld~lldb' when: '%cxx' - - spec: '%[virtuals=fortran]gcc@8' + - spec: '%[virtuals=fortran]gcc@14.2.1' when: '%fortran' - spec: '%openmpi@4.1.1' when: '%mpi' @@ -69,7 +69,7 @@ spack: when: '%c' - spec: '%[virtuals=cxx]llvm@22+clang~flang~lld~lldb' when: '%cxx' - - spec: '%[virtuals=fortran]gcc@11' + - spec: '%[virtuals=fortran]gcc@15.2.1' when: '%fortran' - spec: '%openmpi@4.1.1' when: '%mpi' @@ -143,6 +143,20 @@ spack: c: /opt/rh/gcc-toolset-13/root/usr/bin/gcc cxx: /opt/rh/gcc-toolset-13/root/usr/bin/g++ fortran: /opt/rh/gcc-toolset-13/root/usr/bin/gfortran + - spec: gcc@14.2.1 languages:='c,c++,fortran' + prefix: /opt/rh/gcc-toolset-14/root/usr + extra_attributes: + compilers: + c: /opt/rh/gcc-toolset-14/root/usr/bin/gcc + cxx: /opt/rh/gcc-toolset-14/root/usr/bin/g++ + fortran: /opt/rh/gcc-toolset-14/root/usr/bin/gfortran + - spec: gcc@15.2.1 languages:='c,c++,fortran' + prefix: /opt/rh/gcc-toolset-15/root/usr + extra_attributes: + compilers: + c: /opt/rh/gcc-toolset-15/root/usr/bin/gcc + cxx: /opt/rh/gcc-toolset-15/root/usr/bin/g++ + fortran: /opt/rh/gcc-toolset-15/root/usr/bin/gfortran autoconf: version: [2.71] From 801ce1b436bea181d8941c7742b13b867f4f9ac4 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Thu, 30 Apr 2026 16:14:13 -0700 Subject: [PATCH 15/29] disable docs for all builds that are not the docs build --- .github/workflows/docker_build_tpls.yml | 16 +++++----- docker/rocky-spack.yaml | 2 ++ docker/tpl-rockylinux.Dockerfile | 40 +++++++++++++++++++++---- docker/tpl-ubuntu.Dockerfile | 1 - docker/ubuntu-spack.yaml | 2 ++ docker/ubuntu20-clang-cuda-spack.yaml | 2 ++ 6 files changed, 48 insertions(+), 15 deletions(-) diff --git a/.github/workflows/docker_build_tpls.yml b/.github/workflows/docker_build_tpls.yml index 4ae26474..04f43b9c 100644 --- a/.github/workflows/docker_build_tpls.yml +++ b/.github/workflows/docker_build_tpls.yml @@ -31,9 +31,9 @@ jobs: DOCKER_BASE_IMAGE_REPO: geosx/ubuntu DOCKER_REPOSITORY: geosx/ubuntu24.04-gcc12 GCC_VERSION: 12 - SPEC: "~pygeosx +docs ~vtk ~trilinos %gcc-12" + SPEC: "~pygeosx ~docs ~vtk ~trilinos %gcc-12" - - name: Ubuntu 24.04 - gcc 13 + - name: Ubuntu 24.04 - gcc 13 (docs canary) RUNS_ON: ubuntu-latest TPL_DOCKERFILE: docker/tpl-ubuntu.Dockerfile DOCKER_BASE_IMAGE_TAG: 24.04-gcc13 @@ -49,7 +49,7 @@ jobs: DOCKER_BASE_IMAGE_REPO: geosx/ubuntu DOCKER_REPOSITORY: geosx/ubuntu24.04-clang19 CLANG_VERSION: 19 - SPEC: "~pygeosx +docs ~vtk ~trilinos %clang-19" + SPEC: "~pygeosx ~docs ~vtk ~trilinos %clang-19" - name: Ubuntu 24.04 - clang 20 RUNS_ON: ubuntu-latest @@ -58,7 +58,7 @@ jobs: DOCKER_BASE_IMAGE_REPO: geosx/ubuntu DOCKER_REPOSITORY: geosx/ubuntu24.04-clang20 CLANG_VERSION: 20 - SPEC: "~pygeosx +docs ~vtk ~trilinos %clang-20" + SPEC: "~pygeosx ~docs ~vtk ~trilinos %clang-20" # First Rocky non-CUDA row re-enabled for incremental validation. - name: Rocky Linux 8 - gcc 12 @@ -68,7 +68,7 @@ jobs: DOCKER_BASE_IMAGE_REPO: geosx/rockylinux DOCKER_REPOSITORY: geosx/rockylinux8-gcc12 GCC_VERSION: 12 - SPEC: "~pygeosx +docs ~vtk ~trilinos %gcc-12" + SPEC: "~pygeosx ~docs ~vtk ~trilinos %gcc-12" - name: Rocky Linux 8 - gcc 13 RUNS_ON: ubuntu-latest @@ -77,7 +77,7 @@ jobs: DOCKER_BASE_IMAGE_REPO: geosx/rockylinux DOCKER_REPOSITORY: geosx/rockylinux8-gcc13 GCC_VERSION: 13 - SPEC: "~pygeosx +docs ~vtk ~trilinos %gcc-13" + SPEC: "~pygeosx ~docs ~vtk ~trilinos %gcc-13" - name: Rocky Linux 8 - clang 19 RUNS_ON: ubuntu-latest @@ -86,7 +86,7 @@ jobs: DOCKER_BASE_IMAGE_REPO: geosx/rockylinux DOCKER_REPOSITORY: geosx/rockylinux8-clang19 CLANG_VERSION: 19 - SPEC: "~pygeosx +docs ~vtk ~trilinos %clang-19" + SPEC: "~pygeosx ~docs ~vtk ~trilinos %clang-19" - name: Rocky Linux 9 - clang 22 RUNS_ON: ubuntu-latest @@ -95,7 +95,7 @@ jobs: DOCKER_BASE_IMAGE_REPO: geosx/rockylinux DOCKER_REPOSITORY: geosx/rockylinux9-clang22 CLANG_VERSION: 22 - SPEC: "~pygeosx +docs ~vtk ~trilinos %clang-22" + SPEC: "~pygeosx ~docs ~vtk ~trilinos %clang-22" steps: - name: Checkout diff --git a/docker/rocky-spack.yaml b/docker/rocky-spack.yaml index dfb4129f..8af92a78 100644 --- a/docker/rocky-spack.yaml +++ b/docker/rocky-spack.yaml @@ -92,6 +92,7 @@ spack: - "netlib-lapack" llvm: + buildable: false externals: - spec: llvm@17.0.6+clang~flang~lld~lldb prefix: /usr @@ -114,6 +115,7 @@ spack: c: /usr/bin/clang cxx: /usr/bin/clang++ gcc: + buildable: false externals: - spec: gcc@8 languages:='c,c++,fortran' prefix: /usr diff --git a/docker/tpl-rockylinux.Dockerfile b/docker/tpl-rockylinux.Dockerfile index 64635f86..7ca3f904 100644 --- a/docker/tpl-rockylinux.Dockerfile +++ b/docker/tpl-rockylinux.Dockerfile @@ -35,7 +35,6 @@ RUN dnf clean all && \ which \ zlib-devel \ tbb \ - doxygen \ openmpi \ openmpi-devel \ python3-pip \ @@ -110,9 +109,9 @@ RUN dnf -y install \ # tag depends on the compiler+version baked into the base image. # # GCC toolset rows wrap the build in `scl enable gcc-toolset-${GCC_VERSION}` so -# direct compiler invocations resolve to that toolset. Clang rows do not enable -# the GCC toolset; their generated Spack config leaves GCC available only as -# the explicit Fortran compiler. +# direct compiler invocations resolve to that toolset. Clang rows filter the +# shared Rocky Spack config to the clang/GCC toolset externals present in the +# selected base image. RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \ mkdir -p ${GEOSX_TPL_DIR} && \ GEOSX_SPEC="${SPEC}" && \ @@ -124,8 +123,37 @@ RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \ if echo "${CC:-}" | grep -q "clang"; then \ GEOSX_SPACK_ENV_FILE=/tmp/geosx-rocky-spack.yaml && \ cp ${SRC_DIR}/docker/rocky-spack.yaml ${GEOSX_SPACK_ENV_FILE} && \ - sed -i -E "s/gcc@([0-9]+) languages:='c,c\\+\\+,fortran'/gcc@\\1 languages:='fortran'/g" ${GEOSX_SPACK_ENV_FILE} && \ - sed -i -E '/c: \/opt\/rh\/gcc-toolset-[0-9]+\/root\/usr\/bin\/gcc$/d; /cxx: \/opt\/rh\/gcc-toolset-[0-9]+\/root\/usr\/bin\/g\+\+$/d' ${GEOSX_SPACK_ENV_FILE} ; \ + CLANG_MAJOR="$(${CC} --version | sed -nE '1s/.*version ([0-9]+).*/\1/p')" && \ + printf '%s\n' \ + 'import os' \ + 'import re' \ + 'import sys' \ + 'path, clang_major = sys.argv[1], sys.argv[2]' \ + 'lines = open(path, encoding="utf-8").read().splitlines(keepends=True)' \ + 'out = []' \ + 'i = 0' \ + 'while i < len(lines):' \ + ' line = lines[i]' \ + ' if re.match(r"^ - spec: (gcc|llvm)@", line):' \ + ' block = [line]' \ + ' i += 1' \ + ' while i < len(lines) and not re.match(r"^( - spec: | [A-Za-z0-9_-]+:)", lines[i]):' \ + ' block.append(lines[i])' \ + ' i += 1' \ + ' text = "".join(block)' \ + ' llvm_match = re.search(r"- spec: llvm@([0-9]+)", text)' \ + ' gcc_prefix = re.search(r"prefix: (/opt/rh/gcc-toolset-[0-9]+/root/usr)", text)' \ + ' if llvm_match and llvm_match.group(1) != clang_major:' \ + ' continue' \ + ' if gcc_prefix and not os.path.isdir(gcc_prefix.group(1)):' \ + ' continue' \ + ' out.extend(block)' \ + ' continue' \ + ' out.append(line)' \ + ' i += 1' \ + 'open(path, "w", encoding="utf-8").writelines(out)' \ + > /tmp/filter-rocky-spack.py && \ + /usr/bin/python3 /tmp/filter-rocky-spack.py "${GEOSX_SPACK_ENV_FILE}" "${CLANG_MAJOR}" ; \ fi && \ if [ -n "${GCC_VERSION}" ] && [ -d "/opt/rh/gcc-toolset-${GCC_VERSION}" ] && ! echo "${CC:-}" | grep -q "clang"; then \ scl enable "gcc-toolset-${GCC_VERSION}" " \ diff --git a/docker/tpl-ubuntu.Dockerfile b/docker/tpl-ubuntu.Dockerfile index 868490bd..5d834cb1 100644 --- a/docker/tpl-ubuntu.Dockerfile +++ b/docker/tpl-ubuntu.Dockerfile @@ -38,7 +38,6 @@ RUN apt-get update && \ libtbb12 \ libgfortran5 \ zlib1g-dev \ - doxygen \ openmpi-bin \ libopenmpi-dev \ python3 \ diff --git a/docker/ubuntu-spack.yaml b/docker/ubuntu-spack.yaml index 5465f41a..e27514bf 100644 --- a/docker/ubuntu-spack.yaml +++ b/docker/ubuntu-spack.yaml @@ -124,6 +124,7 @@ spack: # ---- Compilers (point at the actual binaries in /usr/bin) ---- llvm: + buildable: false externals: - spec: llvm@19+clang~flang~lld~lldb prefix: /usr @@ -145,6 +146,7 @@ spack: cxx: /usr/bin/clang++-22 gcc: + buildable: false externals: - spec: gcc@12 languages:='c,c++,fortran' prefix: /usr diff --git a/docker/ubuntu20-clang-cuda-spack.yaml b/docker/ubuntu20-clang-cuda-spack.yaml index 29d26056..1b958437 100644 --- a/docker/ubuntu20-clang-cuda-spack.yaml +++ b/docker/ubuntu20-clang-cuda-spack.yaml @@ -50,6 +50,7 @@ spack: - "netlib-lapack" llvm: + buildable: false externals: - spec: llvm@10.0.0+clang~flang~lld~lldb openmp=project prefix: /usr @@ -59,6 +60,7 @@ spack: cxx: /usr/bin/clang++ gcc: + buildable: false externals: - spec: gcc@9.4.0 languages:='c,c++,fortran' prefix: /usr From 8ba7ae24c8b8085f14e491d42260e4cf37da93f3 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Thu, 30 Apr 2026 16:44:57 -0700 Subject: [PATCH 16/29] avoid filters --- .github/workflows/docker_build_tpls.yml | 4 -- docker/tpl-rockylinux.Dockerfile | 67 +++++++++---------------- 2 files changed, 24 insertions(+), 47 deletions(-) diff --git a/.github/workflows/docker_build_tpls.yml b/.github/workflows/docker_build_tpls.yml index 04f43b9c..98b2a8af 100644 --- a/.github/workflows/docker_build_tpls.yml +++ b/.github/workflows/docker_build_tpls.yml @@ -67,7 +67,6 @@ jobs: DOCKER_BASE_IMAGE_TAG: 8-gcc12 DOCKER_BASE_IMAGE_REPO: geosx/rockylinux DOCKER_REPOSITORY: geosx/rockylinux8-gcc12 - GCC_VERSION: 12 SPEC: "~pygeosx ~docs ~vtk ~trilinos %gcc-12" - name: Rocky Linux 8 - gcc 13 @@ -76,7 +75,6 @@ jobs: DOCKER_BASE_IMAGE_TAG: 8-gcc13 DOCKER_BASE_IMAGE_REPO: geosx/rockylinux DOCKER_REPOSITORY: geosx/rockylinux8-gcc13 - GCC_VERSION: 13 SPEC: "~pygeosx ~docs ~vtk ~trilinos %gcc-13" - name: Rocky Linux 8 - clang 19 @@ -85,7 +83,6 @@ jobs: DOCKER_BASE_IMAGE_TAG: 8-clang19 DOCKER_BASE_IMAGE_REPO: geosx/rockylinux DOCKER_REPOSITORY: geosx/rockylinux8-clang19 - CLANG_VERSION: 19 SPEC: "~pygeosx ~docs ~vtk ~trilinos %clang-19" - name: Rocky Linux 9 - clang 22 @@ -94,7 +91,6 @@ jobs: DOCKER_BASE_IMAGE_TAG: 9-clang22 DOCKER_BASE_IMAGE_REPO: geosx/rockylinux DOCKER_REPOSITORY: geosx/rockylinux9-clang22 - CLANG_VERSION: 22 SPEC: "~pygeosx ~docs ~vtk ~trilinos %clang-22" steps: diff --git a/docker/tpl-rockylinux.Dockerfile b/docker/tpl-rockylinux.Dockerfile index 7ca3f904..82c0c358 100644 --- a/docker/tpl-rockylinux.Dockerfile +++ b/docker/tpl-rockylinux.Dockerfile @@ -20,8 +20,6 @@ ARG SRC_DIR ARG INSTALL_DIR ENV GEOSX_TPL_DIR=$INSTALL_DIR -ARG GCC_VERSION - # Packages needed both for the TPL build and for the downstream GEOS build. # Some Rocky 8 vs 9 differences are handled by the base image already # (curl vs curl-minimal, etc.); here we only add things the base images @@ -108,10 +106,9 @@ RUN dnf -y install \ # Run uberenv. The SPEC is supplied by the matrix because the spack toolchain # tag depends on the compiler+version baked into the base image. # -# GCC toolset rows wrap the build in `scl enable gcc-toolset-${GCC_VERSION}` so -# direct compiler invocations resolve to that toolset. Clang rows filter the -# shared Rocky Spack config to the clang/GCC toolset externals present in the -# selected base image. +# The matrix selects exactly one compiler toolchain through SPEC. Validate the +# expected external compiler paths before Spack starts so missing compilers fail +# directly instead of being discovered or built by Spack. RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \ mkdir -p ${GEOSX_TPL_DIR} && \ GEOSX_SPEC="${SPEC}" && \ @@ -120,43 +117,27 @@ RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \ exit 1 ; \ fi && \ GEOSX_SPACK_ENV_FILE=${SRC_DIR}/docker/rocky-spack.yaml && \ - if echo "${CC:-}" | grep -q "clang"; then \ - GEOSX_SPACK_ENV_FILE=/tmp/geosx-rocky-spack.yaml && \ - cp ${SRC_DIR}/docker/rocky-spack.yaml ${GEOSX_SPACK_ENV_FILE} && \ - CLANG_MAJOR="$(${CC} --version | sed -nE '1s/.*version ([0-9]+).*/\1/p')" && \ - printf '%s\n' \ - 'import os' \ - 'import re' \ - 'import sys' \ - 'path, clang_major = sys.argv[1], sys.argv[2]' \ - 'lines = open(path, encoding="utf-8").read().splitlines(keepends=True)' \ - 'out = []' \ - 'i = 0' \ - 'while i < len(lines):' \ - ' line = lines[i]' \ - ' if re.match(r"^ - spec: (gcc|llvm)@", line):' \ - ' block = [line]' \ - ' i += 1' \ - ' while i < len(lines) and not re.match(r"^( - spec: | [A-Za-z0-9_-]+:)", lines[i]):' \ - ' block.append(lines[i])' \ - ' i += 1' \ - ' text = "".join(block)' \ - ' llvm_match = re.search(r"- spec: llvm@([0-9]+)", text)' \ - ' gcc_prefix = re.search(r"prefix: (/opt/rh/gcc-toolset-[0-9]+/root/usr)", text)' \ - ' if llvm_match and llvm_match.group(1) != clang_major:' \ - ' continue' \ - ' if gcc_prefix and not os.path.isdir(gcc_prefix.group(1)):' \ - ' continue' \ - ' out.extend(block)' \ - ' continue' \ - ' out.append(line)' \ - ' i += 1' \ - 'open(path, "w", encoding="utf-8").writelines(out)' \ - > /tmp/filter-rocky-spack.py && \ - /usr/bin/python3 /tmp/filter-rocky-spack.py "${GEOSX_SPACK_ENV_FILE}" "${CLANG_MAJOR}" ; \ - fi && \ - if [ -n "${GCC_VERSION}" ] && [ -d "/opt/rh/gcc-toolset-${GCC_VERSION}" ] && ! echo "${CC:-}" | grep -q "clang"; then \ - scl enable "gcc-toolset-${GCC_VERSION}" " \ + require_exe() { for exe in "$@"; do if [ ! -x "${exe}" ]; then echo "ERROR: required compiler path is missing or not executable: ${exe}" >&2 ; exit 1 ; fi ; done ; } && \ + ROCKY_GCC_TOOLSET="" && \ + case "${GEOSX_SPEC}" in \ + *"%gcc-12"*) \ + ROCKY_GCC_TOOLSET=12 ; \ + require_exe /opt/rh/gcc-toolset-12/root/usr/bin/gcc /opt/rh/gcc-toolset-12/root/usr/bin/g++ /opt/rh/gcc-toolset-12/root/usr/bin/gfortran ;; \ + *"%gcc-13"*) \ + ROCKY_GCC_TOOLSET=13 ; \ + require_exe /opt/rh/gcc-toolset-13/root/usr/bin/gcc /opt/rh/gcc-toolset-13/root/usr/bin/g++ /opt/rh/gcc-toolset-13/root/usr/bin/gfortran ;; \ + *"%clang-17"*) \ + require_exe /usr/local/bin/clang-gcc13 /usr/local/bin/clang++-gcc13 /opt/rh/gcc-toolset-13/root/usr/bin/gcc /opt/rh/gcc-toolset-13/root/usr/bin/g++ /opt/rh/gcc-toolset-13/root/usr/bin/gfortran ;; \ + *"%clang-19"*) \ + require_exe /usr/bin/clang /usr/bin/clang++ /opt/rh/gcc-toolset-14/root/usr/bin/gcc /opt/rh/gcc-toolset-14/root/usr/bin/g++ /opt/rh/gcc-toolset-14/root/usr/bin/gfortran ;; \ + *"%clang-22"*) \ + require_exe /usr/bin/clang /usr/bin/clang++ /opt/rh/gcc-toolset-15/root/usr/bin/gcc /opt/rh/gcc-toolset-15/root/usr/bin/g++ /opt/rh/gcc-toolset-15/root/usr/bin/gfortran ;; \ + *) \ + echo "ERROR: unsupported Rocky compiler selector in SPEC: ${GEOSX_SPEC}" >&2 ; \ + exit 1 ;; \ + esac && \ + if [ -n "${ROCKY_GCC_TOOLSET}" ]; then \ + scl enable "gcc-toolset-${ROCKY_GCC_TOOLSET}" " \ ./scripts/uberenv/uberenv.py \ --spec '${GEOSX_SPEC}' \ --spack-env-file=${GEOSX_SPACK_ENV_FILE} \ From 423816a6e9393be6f6c636b8e7c197df0a27ea1f Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Thu, 30 Apr 2026 18:38:01 -0700 Subject: [PATCH 17/29] trim redundant packages --- .github/workflows/docker_build_tpls.yml | 8 ++++---- docker/tpl-rockylinux.Dockerfile | 6 +----- docker/tpl-ubuntu.Dockerfile | 6 ------ 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/docker_build_tpls.yml b/.github/workflows/docker_build_tpls.yml index 98b2a8af..821217de 100644 --- a/.github/workflows/docker_build_tpls.yml +++ b/.github/workflows/docker_build_tpls.yml @@ -78,7 +78,7 @@ jobs: SPEC: "~pygeosx ~docs ~vtk ~trilinos %gcc-13" - name: Rocky Linux 8 - clang 19 - RUNS_ON: ubuntu-latest + RUNS_ON: streak2 TPL_DOCKERFILE: docker/tpl-rockylinux.Dockerfile DOCKER_BASE_IMAGE_TAG: 8-clang19 DOCKER_BASE_IMAGE_REPO: geosx/rockylinux @@ -86,7 +86,7 @@ jobs: SPEC: "~pygeosx ~docs ~vtk ~trilinos %clang-19" - name: Rocky Linux 9 - clang 22 - RUNS_ON: ubuntu-latest + RUNS_ON: streak2 TPL_DOCKERFILE: docker/tpl-rockylinux.Dockerfile DOCKER_BASE_IMAGE_TAG: 9-clang22 DOCKER_BASE_IMAGE_REPO: geosx/rockylinux @@ -101,7 +101,7 @@ jobs: lfs: true - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 - name: Print environment run: printenv @@ -133,7 +133,7 @@ jobs: run: bash -x ./scripts/docker-build.sh - name: Login to DockerHub - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} diff --git a/docker/tpl-rockylinux.Dockerfile b/docker/tpl-rockylinux.Dockerfile index 82c0c358..e893988d 100644 --- a/docker/tpl-rockylinux.Dockerfile +++ b/docker/tpl-rockylinux.Dockerfile @@ -166,12 +166,8 @@ COPY --from=tpl_toolchain /spack-generated.cmake / RUN dnf -y install \ openssh-clients \ ca-certificates \ - curl \ - python3 \ - texlive \ graphviz \ - ninja-build \ - git && \ + ninja-build && \ dnf clean all && rm -rf /var/cache/dnf /var/lib/dnf && \ if [ -d /usr/include/openmpi-x86_64 ] && [ ! -e /usr/lib64/openmpi/include ]; then \ mkdir -p /usr/lib64/openmpi && \ diff --git a/docker/tpl-ubuntu.Dockerfile b/docker/tpl-ubuntu.Dockerfile index 5d834cb1..367092a3 100644 --- a/docker/tpl-ubuntu.Dockerfile +++ b/docker/tpl-ubuntu.Dockerfile @@ -34,13 +34,11 @@ RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive TZ=America/Los_Angeles \ apt-get install -y --no-install-recommends \ ca-certificates \ - curl \ libtbb12 \ libgfortran5 \ zlib1g-dev \ openmpi-bin \ libopenmpi-dev \ - python3 \ python3-pip \ python3-sphinx \ python3-dev \ @@ -108,7 +106,6 @@ RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive TZ=America/Los_Angeles \ apt-get install -y --no-install-recommends \ libtbb-dev \ - make \ bc \ file \ patch \ @@ -158,11 +155,8 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends \ openssh-client \ git \ - texlive \ - texlive-latex-extra \ graphviz \ libxml2-utils \ - ghostscript \ ninja-build \ python3-mpi4py \ python3-scipy \ From 1e980540e91dd7b3cc9abbca2ce118637e3e0e3a Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Thu, 30 Apr 2026 19:55:30 -0700 Subject: [PATCH 18/29] add cuda builds --- .github/workflows/docker_build_tpls.yml | 58 ++++++++++++++++++++++++- docker/rocky-spack.yaml | 13 ++++++ docker/tpl-rockylinux.Dockerfile | 3 ++ 3 files changed, 72 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_build_tpls.yml b/.github/workflows/docker_build_tpls.yml index 821217de..538da020 100644 --- a/.github/workflows/docker_build_tpls.yml +++ b/.github/workflows/docker_build_tpls.yml @@ -78,7 +78,7 @@ jobs: SPEC: "~pygeosx ~docs ~vtk ~trilinos %gcc-13" - name: Rocky Linux 8 - clang 19 - RUNS_ON: streak2 + RUNS_ON: ubuntu-latest TPL_DOCKERFILE: docker/tpl-rockylinux.Dockerfile DOCKER_BASE_IMAGE_TAG: 8-clang19 DOCKER_BASE_IMAGE_REPO: geosx/rockylinux @@ -86,13 +86,67 @@ jobs: SPEC: "~pygeosx ~docs ~vtk ~trilinos %clang-19" - name: Rocky Linux 9 - clang 22 - RUNS_ON: streak2 + RUNS_ON: ubuntu-latest TPL_DOCKERFILE: docker/tpl-rockylinux.Dockerfile DOCKER_BASE_IMAGE_TAG: 9-clang22 DOCKER_BASE_IMAGE_REPO: geosx/rockylinux DOCKER_REPOSITORY: geosx/rockylinux9-clang22 SPEC: "~pygeosx ~docs ~vtk ~trilinos %clang-22" + # CUDA restart slice. Keep VTK/Trilinos/docs disabled while + # validating the CUDA/toolchain layer. + - name: Ubuntu 24.04 - gcc 13 + CUDA 12.9.1 + RUNS_ON: streak2 + TPL_DOCKERFILE: docker/tpl-ubuntu.Dockerfile + DOCKER_BASE_IMAGE_TAG: 24.04-gcc13-cuda12.9.1 + DOCKER_BASE_IMAGE_REPO: geosx/ubuntu + DOCKER_REPOSITORY: geosx/ubuntu24.04-gcc13-cuda12.9.1 + GCC_VERSION: 13 + SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" + + - name: Ubuntu 24.04 - gcc 14 + CUDA 13.2.1 + RUNS_ON: streak2 + TPL_DOCKERFILE: docker/tpl-ubuntu.Dockerfile + DOCKER_BASE_IMAGE_TAG: 24.04-gcc14-cuda13.2.1 + DOCKER_BASE_IMAGE_REPO: geosx/ubuntu + DOCKER_REPOSITORY: geosx/ubuntu24.04-gcc14-cuda13.2.1 + GCC_VERSION: 14 + SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %gcc-14 ^cuda@13.2.1+allow-unsupported-compilers" + + - name: Ubuntu 24.04 - clang 19 + CUDA 12.9.1 + RUNS_ON: streak2 + TPL_DOCKERFILE: docker/tpl-ubuntu.Dockerfile + DOCKER_BASE_IMAGE_TAG: 24.04-clang19-cuda12.9.1 + DOCKER_BASE_IMAGE_REPO: geosx/ubuntu + DOCKER_REPOSITORY: geosx/ubuntu24.04-clang19-cuda12.9.1 + CLANG_VERSION: 19 + SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %clang-19 ^cuda@12.9.1+allow-unsupported-compilers" + + - name: Ubuntu 24.04 - clang 20 + CUDA 13.2.1 + RUNS_ON: streak2 + TPL_DOCKERFILE: docker/tpl-ubuntu.Dockerfile + DOCKER_BASE_IMAGE_TAG: 24.04-clang20-cuda13.2.1 + DOCKER_BASE_IMAGE_REPO: geosx/ubuntu + DOCKER_REPOSITORY: geosx/ubuntu24.04-clang20-cuda13.2.1 + CLANG_VERSION: 20 + SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %clang-20 ^cuda@13.2.1+allow-unsupported-compilers" + + - name: Rocky Linux 8 - gcc 13 + CUDA 12.9.1 + RUNS_ON: streak2 + TPL_DOCKERFILE: docker/tpl-rockylinux.Dockerfile + DOCKER_BASE_IMAGE_TAG: 8-gcc13-cuda12.9.1 + DOCKER_BASE_IMAGE_REPO: geosx/rockylinux + DOCKER_REPOSITORY: geosx/rockylinux8-gcc13-cuda12.9.1 + SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" + + - name: Rocky Linux 9 - gcc 15 + CUDA 13.2.1 + RUNS_ON: streak2 + TPL_DOCKERFILE: docker/tpl-rockylinux.Dockerfile + DOCKER_BASE_IMAGE_TAG: 9-gcc15-cuda13.2.1 + DOCKER_BASE_IMAGE_REPO: geosx/rockylinux + DOCKER_REPOSITORY: geosx/rockylinux9-gcc15-cuda13.2.1 + SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %gcc-15 ^cuda@13.2.1+allow-unsupported-compilers" + steps: - name: Checkout uses: actions/checkout@v6 diff --git a/docker/rocky-spack.yaml b/docker/rocky-spack.yaml index 8af92a78..16edb2f0 100644 --- a/docker/rocky-spack.yaml +++ b/docker/rocky-spack.yaml @@ -40,6 +40,17 @@ spack: when: '%fortran' - spec: '%openmpi@4.1.1' when: '%mpi' + gcc-15: + - spec: cxxflags='-fPIC -pthread' + - spec: cflags='-fPIC -pthread' + - spec: '%c=gcc@15.2.1' + when: '%c' + - spec: '%cxx=gcc@15.2.1' + when: '%cxx' + - spec: '%fortran=gcc@15.2.1' + when: '%fortran' + - spec: '%openmpi@4.1.1' + when: '%mpi' clang-17: - spec: cxxflags='-fPIC -pthread' - spec: cflags='-fPIC -pthread' @@ -183,6 +194,8 @@ spack: externals: - spec: cuda@12.9.1 +allow-unsupported-compilers prefix: /usr/local/cuda + - spec: cuda@13.2.1 +allow-unsupported-compilers + prefix: /usr/local/cuda m4: buildable: false externals: diff --git a/docker/tpl-rockylinux.Dockerfile b/docker/tpl-rockylinux.Dockerfile index e893988d..27cbe2bb 100644 --- a/docker/tpl-rockylinux.Dockerfile +++ b/docker/tpl-rockylinux.Dockerfile @@ -126,6 +126,9 @@ RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \ *"%gcc-13"*) \ ROCKY_GCC_TOOLSET=13 ; \ require_exe /opt/rh/gcc-toolset-13/root/usr/bin/gcc /opt/rh/gcc-toolset-13/root/usr/bin/g++ /opt/rh/gcc-toolset-13/root/usr/bin/gfortran ;; \ + *"%gcc-15"*) \ + ROCKY_GCC_TOOLSET=15 ; \ + require_exe /opt/rh/gcc-toolset-15/root/usr/bin/gcc /opt/rh/gcc-toolset-15/root/usr/bin/g++ /opt/rh/gcc-toolset-15/root/usr/bin/gfortran ;; \ *"%clang-17"*) \ require_exe /usr/local/bin/clang-gcc13 /usr/local/bin/clang++-gcc13 /opt/rh/gcc-toolset-13/root/usr/bin/gcc /opt/rh/gcc-toolset-13/root/usr/bin/g++ /opt/rh/gcc-toolset-13/root/usr/bin/gfortran ;; \ *"%clang-19"*) \ From bace24a6b7f1be6ee99b453485e97e01e5ddca2b Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Thu, 30 Apr 2026 20:33:09 -0700 Subject: [PATCH 19/29] add other cuda variants. remove cuda13 until raja support --- .github/workflows/docker_build_tpls.yml | 50 +++++++++++++++---------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/.github/workflows/docker_build_tpls.yml b/.github/workflows/docker_build_tpls.yml index 538da020..cdfaf6bd 100644 --- a/.github/workflows/docker_build_tpls.yml +++ b/.github/workflows/docker_build_tpls.yml @@ -104,14 +104,16 @@ jobs: GCC_VERSION: 13 SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" - - name: Ubuntu 24.04 - gcc 14 + CUDA 13.2.1 - RUNS_ON: streak2 - TPL_DOCKERFILE: docker/tpl-ubuntu.Dockerfile - DOCKER_BASE_IMAGE_TAG: 24.04-gcc14-cuda13.2.1 - DOCKER_BASE_IMAGE_REPO: geosx/ubuntu - DOCKER_REPOSITORY: geosx/ubuntu24.04-gcc14-cuda13.2.1 - GCC_VERSION: 14 - SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %gcc-14 ^cuda@13.2.1+allow-unsupported-compilers" + # CUDA 13 is blocked by the pinned RAJA package: + # raja: '^cuda@13:' conflicts with '+cuda' + # - name: Ubuntu 24.04 - gcc 14 + CUDA 13.2.1 + # RUNS_ON: streak2 + # TPL_DOCKERFILE: docker/tpl-ubuntu.Dockerfile + # DOCKER_BASE_IMAGE_TAG: 24.04-gcc14-cuda13.2.1 + # DOCKER_BASE_IMAGE_REPO: geosx/ubuntu + # DOCKER_REPOSITORY: geosx/ubuntu24.04-gcc14-cuda13.2.1 + # GCC_VERSION: 14 + # SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %gcc-14 ^cuda@13.2.1+allow-unsupported-compilers" - name: Ubuntu 24.04 - clang 19 + CUDA 12.9.1 RUNS_ON: streak2 @@ -122,14 +124,14 @@ jobs: CLANG_VERSION: 19 SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %clang-19 ^cuda@12.9.1+allow-unsupported-compilers" - - name: Ubuntu 24.04 - clang 20 + CUDA 13.2.1 - RUNS_ON: streak2 - TPL_DOCKERFILE: docker/tpl-ubuntu.Dockerfile - DOCKER_BASE_IMAGE_TAG: 24.04-clang20-cuda13.2.1 - DOCKER_BASE_IMAGE_REPO: geosx/ubuntu - DOCKER_REPOSITORY: geosx/ubuntu24.04-clang20-cuda13.2.1 - CLANG_VERSION: 20 - SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %clang-20 ^cuda@13.2.1+allow-unsupported-compilers" + # - name: Ubuntu 24.04 - clang 20 + CUDA 13.2.1 + # RUNS_ON: streak2 + # TPL_DOCKERFILE: docker/tpl-ubuntu.Dockerfile + # DOCKER_BASE_IMAGE_TAG: 24.04-clang20-cuda13.2.1 + # DOCKER_BASE_IMAGE_REPO: geosx/ubuntu + # DOCKER_REPOSITORY: geosx/ubuntu24.04-clang20-cuda13.2.1 + # CLANG_VERSION: 20 + # SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %clang-20 ^cuda@13.2.1+allow-unsupported-compilers" - name: Rocky Linux 8 - gcc 13 + CUDA 12.9.1 RUNS_ON: streak2 @@ -139,13 +141,21 @@ jobs: DOCKER_REPOSITORY: geosx/rockylinux8-gcc13-cuda12.9.1 SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" - - name: Rocky Linux 9 - gcc 15 + CUDA 13.2.1 + - name: Rocky Linux 8 - clang 19 + CUDA 12.9.1 RUNS_ON: streak2 TPL_DOCKERFILE: docker/tpl-rockylinux.Dockerfile - DOCKER_BASE_IMAGE_TAG: 9-gcc15-cuda13.2.1 + DOCKER_BASE_IMAGE_TAG: 8-clang19-cuda12.9.1 DOCKER_BASE_IMAGE_REPO: geosx/rockylinux - DOCKER_REPOSITORY: geosx/rockylinux9-gcc15-cuda13.2.1 - SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %gcc-15 ^cuda@13.2.1+allow-unsupported-compilers" + DOCKER_REPOSITORY: geosx/rockylinux8-clang19-cuda12.9.1 + SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %clang-19 ^cuda@12.9.1+allow-unsupported-compilers" + + # - name: Rocky Linux 9 - gcc 15 + CUDA 13.2.1 + # RUNS_ON: streak2 + # TPL_DOCKERFILE: docker/tpl-rockylinux.Dockerfile + # DOCKER_BASE_IMAGE_TAG: 9-gcc15-cuda13.2.1 + # DOCKER_BASE_IMAGE_REPO: geosx/rockylinux + # DOCKER_REPOSITORY: geosx/rockylinux9-gcc15-cuda13.2.1 + # SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %gcc-15 ^cuda@13.2.1+allow-unsupported-compilers" steps: - name: Checkout From 6e85b595a65891071331a27697bdd25b58dfd582 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Thu, 30 Apr 2026 20:40:15 -0700 Subject: [PATCH 20/29] denote docs --- .github/workflows/docker_build_tpls.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker_build_tpls.yml b/.github/workflows/docker_build_tpls.yml index cdfaf6bd..345c025f 100644 --- a/.github/workflows/docker_build_tpls.yml +++ b/.github/workflows/docker_build_tpls.yml @@ -33,7 +33,7 @@ jobs: GCC_VERSION: 12 SPEC: "~pygeosx ~docs ~vtk ~trilinos %gcc-12" - - name: Ubuntu 24.04 - gcc 13 (docs canary) + - name: Ubuntu 24.04 - gcc 13 (docs) RUNS_ON: ubuntu-latest TPL_DOCKERFILE: docker/tpl-ubuntu.Dockerfile DOCKER_BASE_IMAGE_TAG: 24.04-gcc13 From a94b533e6e9a9c9364b214c49ab6751a0d795376 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Thu, 30 Apr 2026 22:10:54 -0700 Subject: [PATCH 21/29] add superlu patch --- .../superlu_dist/CMAKE_INSTALL_LIBDIR.patch | 59 +++++ .../packages/superlu_dist/package.py | 211 ++++++++++++++++++ .../superlu_dist/superlu-cray-ftn-case.patch | 15 ++ .../packages/superlu_dist/xl-611.patch | 26 +++ 4 files changed, 311 insertions(+) create mode 100644 scripts/spack_packages/packages/superlu_dist/CMAKE_INSTALL_LIBDIR.patch create mode 100644 scripts/spack_packages/packages/superlu_dist/package.py create mode 100644 scripts/spack_packages/packages/superlu_dist/superlu-cray-ftn-case.patch create mode 100644 scripts/spack_packages/packages/superlu_dist/xl-611.patch diff --git a/scripts/spack_packages/packages/superlu_dist/CMAKE_INSTALL_LIBDIR.patch b/scripts/spack_packages/packages/superlu_dist/CMAKE_INSTALL_LIBDIR.patch new file mode 100644 index 00000000..d3d83118 --- /dev/null +++ b/scripts/spack_packages/packages/superlu_dist/CMAKE_INSTALL_LIBDIR.patch @@ -0,0 +1,59 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2b2fdf2..f89cf4c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -456,15 +456,6 @@ endif() + #target_compile_features(SuperLU_DIST PUBLIC cxx_std_11) + + # Generate various configure files with proper definitions +-# configure_file(${CMAKE_SOURCE_DIR}/make.inc.in ${CMAKE_BINARY_DIR}/make.inc) +-configure_file(${SuperLU_DIST_SOURCE_DIR}/make.inc.in ${SuperLU_DIST_SOURCE_DIR}/make.inc) +- +-configure_file(${SuperLU_DIST_SOURCE_DIR}/SRC/superlu_dist_config.h.in ${SuperLU_DIST_BINARY_DIR}/SRC/superlu_dist_config.h) +-configure_file(${SuperLU_DIST_SOURCE_DIR}/SRC/superlu_dist_config.h.in ${SuperLU_DIST_SOURCE_DIR}/SRC/superlu_dist_config.h) +- +-# Following is to configure a file for FORTRAN code +-configure_file(${SuperLU_DIST_SOURCE_DIR}/SRC/superlu_dist_config.h.in ${SuperLU_DIST_BINARY_DIR}/FORTRAN/superlu_dist_config.h) +- + + # Add pkg-config support + if(IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR}) +@@ -476,4 +467,13 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/superlu_dist.pc.in ${CMAKE_CURRENT_BI + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/superlu_dist.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + ++# configure_file(${CMAKE_SOURCE_DIR}/make.inc.in ${CMAKE_BINARY_DIR}/make.inc) ++configure_file(${SuperLU_DIST_SOURCE_DIR}/make.inc.in ${SuperLU_DIST_SOURCE_DIR}/make.inc) ++ ++configure_file(${SuperLU_DIST_SOURCE_DIR}/SRC/superlu_dist_config.h.in ${SuperLU_DIST_BINARY_DIR}/SRC/superlu_dist_config.h) ++configure_file(${SuperLU_DIST_SOURCE_DIR}/SRC/superlu_dist_config.h.in ${SuperLU_DIST_SOURCE_DIR}/SRC/superlu_dist_config.h) ++ ++# Following is to configure a file for FORTRAN code ++configure_file(${SuperLU_DIST_SOURCE_DIR}/SRC/superlu_dist_config.h.in ${SuperLU_DIST_BINARY_DIR}/FORTRAN/superlu_dist_config.h) ++ + #message("MPI_Fortran_LINK_FLAGS '${MPI_Fortran_LINK_FLAGS}'") +diff --git a/make.inc.in b/make.inc.in +index 0beb461..860c0bf 100644 +--- a/make.inc.in ++++ b/make.inc.in +@@ -18,7 +18,8 @@ + # + SuperLUroot = ${CMAKE_INSTALL_PREFIX} + #DSUPERLULIB = $(SuperLUroot)/SRC/${PROJECT_NAME_LIB_EXPORT} +-DSUPERLULIB = $(SuperLUroot)/@CMAKE_INSTALL_LIBDIR@/${PROJECT_NAME_LIB_EXPORT} ++#DSUPERLULIB = $(SuperLUroot)/@CMAKE_INSTALL_LIBDIR@/${PROJECT_NAME_LIB_EXPORT} ++DSUPERLULIB = @pkgconfig_libdir@/${PROJECT_NAME_LIB_EXPORT} + INCLUDEDIR = $(SuperLUroot)/@CMAKE_INSTALL_INCLUDEDIR@ + + XSDK_INDEX_SIZE = @XSDK_INDEX_SIZE@ +@@ -29,7 +30,8 @@ HAVE_CUDA = @HAVE_CUDA@ + + XSDK_ENABLE_Fortran = @XSDK_ENABLE_Fortran@ + ifeq ($(XSDK_ENABLE_Fortran),ON) +- DFORTRANLIB = $(SuperLUroot)/@CMAKE_INSTALL_LIBDIR@/${PROJECT_NAME_LIB_FORTRAN} ++# DFORTRANLIB = $(SuperLUroot)/@CMAKE_INSTALL_LIBDIR@/${PROJECT_NAME_LIB_FORTRAN} ++ DFORTRANLIB = @pkgconfig_libdir@/${PROJECT_NAME_LIB_FORTRAN} + LIBS = $(DFORTRANLIB) $(DSUPERLULIB) ${BLAS_LIB_EXPORT} -lm + LIBS += ${EXTRA_FLIB_EXPORT} + else + diff --git a/scripts/spack_packages/packages/superlu_dist/package.py b/scripts/spack_packages/packages/superlu_dist/package.py new file mode 100644 index 00000000..3624584a --- /dev/null +++ b/scripts/spack_packages/packages/superlu_dist/package.py @@ -0,0 +1,211 @@ +# Copyright Spack Project Developers. See COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack_repo.builtin.build_systems.cmake import CMakePackage +from spack_repo.builtin.build_systems.cuda import CudaPackage +from spack_repo.builtin.build_systems.rocm import ROCmPackage + +from spack.package import * + + +class SuperluDist(CMakePackage, CudaPackage, ROCmPackage): + """A general purpose library for the direct solution of large, sparse, + nonsymmetric systems of linear equations on high performance machines.""" + + homepage = "https://crd-legacy.lbl.gov/~xiaoye/SuperLU/" + url = "https://github.com/xiaoyeli/superlu_dist/archive/v6.0.0.tar.gz" + git = "https://github.com/xiaoyeli/superlu_dist.git" + + tags = ["e4s"] + + maintainers("xiaoyeli", "gchavez2", "balay", "pghysels", "liuyangzhuan") + + version("develop", branch="master") + version("amd", branch="amd") + version("9.2.1", sha256="c80a1c2edaaa451ee9a54e005e5f3f56dc55cabe2b0a8d7acf5a1447a648157a") + version("9.2.0", sha256="d1df0e53d269cfc17379bb358e1b2b566d2807cb4a680b2ec1e4f35a77f707d1") + version("9.1.0", sha256="1cb2c6dc7e8231b2ec30c1266e55e440ffca9f55527771d8df28f900dd179f9d") + version("9.0.0", sha256="aa43d33d4b1b0f5f7b5ad7685e9a6bc25088832c6c74d2ab8f75a2c9f4e9e955") + version("8.2.1", sha256="b77d065cafa6bc1a1dcc15bf23fd854f54b05762b165badcffc195835ad2bddf") + version("8.2.0", sha256="d53573e5a399b2b4ab1fcc36e8421c1b6fab36345c0af14f8fa20326e3365f1f") + version("8.1.2", sha256="7b16c442bb01ea8b298c0aab9a2584aa4615d09786aac968cb2f3118c058206b") + version("8.1.1", sha256="766d70b84ece79d88249fe10ff51d2a397a29f274d9fd1e4a4ac39179a9ef23f") + version("8.1.0", sha256="9308844b99a7e762d5704934f7e9f79daf158b0bfc582994303c2e0b31518b34") + version("8.0.0", sha256="ad0682ef425716d5880c7f7c905a8701428b09c82ceaf87b3c386ff4d70efb05") + version("7.2.0", sha256="20b60bd8a3d88031c9ce6511ae9700b7a8dcf12e2fd704e74b1af762b3468b8c") + version("7.1.1", sha256="558053b3d4a56eb661c4f04d4fcab6604018ce5db97115394c161b56c9c278ff") + version("7.1.0", sha256="edbea877562be95fb22c7de1ff484f18685bec4baa8e4f703c414d3c035d4a66") + version("6.4.0", sha256="cb9c0b2ba4c28e5ed5817718ba19ae1dd63ccd30bc44c8b8252b54f5f04a44cc") + version("6.3.1", sha256="3787c2755acd6aadbb4d9029138c293a7570a2ed228806676edcc7e1d3f5a1d3") + version("6.3.0", sha256="daf3264706caccae2b8fd5a572e40275f1e128fa235cb7c21ee2f8051c11af95") + version("6.2.0", sha256="15ad1badd81b41e37941dd124d06d3b92e51c4f0ff532ad23fb09c4ebfe6eb9e") + version("6.1.1", sha256="35d25cff592c724439870444ed45e1d1d15ca2c65f02ccd4b83a6d3c9d220bd1") + version("6.1.0", sha256="92c6d1424dd830ee2d1e7396a418a5f6645160aea8472e558c4e4bfe006593c4") + version("6.0.0", sha256="ff6cdfa0263d595708bbb6d11fb780915d8cfddab438db651e246ea292f37ee4") + version("5.4.0", sha256="3ac238fe082106a2c4dbaf0c22af1ff1247308ffa8f053de9d78c3ec7dd0d801") + version("5.3.0", sha256="49ed110bdef1e284a0181d6c7dd1fae3aa110cb45f67c6aa5cb791070304d670") + version("5.2.2", sha256="65cfb9ace9a81f7affac4ad92b9571badf0f10155b3468531b0fffde3bd8e727") + version("5.2.1", sha256="67cf3c46cbded4cee68e2a9d601c30ab13b08091c8cdad95b0a8e018b6d5d1f1") + version("5.1.3", sha256="58e3dfdb4ae6f8e3f6f3d5ee5e851af59b967c4483cdb3b15ccd1dbdf38f44f9") + version("5.1.2", sha256="e34865ad6696ee6a6d178b4a01c8e19103a7d241ba9de043603970d63b0ee1e2") + version("5.1.0", sha256="73f292ab748b590b6dd7469e6986aeb95d279b8b8b3da511c695a396bdbc996c") + version("5.0.0", sha256="78d1d6460ff16b3f71e4bcd7306397574d54d421249553ccc26567f00a10bfc6") + + variant("int64", default=False, description="Build with 64 bit integers") + variant( + "openmp", + default=False, + description=( + "Build with OpenMP support " + "(needs a good multithreaded BLAS implementation for good performance)" + ), + ) + variant("shared", default=True, description="Build shared libraries") + variant("parmetis", default=True, description="Enable ParMETIS library") + + depends_on("c", type="build") # generated + depends_on("cxx", type="build") # generated + depends_on("fortran", type="build") # generated + + depends_on("mpi") + depends_on("blas") + depends_on("lapack") + with when("+parmetis"): + depends_on("metis@5: +int64", when="+int64") + depends_on("parmetis +int64", when="+int64") + depends_on("metis@5: ~int64", when="~int64") + depends_on("parmetis ~int64", when="~int64") + depends_on("cmake@3.18.1:", type="build", when="@7.1.0:") + depends_on("hipblas", when="+rocm") + depends_on("hipblas@:6", when="@:9.1.0 +rocm") + depends_on("rocsolver", when="+rocm") + + conflicts("+rocm", when="+cuda") + conflicts("+cuda", when="@:6.3") + # See https://github.com/xiaoyeli/superlu_dist/issues/87 + conflicts("^cuda@11.5.0:", when="@7.1.0:7.1 +cuda") + # https://github.com/xiaoyeli/superlu_dist/pull/193 + conflicts("^cuda@13:", when="@:9.1 +cuda") + + patch("xl-611.patch", when="@:6.1.1 %xl") + patch("xl-611.patch", when="@:6.1.1 %xl_r") + patch("superlu-cray-ftn-case.patch", when="@7.1.1 %cce") + patch("CMAKE_INSTALL_LIBDIR.patch", when="@7.0.0:7.2.0") + patch( + "https://github.com/xiaoyeli/superlu_dist/commit/5a1946f347e6d813a250af874dee0942f4fdfc44.patch?full_index=1", + sha256="6472c192f6d24d4d762193385c5a46a536282cae786c13354a5e80f5ebfac64c", + when="@9.0:9.1", + ) + + def cmake_args(self): + spec = self.spec + cmake_args = [] + + def append_define(*args): + cmake_args.append(self.define(*args)) + + def append_from_variant(*args): + cmake_args.append(self.define_from_variant(*args)) + + append_define("CMAKE_C_COMPILER", spec["mpi"].mpicc) + append_define("CMAKE_CXX_COMPILER", spec["mpi"].mpicxx) + append_define("CMAKE_INSTALL_LIBDIR", self.prefix.lib) + append_define("CMAKE_INSTALL_BINDIR", self.prefix.bin) + append_define("TPL_BLAS_LIBRARIES", spec["blas"].libs.ld_flags) + append_define("TPL_LAPACK_LIBRARIES", spec["lapack"].libs.ld_flags) + append_define("TPL_ENABLE_LAPACKLIB", True) + append_define("USE_XSDK_DEFAULTS", True) + + append_from_variant("TPL_ENABLE_PARMETISLIB", "parmetis") + if "+parmetis" in spec: + append_define( + "TPL_PARMETIS_LIBRARIES", + [spec["parmetis"].libs.ld_flags, spec["metis"].libs.ld_flags], + ) + append_define( + "TPL_PARMETIS_INCLUDE_DIRS", + [spec["parmetis"].prefix.include, spec["metis"].prefix.include], + ) + + append_define("XSDK_INDEX_SIZE", "64" if "+int64" in spec else "32") + + append_from_variant("enable_openmp", "openmp") + if "~openmp" in spec: + append_define("CMAKE_DISABLE_FIND_PACKAGE_OpenMP", True) + + if "+cuda" in spec: + append_define("TPL_ENABLE_CUDALIB", True) + cuda_arch = spec.variants["cuda_arch"].value + if cuda_arch[0] != "none": + append_define("CMAKE_CUDA_ARCHITECTURES", cuda_arch[0]) + if spec.satisfies("^cuda@13:"): + append_define("CMAKE_CXX_STANDARD", "17") + append_define("CMAKE_CUDA_STANDARD", "17") + elif spec.satisfies("^cuda@12.9: %clang platform=linux os=rocky8"): + # TODO: Try removing this override when SuperLU_DIST is updated. + # CUDA 12.9 rejects GCC 14 libstdc++ variable templates when the + # Rocky 8 clang build compiles CUDA translation units as C++11. + append_define("CMAKE_CXX_STANDARD", "14") + append_define("CMAKE_CUDA_STANDARD", "14") + + if "+rocm" in spec and (spec.satisfies("@amd") or spec.satisfies("@8:")): + append_define("TPL_ENABLE_HIPLIB", True) + append_define("HIP_ROOT_DIR", spec["hip"].prefix) + rocm_archs = spec.variants["amdgpu_target"].value + mpiinc = spec["mpi"].prefix.include + if "none" not in rocm_archs: + append_define( + "HIP_HIPCC_FLAGS", "--amdgpu-target=" + ",".join(rocm_archs) + " -I/" + mpiinc + ) + + # Workaround for linking issue on Mac: + if spec.satisfies("%apple-clang"): + append_define("CMAKE_Fortran_COMPILER", spec["mpi"].mpifc) + + append_from_variant("BUILD_SHARED_LIBS", "shared") + return cmake_args + + def flag_handler(self, name, flags): + flags = list(flags) + if name == "cxxflags": + flags.append(self.compiler.cxx11_flag) + if ( + name == "cflags" + and (self.spec.satisfies("%xl") or self.spec.satisfies("%xl_r")) + and self.spec.satisfies("@:6.1.1") + ): + flags.append("-DNoChange") + if name == "cflags" and ( + self.spec.satisfies("%oneapi") or self.spec.satisfies("%arm@23.04:") + ): + # + # 2022 and later Intel OneAPI compilers and Arm compilers version 23.04 and later + # throw errors compiling some of the non ISO C99 compliant code in this package + # see https://reviews.llvm.org/D122983 + # + flags.append("-Wno-error=implicit-function-declaration") + return (None, None, flags) + + examples_src_dir = "EXAMPLE" + + @run_after("install") + def cache_test_sources(self): + """Copy the example matrices after the package is installed to an + install test subdirectory for use during `spack test run`.""" + cache_extra_test_sources(self, [self.examples_src_dir]) + + def test_pddrive(self): + """run cached pddrive""" + if not self.spec.satisfies("@7.2.0:"): + raise SkipTest("Test is only available for v7.2.0 on") + + test_dir = join_path(self.test_suite.current_test_cache_dir, self.examples_src_dir) + superludriver = join_path(self.prefix.lib, "EXAMPLE", "pddrive") + + with working_dir(test_dir): + # Smoke test input parameters: -r 2 -c 2 g20.rua + test_args = ["-n", "4", superludriver, "-r", "2", "-c", "2", "g20.rua"] + # Find the correct mpirun command + mpiexe_f = which("srun", "mpirun", "mpiexec", required=True) + mpiexe_f(*test_args) diff --git a/scripts/spack_packages/packages/superlu_dist/superlu-cray-ftn-case.patch b/scripts/spack_packages/packages/superlu_dist/superlu-cray-ftn-case.patch new file mode 100644 index 00000000..8f396365 --- /dev/null +++ b/scripts/spack_packages/packages/superlu_dist/superlu-cray-ftn-case.patch @@ -0,0 +1,15 @@ +diff --git a/FORTRAN/CMakeLists.txt b/FORTRAN/CMakeLists.txt +index bf402a9..6a039e1 100644 +--- a/FORTRAN/CMakeLists.txt ++++ b/FORTRAN/CMakeLists.txt +@@ -3,8 +3,8 @@ include_directories(${SuperLU_DIST_SOURCE_DIR}/SRC) + include_directories(${SuperLU_DIST_BINARY_DIR}/FORTRAN) + + set(headers +- ${CMAKE_BINARY_DIR}/FORTRAN/superlu_mod.mod +- ${CMAKE_BINARY_DIR}/FORTRAN/superlupara_mod.mod ++ ${CMAKE_BINARY_DIR}/FORTRAN/SUPERLU_MOD.mod ++ ${CMAKE_BINARY_DIR}/FORTRAN/SUPERLUPARA_MOD.mod + ${CMAKE_BINARY_DIR}/FORTRAN/superlu_dist_config.fh + ) + diff --git a/scripts/spack_packages/packages/superlu_dist/xl-611.patch b/scripts/spack_packages/packages/superlu_dist/xl-611.patch new file mode 100644 index 00000000..92b6a3c7 --- /dev/null +++ b/scripts/spack_packages/packages/superlu_dist/xl-611.patch @@ -0,0 +1,26 @@ +commit e51132dbd022139933678b3a751a9b3148fafd19 +Author: Satish Balay +Date: Tue Nov 12 16:07:08 2019 -0600 + + add ztrtri_ mapping for xlf + +diff --git a/SRC/Cnames.h b/SRC/Cnames.h +index 792f514..ebef619 100644 +--- a/SRC/Cnames.h ++++ b/SRC/Cnames.h +@@ -179,6 +179,7 @@ at the top-level directory. + #define zher2_ ZHER2 + #define zgeru_ ZGERU + ++#define ztrtri_ ZTRTRI + /* + #define mc64id_dist MC64ID_DIST + #define mc64ad_dist MC64AD_DIST +@@ -307,6 +308,7 @@ at the top-level directory. + #define zher2_ zher2 + #define zgeru_ zgeru + ++#define ztrtri_ ztrtri + /* + #define mc64id_dist mc64id_dist + #define mc64ad_dist mc64ad_dist From ddcf47eb64d486ea0be5d00d77a68bcd6a486959 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Thu, 30 Apr 2026 22:42:14 -0700 Subject: [PATCH 22/29] fix patch --- scripts/spack_packages/packages/superlu_dist/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/spack_packages/packages/superlu_dist/package.py b/scripts/spack_packages/packages/superlu_dist/package.py index 3624584a..3446b517 100644 --- a/scripts/spack_packages/packages/superlu_dist/package.py +++ b/scripts/spack_packages/packages/superlu_dist/package.py @@ -142,8 +142,12 @@ def append_from_variant(*args): if spec.satisfies("^cuda@13:"): append_define("CMAKE_CXX_STANDARD", "17") append_define("CMAKE_CUDA_STANDARD", "17") - elif spec.satisfies("^cuda@12.9: %clang platform=linux os=rocky8"): + elif spec.satisfies("^cuda@12.9: platform=linux os=rocky8") and "cxx=clang" in str( + spec + ): # TODO: Try removing this override when SuperLU_DIST is updated. + # Spack's compiler-as-dependency model prints this compiler as + # "%c,cxx=clang@19"; the older "%clang" constraint does not match. # CUDA 12.9 rejects GCC 14 libstdc++ variable templates when the # Rocky 8 clang build compiles CUDA translation units as C++11. append_define("CMAKE_CXX_STANDARD", "14") From 9de70f464be943c834deb6550d3d3937b9bda62b Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Thu, 30 Apr 2026 23:30:10 -0700 Subject: [PATCH 23/29] renamed superlu-dist patch --- .../{superlu_dist => superlu-dist}/CMAKE_INSTALL_LIBDIR.patch | 0 .../packages/{superlu_dist => superlu-dist}/package.py | 0 .../{superlu_dist => superlu-dist}/superlu-cray-ftn-case.patch | 0 .../packages/{superlu_dist => superlu-dist}/xl-611.patch | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename scripts/spack_packages/packages/{superlu_dist => superlu-dist}/CMAKE_INSTALL_LIBDIR.patch (100%) rename scripts/spack_packages/packages/{superlu_dist => superlu-dist}/package.py (100%) rename scripts/spack_packages/packages/{superlu_dist => superlu-dist}/superlu-cray-ftn-case.patch (100%) rename scripts/spack_packages/packages/{superlu_dist => superlu-dist}/xl-611.patch (100%) diff --git a/scripts/spack_packages/packages/superlu_dist/CMAKE_INSTALL_LIBDIR.patch b/scripts/spack_packages/packages/superlu-dist/CMAKE_INSTALL_LIBDIR.patch similarity index 100% rename from scripts/spack_packages/packages/superlu_dist/CMAKE_INSTALL_LIBDIR.patch rename to scripts/spack_packages/packages/superlu-dist/CMAKE_INSTALL_LIBDIR.patch diff --git a/scripts/spack_packages/packages/superlu_dist/package.py b/scripts/spack_packages/packages/superlu-dist/package.py similarity index 100% rename from scripts/spack_packages/packages/superlu_dist/package.py rename to scripts/spack_packages/packages/superlu-dist/package.py diff --git a/scripts/spack_packages/packages/superlu_dist/superlu-cray-ftn-case.patch b/scripts/spack_packages/packages/superlu-dist/superlu-cray-ftn-case.patch similarity index 100% rename from scripts/spack_packages/packages/superlu_dist/superlu-cray-ftn-case.patch rename to scripts/spack_packages/packages/superlu-dist/superlu-cray-ftn-case.patch diff --git a/scripts/spack_packages/packages/superlu_dist/xl-611.patch b/scripts/spack_packages/packages/superlu-dist/xl-611.patch similarity index 100% rename from scripts/spack_packages/packages/superlu_dist/xl-611.patch rename to scripts/spack_packages/packages/superlu-dist/xl-611.patch From 603f7432adc7f32ce35856021dbb0cbd2ec46e10 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Thu, 30 Apr 2026 23:56:56 -0700 Subject: [PATCH 24/29] give up on superlu patch. comment out build until proper patch is made --- .github/workflows/docker_build_tpls.yml | 16 +- .../superlu-dist/CMAKE_INSTALL_LIBDIR.patch | 59 ----- .../packages/superlu-dist/package.py | 215 ------------------ .../superlu-dist/superlu-cray-ftn-case.patch | 15 -- .../packages/superlu-dist/xl-611.patch | 26 --- 5 files changed, 9 insertions(+), 322 deletions(-) delete mode 100644 scripts/spack_packages/packages/superlu-dist/CMAKE_INSTALL_LIBDIR.patch delete mode 100644 scripts/spack_packages/packages/superlu-dist/package.py delete mode 100644 scripts/spack_packages/packages/superlu-dist/superlu-cray-ftn-case.patch delete mode 100644 scripts/spack_packages/packages/superlu-dist/xl-611.patch diff --git a/.github/workflows/docker_build_tpls.yml b/.github/workflows/docker_build_tpls.yml index 345c025f..c14ea164 100644 --- a/.github/workflows/docker_build_tpls.yml +++ b/.github/workflows/docker_build_tpls.yml @@ -141,13 +141,15 @@ jobs: DOCKER_REPOSITORY: geosx/rockylinux8-gcc13-cuda12.9.1 SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" - - name: Rocky Linux 8 - clang 19 + CUDA 12.9.1 - RUNS_ON: streak2 - TPL_DOCKERFILE: docker/tpl-rockylinux.Dockerfile - DOCKER_BASE_IMAGE_TAG: 8-clang19-cuda12.9.1 - DOCKER_BASE_IMAGE_REPO: geosx/rockylinux - DOCKER_REPOSITORY: geosx/rockylinux8-clang19-cuda12.9.1 - SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %clang-19 ^cuda@12.9.1+allow-unsupported-compilers" + # Rocky8 clang19 CUDA 12.9.1 is blocked by SuperLU_DIST using + # C++11 with CUDA 12.9 + clang19 + GCC 14 libstdc++. + # - name: Rocky Linux 8 - clang 19 + CUDA 12.9.1 + # RUNS_ON: streak2 + # TPL_DOCKERFILE: docker/tpl-rockylinux.Dockerfile + # DOCKER_BASE_IMAGE_TAG: 8-clang19-cuda12.9.1 + # DOCKER_BASE_IMAGE_REPO: geosx/rockylinux + # DOCKER_REPOSITORY: geosx/rockylinux8-clang19-cuda12.9.1 + # SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %clang-19 ^cuda@12.9.1+allow-unsupported-compilers" # - name: Rocky Linux 9 - gcc 15 + CUDA 13.2.1 # RUNS_ON: streak2 diff --git a/scripts/spack_packages/packages/superlu-dist/CMAKE_INSTALL_LIBDIR.patch b/scripts/spack_packages/packages/superlu-dist/CMAKE_INSTALL_LIBDIR.patch deleted file mode 100644 index d3d83118..00000000 --- a/scripts/spack_packages/packages/superlu-dist/CMAKE_INSTALL_LIBDIR.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2b2fdf2..f89cf4c 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -456,15 +456,6 @@ endif() - #target_compile_features(SuperLU_DIST PUBLIC cxx_std_11) - - # Generate various configure files with proper definitions --# configure_file(${CMAKE_SOURCE_DIR}/make.inc.in ${CMAKE_BINARY_DIR}/make.inc) --configure_file(${SuperLU_DIST_SOURCE_DIR}/make.inc.in ${SuperLU_DIST_SOURCE_DIR}/make.inc) -- --configure_file(${SuperLU_DIST_SOURCE_DIR}/SRC/superlu_dist_config.h.in ${SuperLU_DIST_BINARY_DIR}/SRC/superlu_dist_config.h) --configure_file(${SuperLU_DIST_SOURCE_DIR}/SRC/superlu_dist_config.h.in ${SuperLU_DIST_SOURCE_DIR}/SRC/superlu_dist_config.h) -- --# Following is to configure a file for FORTRAN code --configure_file(${SuperLU_DIST_SOURCE_DIR}/SRC/superlu_dist_config.h.in ${SuperLU_DIST_BINARY_DIR}/FORTRAN/superlu_dist_config.h) -- - - # Add pkg-config support - if(IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR}) -@@ -476,4 +467,13 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/superlu_dist.pc.in ${CMAKE_CURRENT_BI - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/superlu_dist.pc - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) - -+# configure_file(${CMAKE_SOURCE_DIR}/make.inc.in ${CMAKE_BINARY_DIR}/make.inc) -+configure_file(${SuperLU_DIST_SOURCE_DIR}/make.inc.in ${SuperLU_DIST_SOURCE_DIR}/make.inc) -+ -+configure_file(${SuperLU_DIST_SOURCE_DIR}/SRC/superlu_dist_config.h.in ${SuperLU_DIST_BINARY_DIR}/SRC/superlu_dist_config.h) -+configure_file(${SuperLU_DIST_SOURCE_DIR}/SRC/superlu_dist_config.h.in ${SuperLU_DIST_SOURCE_DIR}/SRC/superlu_dist_config.h) -+ -+# Following is to configure a file for FORTRAN code -+configure_file(${SuperLU_DIST_SOURCE_DIR}/SRC/superlu_dist_config.h.in ${SuperLU_DIST_BINARY_DIR}/FORTRAN/superlu_dist_config.h) -+ - #message("MPI_Fortran_LINK_FLAGS '${MPI_Fortran_LINK_FLAGS}'") -diff --git a/make.inc.in b/make.inc.in -index 0beb461..860c0bf 100644 ---- a/make.inc.in -+++ b/make.inc.in -@@ -18,7 +18,8 @@ - # - SuperLUroot = ${CMAKE_INSTALL_PREFIX} - #DSUPERLULIB = $(SuperLUroot)/SRC/${PROJECT_NAME_LIB_EXPORT} --DSUPERLULIB = $(SuperLUroot)/@CMAKE_INSTALL_LIBDIR@/${PROJECT_NAME_LIB_EXPORT} -+#DSUPERLULIB = $(SuperLUroot)/@CMAKE_INSTALL_LIBDIR@/${PROJECT_NAME_LIB_EXPORT} -+DSUPERLULIB = @pkgconfig_libdir@/${PROJECT_NAME_LIB_EXPORT} - INCLUDEDIR = $(SuperLUroot)/@CMAKE_INSTALL_INCLUDEDIR@ - - XSDK_INDEX_SIZE = @XSDK_INDEX_SIZE@ -@@ -29,7 +30,8 @@ HAVE_CUDA = @HAVE_CUDA@ - - XSDK_ENABLE_Fortran = @XSDK_ENABLE_Fortran@ - ifeq ($(XSDK_ENABLE_Fortran),ON) -- DFORTRANLIB = $(SuperLUroot)/@CMAKE_INSTALL_LIBDIR@/${PROJECT_NAME_LIB_FORTRAN} -+# DFORTRANLIB = $(SuperLUroot)/@CMAKE_INSTALL_LIBDIR@/${PROJECT_NAME_LIB_FORTRAN} -+ DFORTRANLIB = @pkgconfig_libdir@/${PROJECT_NAME_LIB_FORTRAN} - LIBS = $(DFORTRANLIB) $(DSUPERLULIB) ${BLAS_LIB_EXPORT} -lm - LIBS += ${EXTRA_FLIB_EXPORT} - else - diff --git a/scripts/spack_packages/packages/superlu-dist/package.py b/scripts/spack_packages/packages/superlu-dist/package.py deleted file mode 100644 index 3446b517..00000000 --- a/scripts/spack_packages/packages/superlu-dist/package.py +++ /dev/null @@ -1,215 +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.cmake import CMakePackage -from spack_repo.builtin.build_systems.cuda import CudaPackage -from spack_repo.builtin.build_systems.rocm import ROCmPackage - -from spack.package import * - - -class SuperluDist(CMakePackage, CudaPackage, ROCmPackage): - """A general purpose library for the direct solution of large, sparse, - nonsymmetric systems of linear equations on high performance machines.""" - - homepage = "https://crd-legacy.lbl.gov/~xiaoye/SuperLU/" - url = "https://github.com/xiaoyeli/superlu_dist/archive/v6.0.0.tar.gz" - git = "https://github.com/xiaoyeli/superlu_dist.git" - - tags = ["e4s"] - - maintainers("xiaoyeli", "gchavez2", "balay", "pghysels", "liuyangzhuan") - - version("develop", branch="master") - version("amd", branch="amd") - version("9.2.1", sha256="c80a1c2edaaa451ee9a54e005e5f3f56dc55cabe2b0a8d7acf5a1447a648157a") - version("9.2.0", sha256="d1df0e53d269cfc17379bb358e1b2b566d2807cb4a680b2ec1e4f35a77f707d1") - version("9.1.0", sha256="1cb2c6dc7e8231b2ec30c1266e55e440ffca9f55527771d8df28f900dd179f9d") - version("9.0.0", sha256="aa43d33d4b1b0f5f7b5ad7685e9a6bc25088832c6c74d2ab8f75a2c9f4e9e955") - version("8.2.1", sha256="b77d065cafa6bc1a1dcc15bf23fd854f54b05762b165badcffc195835ad2bddf") - version("8.2.0", sha256="d53573e5a399b2b4ab1fcc36e8421c1b6fab36345c0af14f8fa20326e3365f1f") - version("8.1.2", sha256="7b16c442bb01ea8b298c0aab9a2584aa4615d09786aac968cb2f3118c058206b") - version("8.1.1", sha256="766d70b84ece79d88249fe10ff51d2a397a29f274d9fd1e4a4ac39179a9ef23f") - version("8.1.0", sha256="9308844b99a7e762d5704934f7e9f79daf158b0bfc582994303c2e0b31518b34") - version("8.0.0", sha256="ad0682ef425716d5880c7f7c905a8701428b09c82ceaf87b3c386ff4d70efb05") - version("7.2.0", sha256="20b60bd8a3d88031c9ce6511ae9700b7a8dcf12e2fd704e74b1af762b3468b8c") - version("7.1.1", sha256="558053b3d4a56eb661c4f04d4fcab6604018ce5db97115394c161b56c9c278ff") - version("7.1.0", sha256="edbea877562be95fb22c7de1ff484f18685bec4baa8e4f703c414d3c035d4a66") - version("6.4.0", sha256="cb9c0b2ba4c28e5ed5817718ba19ae1dd63ccd30bc44c8b8252b54f5f04a44cc") - version("6.3.1", sha256="3787c2755acd6aadbb4d9029138c293a7570a2ed228806676edcc7e1d3f5a1d3") - version("6.3.0", sha256="daf3264706caccae2b8fd5a572e40275f1e128fa235cb7c21ee2f8051c11af95") - version("6.2.0", sha256="15ad1badd81b41e37941dd124d06d3b92e51c4f0ff532ad23fb09c4ebfe6eb9e") - version("6.1.1", sha256="35d25cff592c724439870444ed45e1d1d15ca2c65f02ccd4b83a6d3c9d220bd1") - version("6.1.0", sha256="92c6d1424dd830ee2d1e7396a418a5f6645160aea8472e558c4e4bfe006593c4") - version("6.0.0", sha256="ff6cdfa0263d595708bbb6d11fb780915d8cfddab438db651e246ea292f37ee4") - version("5.4.0", sha256="3ac238fe082106a2c4dbaf0c22af1ff1247308ffa8f053de9d78c3ec7dd0d801") - version("5.3.0", sha256="49ed110bdef1e284a0181d6c7dd1fae3aa110cb45f67c6aa5cb791070304d670") - version("5.2.2", sha256="65cfb9ace9a81f7affac4ad92b9571badf0f10155b3468531b0fffde3bd8e727") - version("5.2.1", sha256="67cf3c46cbded4cee68e2a9d601c30ab13b08091c8cdad95b0a8e018b6d5d1f1") - version("5.1.3", sha256="58e3dfdb4ae6f8e3f6f3d5ee5e851af59b967c4483cdb3b15ccd1dbdf38f44f9") - version("5.1.2", sha256="e34865ad6696ee6a6d178b4a01c8e19103a7d241ba9de043603970d63b0ee1e2") - version("5.1.0", sha256="73f292ab748b590b6dd7469e6986aeb95d279b8b8b3da511c695a396bdbc996c") - version("5.0.0", sha256="78d1d6460ff16b3f71e4bcd7306397574d54d421249553ccc26567f00a10bfc6") - - variant("int64", default=False, description="Build with 64 bit integers") - variant( - "openmp", - default=False, - description=( - "Build with OpenMP support " - "(needs a good multithreaded BLAS implementation for good performance)" - ), - ) - variant("shared", default=True, description="Build shared libraries") - variant("parmetis", default=True, description="Enable ParMETIS library") - - depends_on("c", type="build") # generated - depends_on("cxx", type="build") # generated - depends_on("fortran", type="build") # generated - - depends_on("mpi") - depends_on("blas") - depends_on("lapack") - with when("+parmetis"): - depends_on("metis@5: +int64", when="+int64") - depends_on("parmetis +int64", when="+int64") - depends_on("metis@5: ~int64", when="~int64") - depends_on("parmetis ~int64", when="~int64") - depends_on("cmake@3.18.1:", type="build", when="@7.1.0:") - depends_on("hipblas", when="+rocm") - depends_on("hipblas@:6", when="@:9.1.0 +rocm") - depends_on("rocsolver", when="+rocm") - - conflicts("+rocm", when="+cuda") - conflicts("+cuda", when="@:6.3") - # See https://github.com/xiaoyeli/superlu_dist/issues/87 - conflicts("^cuda@11.5.0:", when="@7.1.0:7.1 +cuda") - # https://github.com/xiaoyeli/superlu_dist/pull/193 - conflicts("^cuda@13:", when="@:9.1 +cuda") - - patch("xl-611.patch", when="@:6.1.1 %xl") - patch("xl-611.patch", when="@:6.1.1 %xl_r") - patch("superlu-cray-ftn-case.patch", when="@7.1.1 %cce") - patch("CMAKE_INSTALL_LIBDIR.patch", when="@7.0.0:7.2.0") - patch( - "https://github.com/xiaoyeli/superlu_dist/commit/5a1946f347e6d813a250af874dee0942f4fdfc44.patch?full_index=1", - sha256="6472c192f6d24d4d762193385c5a46a536282cae786c13354a5e80f5ebfac64c", - when="@9.0:9.1", - ) - - def cmake_args(self): - spec = self.spec - cmake_args = [] - - def append_define(*args): - cmake_args.append(self.define(*args)) - - def append_from_variant(*args): - cmake_args.append(self.define_from_variant(*args)) - - append_define("CMAKE_C_COMPILER", spec["mpi"].mpicc) - append_define("CMAKE_CXX_COMPILER", spec["mpi"].mpicxx) - append_define("CMAKE_INSTALL_LIBDIR", self.prefix.lib) - append_define("CMAKE_INSTALL_BINDIR", self.prefix.bin) - append_define("TPL_BLAS_LIBRARIES", spec["blas"].libs.ld_flags) - append_define("TPL_LAPACK_LIBRARIES", spec["lapack"].libs.ld_flags) - append_define("TPL_ENABLE_LAPACKLIB", True) - append_define("USE_XSDK_DEFAULTS", True) - - append_from_variant("TPL_ENABLE_PARMETISLIB", "parmetis") - if "+parmetis" in spec: - append_define( - "TPL_PARMETIS_LIBRARIES", - [spec["parmetis"].libs.ld_flags, spec["metis"].libs.ld_flags], - ) - append_define( - "TPL_PARMETIS_INCLUDE_DIRS", - [spec["parmetis"].prefix.include, spec["metis"].prefix.include], - ) - - append_define("XSDK_INDEX_SIZE", "64" if "+int64" in spec else "32") - - append_from_variant("enable_openmp", "openmp") - if "~openmp" in spec: - append_define("CMAKE_DISABLE_FIND_PACKAGE_OpenMP", True) - - if "+cuda" in spec: - append_define("TPL_ENABLE_CUDALIB", True) - cuda_arch = spec.variants["cuda_arch"].value - if cuda_arch[0] != "none": - append_define("CMAKE_CUDA_ARCHITECTURES", cuda_arch[0]) - if spec.satisfies("^cuda@13:"): - append_define("CMAKE_CXX_STANDARD", "17") - append_define("CMAKE_CUDA_STANDARD", "17") - elif spec.satisfies("^cuda@12.9: platform=linux os=rocky8") and "cxx=clang" in str( - spec - ): - # TODO: Try removing this override when SuperLU_DIST is updated. - # Spack's compiler-as-dependency model prints this compiler as - # "%c,cxx=clang@19"; the older "%clang" constraint does not match. - # CUDA 12.9 rejects GCC 14 libstdc++ variable templates when the - # Rocky 8 clang build compiles CUDA translation units as C++11. - append_define("CMAKE_CXX_STANDARD", "14") - append_define("CMAKE_CUDA_STANDARD", "14") - - if "+rocm" in spec and (spec.satisfies("@amd") or spec.satisfies("@8:")): - append_define("TPL_ENABLE_HIPLIB", True) - append_define("HIP_ROOT_DIR", spec["hip"].prefix) - rocm_archs = spec.variants["amdgpu_target"].value - mpiinc = spec["mpi"].prefix.include - if "none" not in rocm_archs: - append_define( - "HIP_HIPCC_FLAGS", "--amdgpu-target=" + ",".join(rocm_archs) + " -I/" + mpiinc - ) - - # Workaround for linking issue on Mac: - if spec.satisfies("%apple-clang"): - append_define("CMAKE_Fortran_COMPILER", spec["mpi"].mpifc) - - append_from_variant("BUILD_SHARED_LIBS", "shared") - return cmake_args - - def flag_handler(self, name, flags): - flags = list(flags) - if name == "cxxflags": - flags.append(self.compiler.cxx11_flag) - if ( - name == "cflags" - and (self.spec.satisfies("%xl") or self.spec.satisfies("%xl_r")) - and self.spec.satisfies("@:6.1.1") - ): - flags.append("-DNoChange") - if name == "cflags" and ( - self.spec.satisfies("%oneapi") or self.spec.satisfies("%arm@23.04:") - ): - # - # 2022 and later Intel OneAPI compilers and Arm compilers version 23.04 and later - # throw errors compiling some of the non ISO C99 compliant code in this package - # see https://reviews.llvm.org/D122983 - # - flags.append("-Wno-error=implicit-function-declaration") - return (None, None, flags) - - examples_src_dir = "EXAMPLE" - - @run_after("install") - def cache_test_sources(self): - """Copy the example matrices after the package is installed to an - install test subdirectory for use during `spack test run`.""" - cache_extra_test_sources(self, [self.examples_src_dir]) - - def test_pddrive(self): - """run cached pddrive""" - if not self.spec.satisfies("@7.2.0:"): - raise SkipTest("Test is only available for v7.2.0 on") - - test_dir = join_path(self.test_suite.current_test_cache_dir, self.examples_src_dir) - superludriver = join_path(self.prefix.lib, "EXAMPLE", "pddrive") - - with working_dir(test_dir): - # Smoke test input parameters: -r 2 -c 2 g20.rua - test_args = ["-n", "4", superludriver, "-r", "2", "-c", "2", "g20.rua"] - # Find the correct mpirun command - mpiexe_f = which("srun", "mpirun", "mpiexec", required=True) - mpiexe_f(*test_args) diff --git a/scripts/spack_packages/packages/superlu-dist/superlu-cray-ftn-case.patch b/scripts/spack_packages/packages/superlu-dist/superlu-cray-ftn-case.patch deleted file mode 100644 index 8f396365..00000000 --- a/scripts/spack_packages/packages/superlu-dist/superlu-cray-ftn-case.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/FORTRAN/CMakeLists.txt b/FORTRAN/CMakeLists.txt -index bf402a9..6a039e1 100644 ---- a/FORTRAN/CMakeLists.txt -+++ b/FORTRAN/CMakeLists.txt -@@ -3,8 +3,8 @@ include_directories(${SuperLU_DIST_SOURCE_DIR}/SRC) - include_directories(${SuperLU_DIST_BINARY_DIR}/FORTRAN) - - set(headers -- ${CMAKE_BINARY_DIR}/FORTRAN/superlu_mod.mod -- ${CMAKE_BINARY_DIR}/FORTRAN/superlupara_mod.mod -+ ${CMAKE_BINARY_DIR}/FORTRAN/SUPERLU_MOD.mod -+ ${CMAKE_BINARY_DIR}/FORTRAN/SUPERLUPARA_MOD.mod - ${CMAKE_BINARY_DIR}/FORTRAN/superlu_dist_config.fh - ) - diff --git a/scripts/spack_packages/packages/superlu-dist/xl-611.patch b/scripts/spack_packages/packages/superlu-dist/xl-611.patch deleted file mode 100644 index 92b6a3c7..00000000 --- a/scripts/spack_packages/packages/superlu-dist/xl-611.patch +++ /dev/null @@ -1,26 +0,0 @@ -commit e51132dbd022139933678b3a751a9b3148fafd19 -Author: Satish Balay -Date: Tue Nov 12 16:07:08 2019 -0600 - - add ztrtri_ mapping for xlf - -diff --git a/SRC/Cnames.h b/SRC/Cnames.h -index 792f514..ebef619 100644 ---- a/SRC/Cnames.h -+++ b/SRC/Cnames.h -@@ -179,6 +179,7 @@ at the top-level directory. - #define zher2_ ZHER2 - #define zgeru_ ZGERU - -+#define ztrtri_ ZTRTRI - /* - #define mc64id_dist MC64ID_DIST - #define mc64ad_dist MC64AD_DIST -@@ -307,6 +308,7 @@ at the top-level directory. - #define zher2_ zher2 - #define zgeru_ zgeru - -+#define ztrtri_ ztrtri - /* - #define mc64id_dist mc64id_dist - #define mc64ad_dist mc64ad_dist From 8cb122a49fa653128b68f7b3db9bf796df2a9135 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Fri, 1 May 2026 08:44:15 -0700 Subject: [PATCH 25/29] reenable vtk and trilinos --- .github/workflows/docker_build_tpls.yml | 30 ++++++++++++------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/docker_build_tpls.yml b/.github/workflows/docker_build_tpls.yml index c14ea164..e259faac 100644 --- a/.github/workflows/docker_build_tpls.yml +++ b/.github/workflows/docker_build_tpls.yml @@ -31,7 +31,7 @@ jobs: DOCKER_BASE_IMAGE_REPO: geosx/ubuntu DOCKER_REPOSITORY: geosx/ubuntu24.04-gcc12 GCC_VERSION: 12 - SPEC: "~pygeosx ~docs ~vtk ~trilinos %gcc-12" + SPEC: "~pygeosx ~docs %gcc-12" - name: Ubuntu 24.04 - gcc 13 (docs) RUNS_ON: ubuntu-latest @@ -40,7 +40,7 @@ jobs: DOCKER_BASE_IMAGE_REPO: geosx/ubuntu DOCKER_REPOSITORY: geosx/ubuntu24.04-gcc13 GCC_VERSION: 13 - SPEC: "~pygeosx +docs ~vtk ~trilinos %gcc-13" + SPEC: "~pygeosx +docs %gcc-13" - name: Ubuntu 24.04 - clang 19 RUNS_ON: ubuntu-latest @@ -49,7 +49,7 @@ jobs: DOCKER_BASE_IMAGE_REPO: geosx/ubuntu DOCKER_REPOSITORY: geosx/ubuntu24.04-clang19 CLANG_VERSION: 19 - SPEC: "~pygeosx ~docs ~vtk ~trilinos %clang-19" + SPEC: "~pygeosx ~docs %clang-19" - name: Ubuntu 24.04 - clang 20 RUNS_ON: ubuntu-latest @@ -58,7 +58,7 @@ jobs: DOCKER_BASE_IMAGE_REPO: geosx/ubuntu DOCKER_REPOSITORY: geosx/ubuntu24.04-clang20 CLANG_VERSION: 20 - SPEC: "~pygeosx ~docs ~vtk ~trilinos %clang-20" + SPEC: "~pygeosx ~docs %clang-20" # First Rocky non-CUDA row re-enabled for incremental validation. - name: Rocky Linux 8 - gcc 12 @@ -67,7 +67,7 @@ jobs: DOCKER_BASE_IMAGE_TAG: 8-gcc12 DOCKER_BASE_IMAGE_REPO: geosx/rockylinux DOCKER_REPOSITORY: geosx/rockylinux8-gcc12 - SPEC: "~pygeosx ~docs ~vtk ~trilinos %gcc-12" + SPEC: "~pygeosx ~docs %gcc-12" - name: Rocky Linux 8 - gcc 13 RUNS_ON: ubuntu-latest @@ -75,7 +75,7 @@ jobs: DOCKER_BASE_IMAGE_TAG: 8-gcc13 DOCKER_BASE_IMAGE_REPO: geosx/rockylinux DOCKER_REPOSITORY: geosx/rockylinux8-gcc13 - SPEC: "~pygeosx ~docs ~vtk ~trilinos %gcc-13" + SPEC: "~pygeosx ~docs %gcc-13" - name: Rocky Linux 8 - clang 19 RUNS_ON: ubuntu-latest @@ -83,7 +83,7 @@ jobs: DOCKER_BASE_IMAGE_TAG: 8-clang19 DOCKER_BASE_IMAGE_REPO: geosx/rockylinux DOCKER_REPOSITORY: geosx/rockylinux8-clang19 - SPEC: "~pygeosx ~docs ~vtk ~trilinos %clang-19" + SPEC: "~pygeosx ~docs %clang-19" - name: Rocky Linux 9 - clang 22 RUNS_ON: ubuntu-latest @@ -91,7 +91,7 @@ jobs: DOCKER_BASE_IMAGE_TAG: 9-clang22 DOCKER_BASE_IMAGE_REPO: geosx/rockylinux DOCKER_REPOSITORY: geosx/rockylinux9-clang22 - SPEC: "~pygeosx ~docs ~vtk ~trilinos %clang-22" + SPEC: "~pygeosx ~docs %clang-22" # CUDA restart slice. Keep VTK/Trilinos/docs disabled while # validating the CUDA/toolchain layer. @@ -102,7 +102,7 @@ jobs: DOCKER_BASE_IMAGE_REPO: geosx/ubuntu DOCKER_REPOSITORY: geosx/ubuntu24.04-gcc13-cuda12.9.1 GCC_VERSION: 13 - SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" + SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" # CUDA 13 is blocked by the pinned RAJA package: # raja: '^cuda@13:' conflicts with '+cuda' @@ -113,7 +113,7 @@ jobs: # DOCKER_BASE_IMAGE_REPO: geosx/ubuntu # DOCKER_REPOSITORY: geosx/ubuntu24.04-gcc14-cuda13.2.1 # GCC_VERSION: 14 - # SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %gcc-14 ^cuda@13.2.1+allow-unsupported-compilers" + # SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs %gcc-14 ^cuda@13.2.1+allow-unsupported-compilers" - name: Ubuntu 24.04 - clang 19 + CUDA 12.9.1 RUNS_ON: streak2 @@ -122,7 +122,7 @@ jobs: DOCKER_BASE_IMAGE_REPO: geosx/ubuntu DOCKER_REPOSITORY: geosx/ubuntu24.04-clang19-cuda12.9.1 CLANG_VERSION: 19 - SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %clang-19 ^cuda@12.9.1+allow-unsupported-compilers" + SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs %clang-19 ^cuda@12.9.1+allow-unsupported-compilers" # - name: Ubuntu 24.04 - clang 20 + CUDA 13.2.1 # RUNS_ON: streak2 @@ -131,7 +131,7 @@ jobs: # DOCKER_BASE_IMAGE_REPO: geosx/ubuntu # DOCKER_REPOSITORY: geosx/ubuntu24.04-clang20-cuda13.2.1 # CLANG_VERSION: 20 - # SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %clang-20 ^cuda@13.2.1+allow-unsupported-compilers" + # SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs %clang-20 ^cuda@13.2.1+allow-unsupported-compilers" - name: Rocky Linux 8 - gcc 13 + CUDA 12.9.1 RUNS_ON: streak2 @@ -139,7 +139,7 @@ jobs: DOCKER_BASE_IMAGE_TAG: 8-gcc13-cuda12.9.1 DOCKER_BASE_IMAGE_REPO: geosx/rockylinux DOCKER_REPOSITORY: geosx/rockylinux8-gcc13-cuda12.9.1 - SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" + SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" # Rocky8 clang19 CUDA 12.9.1 is blocked by SuperLU_DIST using # C++11 with CUDA 12.9 + clang19 + GCC 14 libstdc++. @@ -149,7 +149,7 @@ jobs: # DOCKER_BASE_IMAGE_TAG: 8-clang19-cuda12.9.1 # DOCKER_BASE_IMAGE_REPO: geosx/rockylinux # DOCKER_REPOSITORY: geosx/rockylinux8-clang19-cuda12.9.1 - # SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %clang-19 ^cuda@12.9.1+allow-unsupported-compilers" + # SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs %clang-19 ^cuda@12.9.1+allow-unsupported-compilers" # - name: Rocky Linux 9 - gcc 15 + CUDA 13.2.1 # RUNS_ON: streak2 @@ -157,7 +157,7 @@ jobs: # DOCKER_BASE_IMAGE_TAG: 9-gcc15-cuda13.2.1 # DOCKER_BASE_IMAGE_REPO: geosx/rockylinux # DOCKER_REPOSITORY: geosx/rockylinux9-gcc15-cuda13.2.1 - # SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs ~vtk ~trilinos %gcc-15 ^cuda@13.2.1+allow-unsupported-compilers" + # SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs %gcc-15 ^cuda@13.2.1+allow-unsupported-compilers" steps: - name: Checkout From 2c5910aa806c137f9ed4ebe9e51a80d47ee73006 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Fri, 1 May 2026 09:08:36 -0700 Subject: [PATCH 26/29] add hypredrive variants --- .github/workflows/docker_build_tpls.yml | 37 +++++++++++++++++++++++-- scripts/setupLC-TPL-uberenv.bash | 11 +++++--- 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker_build_tpls.yml b/.github/workflows/docker_build_tpls.yml index e259faac..ed25a2c0 100644 --- a/.github/workflows/docker_build_tpls.yml +++ b/.github/workflows/docker_build_tpls.yml @@ -42,6 +42,15 @@ jobs: GCC_VERSION: 13 SPEC: "~pygeosx +docs %gcc-13" + - name: Ubuntu 24.04 - gcc 13 (+docs +hypredrive) + RUNS_ON: ubuntu-latest + TPL_DOCKERFILE: docker/tpl-ubuntu.Dockerfile + DOCKER_BASE_IMAGE_TAG: 24.04-gcc13 + DOCKER_BASE_IMAGE_REPO: geosx/ubuntu + DOCKER_REPOSITORY: geosx/ubuntu24.04-gcc13-hypredrive + GCC_VERSION: 13 + SPEC: "~pygeosx +docs +hypredrive %gcc-13" + - name: Ubuntu 24.04 - clang 19 RUNS_ON: ubuntu-latest TPL_DOCKERFILE: docker/tpl-ubuntu.Dockerfile @@ -77,6 +86,14 @@ jobs: DOCKER_REPOSITORY: geosx/rockylinux8-gcc13 SPEC: "~pygeosx ~docs %gcc-13" + - name: Rocky Linux 8 - gcc 13 (+hypredrive) + RUNS_ON: ubuntu-latest + TPL_DOCKERFILE: docker/tpl-rockylinux.Dockerfile + DOCKER_BASE_IMAGE_TAG: 8-gcc13 + DOCKER_BASE_IMAGE_REPO: geosx/rockylinux + DOCKER_REPOSITORY: geosx/rockylinux8-gcc13-hypredrive + SPEC: "~pygeosx ~docs +hypredrive %gcc-13" + - name: Rocky Linux 8 - clang 19 RUNS_ON: ubuntu-latest TPL_DOCKERFILE: docker/tpl-rockylinux.Dockerfile @@ -93,8 +110,7 @@ jobs: DOCKER_REPOSITORY: geosx/rockylinux9-clang22 SPEC: "~pygeosx ~docs %clang-22" - # CUDA restart slice. Keep VTK/Trilinos/docs disabled while - # validating the CUDA/toolchain layer. + # CUDA restart slice. - name: Ubuntu 24.04 - gcc 13 + CUDA 12.9.1 RUNS_ON: streak2 TPL_DOCKERFILE: docker/tpl-ubuntu.Dockerfile @@ -104,6 +120,15 @@ jobs: GCC_VERSION: 13 SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" + - name: Ubuntu 24.04 - gcc 13 + CUDA 12.9.1 (+hypredrive) + RUNS_ON: streak2 + TPL_DOCKERFILE: docker/tpl-ubuntu.Dockerfile + DOCKER_BASE_IMAGE_TAG: 24.04-gcc13-cuda12.9.1 + DOCKER_BASE_IMAGE_REPO: geosx/ubuntu + DOCKER_REPOSITORY: geosx/ubuntu24.04-gcc13-cuda12.9.1-hypredrive + GCC_VERSION: 13 + SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs +hypredrive %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" + # CUDA 13 is blocked by the pinned RAJA package: # raja: '^cuda@13:' conflicts with '+cuda' # - name: Ubuntu 24.04 - gcc 14 + CUDA 13.2.1 @@ -141,6 +166,14 @@ jobs: DOCKER_REPOSITORY: geosx/rockylinux8-gcc13-cuda12.9.1 SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" + - name: Rocky Linux 8 - gcc 13 + CUDA 12.9.1 (+hypredrive) + RUNS_ON: streak2 + TPL_DOCKERFILE: docker/tpl-rockylinux.Dockerfile + DOCKER_BASE_IMAGE_TAG: 8-gcc13-cuda12.9.1 + DOCKER_BASE_IMAGE_REPO: geosx/rockylinux + DOCKER_REPOSITORY: geosx/rockylinux8-gcc13-cuda12.9.1-hypredrive + SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs +hypredrive %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" + # Rocky8 clang19 CUDA 12.9.1 is blocked by SuperLU_DIST using # C++11 with CUDA 12.9 + clang19 + GCC 14 libstdc++. # - name: Rocky Linux 8 - clang 19 + CUDA 12.9.1 diff --git a/scripts/setupLC-TPL-uberenv.bash b/scripts/setupLC-TPL-uberenv.bash index 454a10cc..851a851c 100755 --- a/scripts/setupLC-TPL-uberenv.bash +++ b/scripts/setupLC-TPL-uberenv.bash @@ -91,22 +91,25 @@ function launch_jobs() { ALLOC_CMD="srun -N 1 --exclusive -t 60 -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 gcc-13-hypredrive "+docs +hypredrive %%gcc-13 ${COMMON}" "${ALLOC_CMD}" "$@" & "${UBERENV_HELPER}" "$INSTALL_DIR" dane llvm-14 "+docs %%clang-14 ${COMMON}" "${ALLOC_CMD}" "$@" & "${UBERENV_HELPER}" "$INSTALL_DIR" dane llvm-19 "+docs %%clang-19 ${COMMON}" "${ALLOC_CMD}" "$@" & ;; matrix) ALLOC_CMD="srun -N 1 --exclusive -t 60 -A vortex" - "${UBERENV_HELPER}" "$INSTALL_DIR" matrix gcc-12-cuda-12.6 "+cuda~uncrustify cuda_arch=90 %%gcc-12 ^cuda@12.6.0+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & - "${UBERENV_HELPER}" "$INSTALL_DIR" matrix gcc-13-cuda-12.9 "+cuda~uncrustify cuda_arch=90 %%gcc-13 ^cuda@12.9.1+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & - "${UBERENV_HELPER}" "$INSTALL_DIR" matrix llvm-14-cuda-12.6 "+cuda~uncrustify cuda_arch=90 %%clang-14 ^cuda@12.6.0+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & - "${UBERENV_HELPER}" "$INSTALL_DIR" matrix llvm-19-cuda-12.9 "+cuda~uncrustify cuda_arch=90 %%clang-19 ^cuda@12.9.1+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" matrix gcc-12-cuda-12.6 "+cuda ~uncrustify cuda_arch=90 %%gcc-12 ^cuda@12.6.0+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" matrix gcc-13-cuda-12.9 "+cuda ~uncrustify cuda_arch=90 %%gcc-13 ^cuda@12.9.1+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" matrix gcc-13-cuda-12.9-hypredrive "+cuda ~uncrustify +hyperdrive cuda_arch=90 %%gcc-13 ^cuda@12.9.1+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" matrix llvm-14-cuda-12.6 "+cuda ~uncrustify cuda_arch=90 %%clang-14 ^cuda@12.6.0+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" matrix llvm-19-cuda-12.9 "+cuda ~uncrustify cuda_arch=90 %%clang-19 ^cuda@12.9.1+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & ;; tuo|tuolumne) ALLOC_CMD="salloc -N 1 --exclusive -p pdebug -t 60 -A vortex" "${UBERENV_HELPER}" "$INSTALL_DIR" tuolumne cce-20-rocm-6.4.3 "+rocm~pygeosx~trilinos~petsc~docs amdgpu_target=gfx942 %%cce-20 ${COMMON}" "${ALLOC_CMD}" "$@" & "${UBERENV_HELPER}" "$INSTALL_DIR" tuolumne llvm-amdgpu-6.4.3 "+rocm~pygeosx~trilinos~petsc~docs amdgpu_target=gfx942 %%llvm-amdgpu_6_4_3 ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" tuolumne llvm-amdgpu-6.4.3-hypredrive "+rocm~pygeosx~trilinos~petsc~docs+hyperdrive amdgpu_target=gfx942 %%llvm-amdgpu_6_4_3 ${COMMON}" "${ALLOC_CMD}" "$@" & ;; *) From 2ef0f01472ebc8ce13dd45b3b9c808a5c3f59a16 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Sat, 2 May 2026 19:36:09 -0700 Subject: [PATCH 27/29] build for both sm_86 and sm_120 --- .github/workflows/docker_build_tpls.yml | 18 +++++++++--------- .../spack_packages/packages/geosx/package.py | 18 ++++++++++++------ 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/.github/workflows/docker_build_tpls.yml b/.github/workflows/docker_build_tpls.yml index ed25a2c0..aa561125 100644 --- a/.github/workflows/docker_build_tpls.yml +++ b/.github/workflows/docker_build_tpls.yml @@ -118,7 +118,7 @@ jobs: DOCKER_BASE_IMAGE_REPO: geosx/ubuntu DOCKER_REPOSITORY: geosx/ubuntu24.04-gcc13-cuda12.9.1 GCC_VERSION: 13 - SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" + SPEC: "+cuda cuda_arch=86,120 ~openmp ~pygeosx ~docs %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" - name: Ubuntu 24.04 - gcc 13 + CUDA 12.9.1 (+hypredrive) RUNS_ON: streak2 @@ -127,7 +127,7 @@ jobs: DOCKER_BASE_IMAGE_REPO: geosx/ubuntu DOCKER_REPOSITORY: geosx/ubuntu24.04-gcc13-cuda12.9.1-hypredrive GCC_VERSION: 13 - SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs +hypredrive %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" + SPEC: "+cuda cuda_arch=86,120 ~openmp ~pygeosx ~docs +hypredrive %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" # CUDA 13 is blocked by the pinned RAJA package: # raja: '^cuda@13:' conflicts with '+cuda' @@ -138,7 +138,7 @@ jobs: # DOCKER_BASE_IMAGE_REPO: geosx/ubuntu # DOCKER_REPOSITORY: geosx/ubuntu24.04-gcc14-cuda13.2.1 # GCC_VERSION: 14 - # SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs %gcc-14 ^cuda@13.2.1+allow-unsupported-compilers" + # SPEC: "+cuda cuda_arch=86,120 ~openmp ~pygeosx ~docs %gcc-14 ^cuda@13.2.1+allow-unsupported-compilers" - name: Ubuntu 24.04 - clang 19 + CUDA 12.9.1 RUNS_ON: streak2 @@ -147,7 +147,7 @@ jobs: DOCKER_BASE_IMAGE_REPO: geosx/ubuntu DOCKER_REPOSITORY: geosx/ubuntu24.04-clang19-cuda12.9.1 CLANG_VERSION: 19 - SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs %clang-19 ^cuda@12.9.1+allow-unsupported-compilers" + SPEC: "+cuda cuda_arch=86,120 ~openmp ~pygeosx ~docs %clang-19 ^cuda@12.9.1+allow-unsupported-compilers" # - name: Ubuntu 24.04 - clang 20 + CUDA 13.2.1 # RUNS_ON: streak2 @@ -156,7 +156,7 @@ jobs: # DOCKER_BASE_IMAGE_REPO: geosx/ubuntu # DOCKER_REPOSITORY: geosx/ubuntu24.04-clang20-cuda13.2.1 # CLANG_VERSION: 20 - # SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs %clang-20 ^cuda@13.2.1+allow-unsupported-compilers" + # SPEC: "+cuda cuda_arch=86,120 ~openmp ~pygeosx ~docs %clang-20 ^cuda@13.2.1+allow-unsupported-compilers" - name: Rocky Linux 8 - gcc 13 + CUDA 12.9.1 RUNS_ON: streak2 @@ -164,7 +164,7 @@ jobs: DOCKER_BASE_IMAGE_TAG: 8-gcc13-cuda12.9.1 DOCKER_BASE_IMAGE_REPO: geosx/rockylinux DOCKER_REPOSITORY: geosx/rockylinux8-gcc13-cuda12.9.1 - SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" + SPEC: "+cuda cuda_arch=86,120 ~openmp ~pygeosx ~docs %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" - name: Rocky Linux 8 - gcc 13 + CUDA 12.9.1 (+hypredrive) RUNS_ON: streak2 @@ -172,7 +172,7 @@ jobs: DOCKER_BASE_IMAGE_TAG: 8-gcc13-cuda12.9.1 DOCKER_BASE_IMAGE_REPO: geosx/rockylinux DOCKER_REPOSITORY: geosx/rockylinux8-gcc13-cuda12.9.1-hypredrive - SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs +hypredrive %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" + SPEC: "+cuda cuda_arch=86,120 ~openmp ~pygeosx ~docs +hypredrive %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers" # Rocky8 clang19 CUDA 12.9.1 is blocked by SuperLU_DIST using # C++11 with CUDA 12.9 + clang19 + GCC 14 libstdc++. @@ -182,7 +182,7 @@ jobs: # DOCKER_BASE_IMAGE_TAG: 8-clang19-cuda12.9.1 # DOCKER_BASE_IMAGE_REPO: geosx/rockylinux # DOCKER_REPOSITORY: geosx/rockylinux8-clang19-cuda12.9.1 - # SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs %clang-19 ^cuda@12.9.1+allow-unsupported-compilers" + # SPEC: "+cuda cuda_arch=86,120 ~openmp ~pygeosx ~docs %clang-19 ^cuda@12.9.1+allow-unsupported-compilers" # - name: Rocky Linux 9 - gcc 15 + CUDA 13.2.1 # RUNS_ON: streak2 @@ -190,7 +190,7 @@ jobs: # DOCKER_BASE_IMAGE_TAG: 9-gcc15-cuda13.2.1 # DOCKER_BASE_IMAGE_REPO: geosx/rockylinux # DOCKER_REPOSITORY: geosx/rockylinux9-gcc15-cuda13.2.1 - # SPEC: "+cuda cuda_arch=86 ~openmp ~pygeosx ~docs %gcc-15 ^cuda@13.2.1+allow-unsupported-compilers" + # SPEC: "+cuda cuda_arch=86,120 ~openmp ~pygeosx ~docs %gcc-15 ^cuda@13.2.1+allow-unsupported-compilers" steps: - name: Checkout diff --git a/scripts/spack_packages/packages/geosx/package.py b/scripts/spack_packages/packages/geosx/package.py index 538b6087..c7997d6a 100644 --- a/scripts/spack_packages/packages/geosx/package.py +++ b/scripts/spack_packages/packages/geosx/package.py @@ -464,9 +464,12 @@ def geos_hostconfig(self, spec, prefix, py_site_pkgs_dir=None): cmake_cuda_flags += ' -Xcompiler ' + compilerArg if not spec.satisfies('cuda_arch=none'): - cuda_arch = spec.variants['cuda_arch'].value - cmake_cuda_flags += ' -arch sm_{0}'.format(cuda_arch[0]) - cfg.write(cmake_cache_string('CMAKE_CUDA_ARCHITECTURES', cuda_arch[0])) + cuda_arches = [str(arch) for arch in spec.variants['cuda_arch'].value] + for cuda_arch in cuda_arches: + cmake_cuda_flags += ( + ' -gencode arch=compute_{0},code=sm_{0}'.format(cuda_arch) + ) + cfg.write(cmake_cache_string('CMAKE_CUDA_ARCHITECTURES', ';'.join(cuda_arches))) cfg.write(cmake_cache_string('CMAKE_CUDA_FLAGS', cmake_cuda_flags)) @@ -795,9 +798,12 @@ def lvarray_hostconfig(self, spec, prefix, py_site_pkgs_dir=None): cmake_cuda_flags += ' -Xcompiler ' + compilerArg if not spec.satisfies('cuda_arch=none'): - cuda_arch = spec.variants['cuda_arch'].value - cmake_cuda_flags += ' -arch sm_{0}'.format(cuda_arch[0]) - cfg.write(cmake_cache_string('CMAKE_CUDA_ARCHITECTURES', cuda_arch[0])) + cuda_arches = [str(arch) for arch in spec.variants['cuda_arch'].value] + for cuda_arch in cuda_arches: + cmake_cuda_flags += ( + ' -gencode arch=compute_{0},code=sm_{0}'.format(cuda_arch) + ) + cfg.write(cmake_cache_string('CMAKE_CUDA_ARCHITECTURES', ';'.join(cuda_arches))) cfg.write(cmake_cache_string('CMAKE_CUDA_FLAGS', cmake_cuda_flags)) From 2394ed259bec3bfb53bc24dbe4dbe7d390bbec85 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Mon, 4 May 2026 23:44:53 -0700 Subject: [PATCH 28/29] fix typo in LC builds. delete unused files --- docker/tpl-centos-gcc-cuda.Dockerfile | 120 ------------- .../tpl-rockylinux-clang-cuda-12.Dockerfile | 135 -------------- docker/tpl-rockylinux-gcc-cuda-12.Dockerfile | 121 ------------- docker/tpl-ubuntu-clang-cuda.Dockerfile | 101 ----------- docker/tpl-ubuntu-clang.Dockerfile | 140 --------------- docker/tpl-ubuntu-gcc.Dockerfile | 158 ---------------- docker/ubuntu20-clang-cuda-spack.yaml | 169 ------------------ scripts/setupLC-TPL-uberenv.bash | 4 +- 8 files changed, 2 insertions(+), 946 deletions(-) delete mode 100644 docker/tpl-centos-gcc-cuda.Dockerfile delete mode 100644 docker/tpl-rockylinux-clang-cuda-12.Dockerfile delete mode 100644 docker/tpl-rockylinux-gcc-cuda-12.Dockerfile delete mode 100644 docker/tpl-ubuntu-clang-cuda.Dockerfile delete mode 100644 docker/tpl-ubuntu-clang.Dockerfile delete mode 100644 docker/tpl-ubuntu-gcc.Dockerfile delete mode 100644 docker/ubuntu20-clang-cuda-spack.yaml diff --git a/docker/tpl-centos-gcc-cuda.Dockerfile b/docker/tpl-centos-gcc-cuda.Dockerfile deleted file mode 100644 index c82daa32..00000000 --- a/docker/tpl-centos-gcc-cuda.Dockerfile +++ /dev/null @@ -1,120 +0,0 @@ -# NOTE: see docker/tpl-ubuntu-gcc.Dockerfile for detailed comments -ARG TMP_DIR=/tmp -ARG SRC_DIR=$TMP_DIR/thirdPartyLibs -ARG BLD_DIR=$TMP_DIR/build - -FROM nvidia/cuda:11.8.0-devel-centos7 AS tpl_toolchain_intersect_geosx_toolchain -ARG SRC_DIR - -ARG INSTALL_DIR -ENV GEOSX_TPL_DIR=$INSTALL_DIR - -RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo && \ - sed -i s/^#.*baseurl=http/baseurl=https/g /etc/yum.repos.d/*.repo && \ - sed -i s/^mirrorlist=http/#mirrorlist=https/g /etc/yum.repos.d/*.repo - -# Using gcc 8.3.1 provided by the Software Collections (SCL). -RUN yum install -y \ - centos-release-scl - -# Modify the SCLo repository configuration -RUN sed -i 's|^mirrorlist=|#mirrorlist=|g' /etc/yum.repos.d/CentOS-SCLo-scl.repo && \ - sed -i 's|^baseurl=http://mirror.centos.org/centos/\$releasever/sclo/\$basearch/rh|baseurl=http://vault.centos.org/7.9.2009/sclo/x86_64/rh|g' /etc/yum.repos.d/CentOS-SCLo-scl.repo && \ - sed -i 's|^mirrorlist=|#mirrorlist=|g' /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo && \ - sed -i 's|^baseurl=http://mirror.centos.org/centos/\$releasever/sclo/\$basearch/rh|baseurl=http://vault.centos.org/7.9.2009/sclo/x86_64/rh|g' /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo - -# Install necessary tools and update the system -RUN yum -y update && \ - yum -y install yum-utils - -RUN yum install -y \ - devtoolset-8-gcc \ - devtoolset-8-gcc-c++ \ - devtoolset-8-gcc-gfortran - -# Installing dependencies -RUN yum -y install \ - ca-certificates \ - curl \ - tbb \ - blas-devel \ - lapack-devel \ - zlib-devel \ - openmpi-devel \ - python3 \ -# Additional spack dependencies - python3-pip \ - # pkgconfig \ - # xz \ - unzip \ - bzip2 \ - gnupg \ - && pip3 install virtualenv - -# Install clingo for Spack -RUN python3 -m pip install --upgrade pip && \ - python3 -m pip install clingo - -RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-cmake.sh - -# Installing TPL's -FROM tpl_toolchain_intersect_geosx_toolchain AS tpl_toolchain -ARG SRC_DIR -ARG BLD_DIR - -RUN yum install -y \ - tbb-devel \ - make \ - bc \ - file \ - patch \ - ca-certificates \ - autoconf \ - automake \ - git - -# Run uberenv -# Have to create install directory first for uberenv -# -k flag is to ignore SSL errors -RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \ - mkdir -p ${GEOSX_TPL_DIR} && \ -# Create symlink to openmpi include directory - ln -s /usr/include/openmpi-x86_64 /usr/lib64/openmpi/include && \ - ./scripts/uberenv/uberenv.py \ - --spec "%gcc@8+cuda~uncrustify~openmp~pygeosx cuda_arch=86 ^cuda@11.8.0+allow-unsupported-compilers ^caliper~gotcha~sampler~libunwind~libdw~papi" \ - --spack-env-file=${SRC_DIR}/docker/ubuntu-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 - cp *.cmake /spack-generated.cmake && \ -# Remove extraneous spack files - cd ${GEOSX_TPL_DIR} && \ - rm -rf bin/ build_stage/ misc_cache/ spack/ spack_env/ .spack-db/ - -# Extract only TPL's from previous stage -FROM tpl_toolchain_intersect_geosx_toolchain AS geosx_toolchain -ARG SRC_DIR - -COPY --from=tpl_toolchain $GEOSX_TPL_DIR $GEOSX_TPL_DIR - -# Extract the generated host-config -COPY --from=tpl_toolchain /spack-generated.cmake / - -RUN yum install -y \ - openssh-client \ - ca-certificates \ - curl \ - python3 \ - texlive \ - graphviz \ - git && \ -# Regenerate symlink to openmpi include directory - ln -s /usr/include/openmpi-x86_64 /usr/lib64/openmpi/include - -RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-ninja.sh - -RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-sccache.sh -ENV SCCACHE=/opt/sccache/bin/sccache diff --git a/docker/tpl-rockylinux-clang-cuda-12.Dockerfile b/docker/tpl-rockylinux-clang-cuda-12.Dockerfile deleted file mode 100644 index 9e738305..00000000 --- a/docker/tpl-rockylinux-clang-cuda-12.Dockerfile +++ /dev/null @@ -1,135 +0,0 @@ -# NOTE: see docker/tpl-ubuntu-gcc.Dockerfile for detailed comments -ARG TMP_DIR=/tmp -ARG SRC_DIR=$TMP_DIR/thirdPartyLibs -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 \ - clang-17.0.6 \ - gcc-toolset-13 \ - python3 \ - zlib-devel \ - tbb \ - blas \ - lapack \ - openmpi \ - openmpi-devel \ - python3-pip \ - unzip \ - mpfr-devel \ - bzip2 \ - gnupg \ - xz \ - python3-virtualenv - -# Install clingo for Spack -RUN (python3 -m pip --version >/dev/null 2>&1 || \ - python3 -m ensurepip --upgrade || \ - (dnf -y install python3.12-pip || dnf -y install python3-pip)) && \ - python3 -m pip install --upgrade pip && \ - python3 -m pip install clingo - -RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-cmake.sh - -# Installing TPL's -FROM tpl_toolchain_intersect_geosx_toolchain AS tpl_toolchain -ARG SRC_DIR -ARG BLD_DIR -ARG SPEC - -RUN dnf -y install \ - tbb-devel \ - bc \ - file \ - patch \ - ca-certificates \ - autoconf \ - automake \ - m4 \ - git - -# 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 - ln -s /usr/include/openmpi-x86_64 /usr/lib64/openmpi/include && \ -# 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 && \ - GEOSX_SPEC="${SPEC}" && \ - if [ -z "${GEOSX_SPEC}" ] || [ "${GEOSX_SPEC}" = "undefined" ]; then GEOSX_SPEC="+cuda~uncrustify~openmp~pygeosx cuda_arch=86 %clang-17 ^cuda@12.9.1+allow-unsupported-compilers ^caliper~gotcha~sampler~libunwind~libdw~papi"; fi && \ - scl enable gcc-toolset-13 ' \ - ./scripts/uberenv/uberenv.py \ - --spec "'"${GEOSX_SPEC}"'" \ - --spack-env-file=${SRC_DIR}/docker/rocky-spack.yaml \ - --project-json=.uberenv_config.json \ - --prefix ${GEOSX_TPL_DIR} \ - -k ' && \ - rm -f lvarray* && \ - cp *.cmake /spack-generated.cmake && \ -# Remove extraneous spack files - cd ${GEOSX_TPL_DIR} && \ - rm -rf bin/ build_stage/ builtin_spack_packages_repo/ misc_cache/ spack/ spack_env/ .spack-db/ - -# Extract only TPL's from the previous stage -FROM tpl_toolchain_intersect_geosx_toolchain AS geosx_toolchain -ARG SRC_DIR - -COPY --from=tpl_toolchain $GEOSX_TPL_DIR $GEOSX_TPL_DIR - -# The generated host-config may reference these wrappers as compilers, so they -# must exist in the final image (not just the build stage). -COPY --from=tpl_toolchain /usr/local/bin/clang-gcc13 /usr/local/bin/clang-gcc13 -COPY --from=tpl_toolchain /usr/local/bin/clang++-gcc13 /usr/local/bin/clang++-gcc13 - -# Extract the generated host-config -COPY --from=tpl_toolchain /spack-generated.cmake / - -# Install required packages using dnf -RUN dnf clean all && \ - rm -rf /var/cache/dnf && \ - dnf -y install \ - openssh-clients \ - ca-certificates \ - curl \ - python3 \ - texlive \ - graphviz \ - ninja-build \ - git && \ -# Regenerate symlink to openmpi include directory - ln -s /usr/include/openmpi-x86_64 /usr/lib64/openmpi/include && \ -# Regenerate 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 - -# Run the installation script -RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-sccache.sh -ENV SCCACHE=/opt/sccache/bin/sccache diff --git a/docker/tpl-rockylinux-gcc-cuda-12.Dockerfile b/docker/tpl-rockylinux-gcc-cuda-12.Dockerfile deleted file mode 100644 index 5c727a6b..00000000 --- a/docker/tpl-rockylinux-gcc-cuda-12.Dockerfile +++ /dev/null @@ -1,121 +0,0 @@ -ARG TMP_DIR=/tmp -ARG SRC_DIR=$TMP_DIR/thirdPartyLibs -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 \ - which \ - gcc-toolset-13 \ - python3 \ - zlib-devel \ - tbb \ - blas \ - lapack \ - openmpi \ - openmpi-devel \ - # Additional spack dependencies - python3-pip \ - unzip \ - mpfr-devel \ - bzip2 \ - gnupg \ - xz \ - python3-virtualenv - -# Install clingo for Spack -RUN (python3 -m pip --version >/dev/null 2>&1 || \ - python3 -m ensurepip --upgrade || \ - (dnf -y install python3.12-pip || dnf -y install python3-pip)) && \ - python3 -m pip install --upgrade pip && \ - python3 -m pip install clingo - -# Custom install script for CMake or other tools -RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-cmake.sh - -# Installing TPL's -FROM tpl_toolchain_intersect_geosx_toolchain AS tpl_toolchain -ARG SRC_DIR -ARG BLD_DIR -ARG SPEC - -# Install additional required packages -RUN dnf clean all && \ - dnf -y update && \ - dnf -y install \ - tbb-devel \ - bc \ - file \ - patch \ - ca-certificates \ - autoconf \ - automake \ - m4 \ - git - -# Run uberenv -# Have to create install directory first for uberenv -# -k flag is to ignore SSL errors -RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \ - mkdir -p ${GEOSX_TPL_DIR} && \ -# Create symlink to openmpi include directory - ln -s /usr/include/openmpi-x86_64 /usr/lib64/openmpi/include && \ -# 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 && \ - GEOSX_SPEC="${SPEC}" && \ - if [ -z "${GEOSX_SPEC}" ] || [ "${GEOSX_SPEC}" = "undefined" ]; then GEOSX_SPEC="+cuda~uncrustify~openmp~pygeosx lai=hypre cuda_arch=86 %gcc-13 ^cuda@12.9.1+allow-unsupported-compilers ^caliper~gotcha~sampler~libunwind~libdw~papi"; fi && \ - ./scripts/uberenv/uberenv.py \ - --spec "${GEOSX_SPEC}" \ - --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 - cp *.cmake /spack-generated.cmake && \ -# Remove extraneous spack files - cd ${GEOSX_TPL_DIR} && \ - rm -rf bin/ build_stage/ builtin_spack_packages_repo/ misc_cache/ spack/ spack_env/ .spack-db/ - -# Extract only TPL's from the previous stage -FROM tpl_toolchain_intersect_geosx_toolchain AS geosx_toolchain -ARG SRC_DIR - -COPY --from=tpl_toolchain $GEOSX_TPL_DIR $GEOSX_TPL_DIR - -# Extract the generated host-config -COPY --from=tpl_toolchain /spack-generated.cmake / - -# Final installation of packages and tools -RUN dnf clean all && \ - rm -rf /var/cache/dnf && \ - dnf -y install dnf-plugins-core && \ - dnf config-manager --set-enabled devel && \ - dnf -y update && \ - dnf -y install \ - openssh-clients \ - ca-certificates \ - curl \ - python3 \ - texlive \ - graphviz \ - ninja-build \ - git && \ -# Regenerate symlink to openmpi include directory - ln -s /usr/include/openmpi-x86_64 /usr/lib64/openmpi/include && \ -# Regenerate 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 - -# Install sccache -RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-sccache.sh -ENV SCCACHE=/opt/sccache/bin/sccache diff --git a/docker/tpl-ubuntu-clang-cuda.Dockerfile b/docker/tpl-ubuntu-clang-cuda.Dockerfile deleted file mode 100644 index 4a915408..00000000 --- a/docker/tpl-ubuntu-clang-cuda.Dockerfile +++ /dev/null @@ -1,101 +0,0 @@ -# NOTE: see docker/tpl-ubuntu-gcc.Dockerfile for detailed comments -ARG TMP_DIR=/tmp -ARG SRC_DIR=$TMP_DIR/thirdPartyLibs -ARG BLD_DIR=$TMP_DIR/build - -FROM nvidia/cuda:11.8.0-devel-ubuntu20.04 AS tpl_toolchain_intersect_geosx_toolchain -ARG SRC_DIR - -ARG INSTALL_DIR -ENV GEOSX_TPL_DIR=$INSTALL_DIR - -# Installing dependencies -RUN ln -fs /usr/share/zoneinfo/America/Los_Angeles /etc/localtime && \ - rm /etc/apt/sources.list.d/*.list && \ - apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - gfortran \ - libtbb2 \ - libblas-dev \ - liblapack-dev \ - zlib1g-dev \ - openmpi-bin \ - libopenmpi-dev \ - python3 \ - python3-dev \ - clang \ -# Additional spack dependencies - python3-pip \ - pkg-config \ - xz-utils \ - unzip \ - libmpfr-dev \ - lbzip2 \ - bzip2 \ - gnupg \ - virtualenv - -# Install clingo for Spack -RUN python3 -m pip install --upgrade pip && \ - python3 -m pip install clingo - -RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-cmake.sh - -# Installing TPL's -FROM tpl_toolchain_intersect_geosx_toolchain AS tpl_toolchain -ARG SRC_DIR -ARG BLD_DIR -ARG SPEC - -RUN apt-get install -y --no-install-recommends \ - libtbb-dev \ - bc \ - file \ - patch \ - ca-certificates \ - git - -# Run uberenv -# Have to create install directory first for uberenv -# -k flag is to ignore SSL errors -RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \ - mkdir -p ${GEOSX_TPL_DIR} && \ - GEOSX_SPEC="${SPEC}" && \ - if [ -z "${GEOSX_SPEC}" ] || [ "${GEOSX_SPEC}" = "undefined" ]; then GEOSX_SPEC="+cuda~uncrustify~openmp~pygeosx cuda_arch=86 %clang-10 ^cuda@11.8.0+allow-unsupported-compilers ^caliper~gotcha~sampler~libunwind~libdw~papi"; fi && \ - ./scripts/uberenv/uberenv.py \ - --spec "${GEOSX_SPEC}" \ - --spack-env-file=${SRC_DIR}/docker/ubuntu20-clang-cuda-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 - cp *.cmake /spack-generated.cmake && \ -# Remove extraneous spack files - cd ${GEOSX_TPL_DIR} && \ - rm -rf bin/ build_stage/ builtin_spack_packages_repo/ misc_cache/ spack/ spack_env/ .spack-db/ - - -# Extract only TPL's from previous stage -FROM tpl_toolchain_intersect_geosx_toolchain AS geosx_toolchain -ARG SRC_DIR - -COPY --from=tpl_toolchain $GEOSX_TPL_DIR $GEOSX_TPL_DIR - -# Extract the generated host-config -COPY --from=tpl_toolchain /spack-generated.cmake / - -RUN apt-get install -y --no-install-recommends \ - openssh-client \ - ca-certificates \ - curl \ - python3 \ - texlive \ - graphviz \ - ninja-build - -RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-sccache.sh -ENV SCCACHE=/opt/sccache/bin/sccache diff --git a/docker/tpl-ubuntu-clang.Dockerfile b/docker/tpl-ubuntu-clang.Dockerfile deleted file mode 100644 index dc3c9020..00000000 --- a/docker/tpl-ubuntu-clang.Dockerfile +++ /dev/null @@ -1,140 +0,0 @@ -# NOTE: see docker/tpl-ubuntu-gcc.Dockerfile for detailed comments -ARG TMP_DIR=/tmp -ARG SRC_DIR=$TMP_DIR/thirdPartyLibs -ARG BLD_DIR=$TMP_DIR/build - -ARG DOCKER_ROOT_IMAGE - -FROM $DOCKER_ROOT_IMAGE AS tpl_toolchain_intersect_geosx_toolchain -ARG SRC_DIR - -ARG INSTALL_DIR -ENV GEOSX_TPL_DIR=$INSTALL_DIR - -ARG CLANG_MAJOR_VERSION - -RUN apt-get update - -# Installing dependencies -RUN DEBIAN_FRONTEND=noninteractive TZ=America/Los_Angeles \ - apt-get install -y --no-install-recommends \ - clang-$CLANG_MAJOR_VERSION \ - libomp-$CLANG_MAJOR_VERSION-dev \ - ca-certificates \ - curl \ - libtbb2 \ - libblas-dev \ - liblapack-dev \ - zlib1g-dev \ - openmpi-bin \ - libopenmpi-dev \ - python3 \ - python3-dev \ - python3-pip \ - python3-sphinx \ - doxygen \ - pkg-config \ - xz-utils \ - unzip \ - libmpfr-dev \ - lbzip2 \ - bzip2 \ - gnupg \ - virtualenv - -# Install clingo for Spack -RUN python3 -m pip install --upgrade pip && \ - python3 -m pip install clingo - -# Install CMake -RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-cmake.sh - -# Installing TPLs -FROM tpl_toolchain_intersect_geosx_toolchain AS tpl_toolchain -ARG SRC_DIR -ARG BLD_DIR -ARG SPEC - -ARG GCC_MAJOR_VERSION - -RUN apt-get install -y --no-install-recommends \ - gfortran-$GCC_MAJOR_VERSION \ - g++-$GCC_MAJOR_VERSION \ - libtbb-dev \ - make \ - bc \ - file \ -# GEOS patches some tpl. Remove when it's not the case anymore. - patch \ -# `ca-certificates` needed by `git` to download spack repo. - ca-certificates \ - git - -# Add MPI environment path info -ENV CC=/usr/bin/gcc-$GCC_MAJOR_VERSION \ - CXX=/usr/bin/g++-$GCC_MAJOR_VERSION \ - MPICC=/usr/bin/mpicc \ - MPICXX=/usr/bin/mpicxx \ - MPIEXEC=/usr/bin/mpirun -# The multi-line definition of arguments does not seem happy -# when a variable uses the value of another variable previously defined on the same line. -ENV OMPI_CC=$CC \ - OMPI_CXX=$CXX - -# Run uberenv -# Have to create install directory first for uberenv -# -k flag is to ignore SSL errors -RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \ - mkdir -p ${GEOSX_TPL_DIR} && \ -# Create symlinks to g++ libraries - ln -s /usr/bin/g++-${GCC_MAJOR_VERSION} /usr/bin/g++ && \ - GEOSX_SPEC="${SPEC}" && \ - if [ -z "${GEOSX_SPEC}" ] || [ "${GEOSX_SPEC}" = "undefined" ]; then GEOSX_SPEC="~shared~openmp+docs %clang-${CLANG_MAJOR_VERSION} ^caliper~gotcha~sampler~libunwind~libdw~papi"; fi && \ - ./scripts/uberenv/uberenv.py \ - --spec "${GEOSX_SPEC}" \ - --spack-env-file=${SRC_DIR}/docker/ubuntu-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 - cp *.cmake /spack-generated.cmake && \ -# Remove extraneous spack files - cd ${GEOSX_TPL_DIR} && \ - rm -rf bin/ build_stage/ builtin_spack_packages_repo/ misc_cache/ spack/ spack_env/ .spack-db/ - -# Extract only TPLs from previous stage -FROM tpl_toolchain_intersect_geosx_toolchain AS geosx_toolchain -ARG SRC_DIR - -COPY --from=tpl_toolchain $GEOSX_TPL_DIR $GEOSX_TPL_DIR - -# Extract the generated host-config -COPY --from=tpl_toolchain /spack-generated.cmake / - -RUN DEBIAN_FRONTEND=noninteractive TZ=America/Los_Angeles \ - apt-get install -y --no-install-recommends \ - openssh-client \ - ca-certificates \ - curl \ - python3 \ - texlive \ - texlive-latex-extra \ - graphviz \ - libxml2-utils \ - git \ - ghostscript \ - ninja-build \ -## Necessary dependencies for pygeosx unit tests - python3-dev \ - python3-sphinx \ - python3-mpi4py \ - python3-scipy \ - python3-virtualenv \ - python3-matplotlib \ - python3-venv \ - python3-pytest - -RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-sccache.sh -ENV SCCACHE=/opt/sccache/bin/sccache diff --git a/docker/tpl-ubuntu-gcc.Dockerfile b/docker/tpl-ubuntu-gcc.Dockerfile deleted file mode 100644 index 52f6cc22..00000000 --- a/docker/tpl-ubuntu-gcc.Dockerfile +++ /dev/null @@ -1,158 +0,0 @@ -# Temporary local variables dedicated to the TPL build -ARG TMP_DIR=/tmp -ARG SRC_DIR=$TMP_DIR/thirdPartyLibs -ARG BLD_DIR=$TMP_DIR/build - -# Defining the building toolchain that are common to both GEOSX and its TPLs. -# The docker base image could be any version of ubuntu/debian (as long as package names are unchanged). -ARG DOCKER_ROOT_IMAGE - - -FROM $DOCKER_ROOT_IMAGE AS tpl_toolchain_intersect_geosx_toolchain -ARG SRC_DIR - -# All the environment variables defined in this Dockerfile -# (GEOSX_TPL_DIR but also compiler information like CC, CXX...) -# are part of the image contract (otherwise ARG is used). -# GEOSX use them so consider modifying their names with care. -# -# The installation directory is provided as a docker build argument. -# We forward it using an environment variable. -ARG INSTALL_DIR -ENV GEOSX_TPL_DIR=$INSTALL_DIR - -# The same distribution and Dockerfile can be used for the 8, 9 and 10 version of the GNU compilers. -# The GCC_MAJOR_VERSION argument is here to parametrise (--build-arg) the build from the `docker build` command line. -# Note that docker seems to forget about the ARGs after each FROM statement. -# This is why we repeat it below. -ARG GCC_MAJOR_VERSION - -# Do not apt-get upgrade (ask the maintainer if you really think something should be upgraded) -RUN apt-get update - -# tzdata blocks the installation by interactively asking for the time zone. -# DEBIAN_FRONTEND and TZ variables fix this. -RUN DEBIAN_FRONTEND=noninteractive TZ=America/Los_Angeles \ - apt-get install -y --no-install-recommends \ -# gfortran 8, 9 and 10 depend on libgfortran5. - gcc-$GCC_MAJOR_VERSION \ - g++-$GCC_MAJOR_VERSION \ - gfortran-$GCC_MAJOR_VERSION \ - libgfortran5 \ -# Several scientific (or close) libraries. -# Note the difference between runtime and development packages. - ca-certificates \ - curl \ - libtbb2 \ - libblas-dev \ - liblapack-dev \ - zlib1g-dev \ - openmpi-bin \ - libopenmpi-dev \ -# Some of the TPL's make "extensive" use of python in their build. -# And we want to test GEOSX's python configuration script. -# Unfortunately argparse (standard library's package used by GEOSX) -# is not in the python-minimal package so we install the whole std lib. - python3 \ - python3-pip \ - python3-sphinx \ - python3-dev \ - doxygen \ - pkg-config \ - xz-utils \ - unzip \ - libmpfr-dev \ - lbzip2 \ - bzip2 \ - gnupg \ - virtualenv - -# Install clingo for Spack -RUN python3 -m pip install --upgrade pip && \ - python3 -m pip install clingo - -RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-cmake.sh - -ENV CC=/usr/bin/gcc-$GCC_MAJOR_VERSION \ - CXX=/usr/bin/g++-$GCC_MAJOR_VERSION \ - MPICC=/usr/bin/mpicc \ - MPICXX=/usr/bin/mpicxx \ - MPIEXEC=/usr/bin/mpirun -# The multi-line definition of arguments does not seem happy -# when a variable uses the value of another variable previously defined on the same line. -ENV OMPI_CC=$CC \ - OMPI_CXX=$CXX - -# This stage is dedicated to TPLs uniquely. -# A multi-stage build patern will allow to extract what we need for the GEOSX build. -FROM tpl_toolchain_intersect_geosx_toolchain AS tpl_toolchain -ARG SRC_DIR -ARG BLD_DIR -ARG SPEC - -# This is the version from the `docker build` command line. -# It is repeated because docker forgets about the ARGs after FROM statements. -ARG GCC_MAJOR_VERSION - -RUN apt-get install -y --no-install-recommends \ - libtbb-dev \ - make \ - bc \ - file \ -# GEOS patches some tpl. Remove when it's not the case anymore. - patch \ -# `ca-certificates` needed by `git` to download spack repo. - ca-certificates \ - git - - -# Run uberenv -# Have to create install directory first for uberenv -# -k flag is to ignore SSL errors -RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \ - mkdir -p ${GEOSX_TPL_DIR} && \ - GEOSX_SPEC="${SPEC}" && \ - if [ -z "${GEOSX_SPEC}" ] || [ "${GEOSX_SPEC}" = "undefined" ]; then GEOSX_SPEC="~pygeosx +docs %gcc-${GCC_MAJOR_VERSION}"; fi && \ - ./scripts/uberenv/uberenv.py \ - --spec "${GEOSX_SPEC}" \ - --spack-env-file=${SRC_DIR}/docker/ubuntu-spack.yaml \ - --project-json=${SRC_DIR}/.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 - cp *.cmake /spack-generated.cmake && \ -# Remove extraneous spack files - cd ${GEOSX_TPL_DIR} && \ - rm -rf bin/ build_stage/ builtin_spack_packages_repo/ misc_cache/ spack/ spack_env/ .spack-db/ - -# Last step is setting everything for a complete slave that will build GEOSX. -FROM tpl_toolchain_intersect_geosx_toolchain AS geosx_toolchain -ARG SRC_DIR - -# I extract the deployed TPLs from the TPL building stqge. -COPY --from=tpl_toolchain $GEOSX_TPL_DIR $GEOSX_TPL_DIR - -# Extract the generated host-config -COPY --from=tpl_toolchain /spack-generated.cmake / - -# Any tool specific to building GEOSX shall be installed in this stage. -RUN DEBIAN_FRONTEND=noninteractive TZ=America/Los_Angeles \ - apt-get install -y --no-install-recommends \ - openssh-client \ -# `ca-certificates` is needed by `sccache` to download the cached compilations. - ca-certificates \ - curl \ - python3 \ - texlive \ - texlive-latex-extra \ - graphviz \ - libxml2-utils \ - git \ - ghostscript \ - ninja-build - -# Install `sccache` binaries to speed up the build of `geos` -RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-sccache.sh -ENV SCCACHE=/opt/sccache/bin/sccache diff --git a/docker/ubuntu20-clang-cuda-spack.yaml b/docker/ubuntu20-clang-cuda-spack.yaml deleted file mode 100644 index 1b958437..00000000 --- a/docker/ubuntu20-clang-cuda-spack.yaml +++ /dev/null @@ -1,169 +0,0 @@ -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 - - zlib-api: - require: - - zlib - - blas: - require: - - "netlib-lapack" - lapack: - require: - - "netlib-lapack" - - llvm: - buildable: false - 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: - buildable: false - 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 851a851c..e5f064ae 100755 --- a/scripts/setupLC-TPL-uberenv.bash +++ b/scripts/setupLC-TPL-uberenv.bash @@ -100,7 +100,7 @@ function launch_jobs() { ALLOC_CMD="srun -N 1 --exclusive -t 60 -A vortex" "${UBERENV_HELPER}" "$INSTALL_DIR" matrix gcc-12-cuda-12.6 "+cuda ~uncrustify cuda_arch=90 %%gcc-12 ^cuda@12.6.0+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & "${UBERENV_HELPER}" "$INSTALL_DIR" matrix gcc-13-cuda-12.9 "+cuda ~uncrustify cuda_arch=90 %%gcc-13 ^cuda@12.9.1+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & - "${UBERENV_HELPER}" "$INSTALL_DIR" matrix gcc-13-cuda-12.9-hypredrive "+cuda ~uncrustify +hyperdrive cuda_arch=90 %%gcc-13 ^cuda@12.9.1+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" matrix gcc-13-cuda-12.9-hypredrive "+cuda ~uncrustify +hypredrive cuda_arch=90 %%gcc-13 ^cuda@12.9.1+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & "${UBERENV_HELPER}" "$INSTALL_DIR" matrix llvm-14-cuda-12.6 "+cuda ~uncrustify cuda_arch=90 %%clang-14 ^cuda@12.6.0+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & "${UBERENV_HELPER}" "$INSTALL_DIR" matrix llvm-19-cuda-12.9 "+cuda ~uncrustify cuda_arch=90 %%clang-19 ^cuda@12.9.1+allow-unsupported-compilers ${COMMON}" "${ALLOC_CMD}" "$@" & ;; @@ -109,7 +109,7 @@ function launch_jobs() { ALLOC_CMD="salloc -N 1 --exclusive -p pdebug -t 60 -A vortex" "${UBERENV_HELPER}" "$INSTALL_DIR" tuolumne cce-20-rocm-6.4.3 "+rocm~pygeosx~trilinos~petsc~docs amdgpu_target=gfx942 %%cce-20 ${COMMON}" "${ALLOC_CMD}" "$@" & "${UBERENV_HELPER}" "$INSTALL_DIR" tuolumne llvm-amdgpu-6.4.3 "+rocm~pygeosx~trilinos~petsc~docs amdgpu_target=gfx942 %%llvm-amdgpu_6_4_3 ${COMMON}" "${ALLOC_CMD}" "$@" & - "${UBERENV_HELPER}" "$INSTALL_DIR" tuolumne llvm-amdgpu-6.4.3-hypredrive "+rocm~pygeosx~trilinos~petsc~docs+hyperdrive amdgpu_target=gfx942 %%llvm-amdgpu_6_4_3 ${COMMON}" "${ALLOC_CMD}" "$@" & + "${UBERENV_HELPER}" "$INSTALL_DIR" tuolumne llvm-amdgpu-6.4.3-hypredrive "+rocm~pygeosx~trilinos~petsc~docs+hypredrive amdgpu_target=gfx942 %%llvm-amdgpu_6_4_3 ${COMMON}" "${ALLOC_CMD}" "$@" & ;; *) From bc1be129f2db0b879e198ff83523c5539c4ca261 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Wed, 6 May 2026 21:34:01 -0700 Subject: [PATCH 29/29] a little cleanup of spack stuff --- scripts/spack_packages/packages/geosx/package.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/scripts/spack_packages/packages/geosx/package.py b/scripts/spack_packages/packages/geosx/package.py index c7997d6a..91c3c7df 100644 --- a/scripts/spack_packages/packages/geosx/package.py +++ b/scripts/spack_packages/packages/geosx/package.py @@ -465,10 +465,6 @@ def geos_hostconfig(self, spec, prefix, py_site_pkgs_dir=None): if not spec.satisfies('cuda_arch=none'): cuda_arches = [str(arch) for arch in spec.variants['cuda_arch'].value] - for cuda_arch in cuda_arches: - cmake_cuda_flags += ( - ' -gencode arch=compute_{0},code=sm_{0}'.format(cuda_arch) - ) cfg.write(cmake_cache_string('CMAKE_CUDA_ARCHITECTURES', ';'.join(cuda_arches))) cfg.write(cmake_cache_string('CMAKE_CUDA_FLAGS', cmake_cuda_flags)) @@ -799,10 +795,6 @@ def lvarray_hostconfig(self, spec, prefix, py_site_pkgs_dir=None): if not spec.satisfies('cuda_arch=none'): cuda_arches = [str(arch) for arch in spec.variants['cuda_arch'].value] - for cuda_arch in cuda_arches: - cmake_cuda_flags += ( - ' -gencode arch=compute_{0},code=sm_{0}'.format(cuda_arch) - ) cfg.write(cmake_cache_string('CMAKE_CUDA_ARCHITECTURES', ';'.join(cuda_arches))) cfg.write(cmake_cache_string('CMAKE_CUDA_FLAGS', cmake_cuda_flags))