Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/jcsda/spack-stack into f…
Browse files Browse the repository at this point in the history
…eature/libirc_parallel_netcdf_and_scipy
  • Loading branch information
climbfuji committed Jan 22, 2025
2 parents 831677d + 52066c5 commit 626aa89
Show file tree
Hide file tree
Showing 59 changed files with 2,475 additions and 160 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/macos-ci-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
set +e
spack mirror add local-binary file:///Users/ec2-user/spack-stack/build-cache/
spack buildcache update-index local-binary || (echo "No valid binary cache found, proceed without" && spack mirror rm local-binary)
set +e
set -e
echo "Packages in spack binary cache:"
spack buildcache list
fi
Expand Down
39 changes: 22 additions & 17 deletions .github/workflows/ubuntu-ci-x86_64-gnu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,14 @@ jobs:
# Set up spack-stack
source ./setup.sh
declare -a TEMPLATES=("unified-dev" "skylab-dev")
declare -a TEMPLATES=("unified-dev" "skylab-dev" "cylc-dev")
for TEMPLATE in "${TEMPLATES[@]}"; do
if [[ "${TEMPLATE}" == *"unified-dev"* ]]; then
export ENVNAME=ue-gcc-11.4.0-buildcache
elif [[ "${TEMPLATE}" == *"skylab-dev"* ]]; then
export ENVNAME=se-gcc-11.4.0-buildcache
elif [[ "${TEMPLATE}" == *"cylc-dev"* ]]; then
export ENVNAME=ce-gcc-11.4.0-buildcache
fi
echo "Creating environment ${ENVNAME} from template ${TEMPLATE}"
Expand All @@ -68,7 +70,8 @@ jobs:
# Find external packages
spack external find --scope system \
--exclude bison --exclude openssl \
--exclude curl --exclude python
--exclude curl --exclude python \
--exclude meson
spack external find --scope system grep
spack external find --scope system sed
spack external find --scope system perl
Expand Down Expand Up @@ -104,7 +107,7 @@ jobs:
set +e
spack mirror add local-binary file:///home/ubuntu/spack-stack/build-cache/
spack buildcache update-index local-binary || (echo "No valid binary cache found, proceed without" && spack mirror rm local-binary)
set +e
set -e
echo "Packages in spack binary cache:"
spack buildcache list
fi
Expand All @@ -113,20 +116,22 @@ jobs:
# This allows us to "spin up" builds that altogether take longer than
# six hours, and/or fail later in the build process.
# base-env
echo "base-env ..."
spack install --fail-fast --source --no-check-signature base-env 2>&1 | tee log.install.gnu-11.4.0-buildcache.base-env
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/ base-env
# jedi-base-env
echo "jedi-base-env ..."
spack install --fail-fast --source --no-check-signature jedi-base-env 2>&1 | tee log.install.gnu-11.4.0-buildcache.jedi-base-env
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/ jedi-base-env
# jedi-ufs-env
echo "jedi-ufs-env ..."
spack install --fail-fast --source --no-check-signature jedi-ufs-env 2>&1 | tee log.install.gnu-11.4.0-buildcache.jedi-ufs-env
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/ jedi-ufs-env
if [[ "${TEMPLATE}" == *"unified-dev"* || "${TEMPLATE}" == *"skylab-dev"* ]]; then
# base-env
echo "base-env ..."
spack install --fail-fast --source --no-check-signature base-env 2>&1 | tee log.install.gnu-11.4.0-buildcache.base-env
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/ base-env
# jedi-base-env
echo "jedi-base-env ..."
spack install --fail-fast --source --no-check-signature jedi-base-env 2>&1 | tee log.install.gnu-11.4.0-buildcache.jedi-base-env
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/ jedi-base-env
# jedi-ufs-env
echo "jedi-ufs-env ..."
spack install --fail-fast --source --no-check-signature jedi-ufs-env 2>&1 | tee log.install.gnu-11.4.0-buildcache.jedi-ufs-env
spack buildcache create -u /home/ubuntu/spack-stack/build-cache/ jedi-ufs-env
fi
# the rest
echo "${TEMPLATE} ..."
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/ubuntu-ci-x86_64-intel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ jobs:
# Find external packages
spack external find --scope system \
--exclude bison --exclude openssl \
--exclude curl --exclude python
--exclude curl --exclude python \
--exclude meson
spack external find --scope system grep
spack external find --scope system sed
spack external find --scope system perl
Expand Down Expand Up @@ -144,7 +145,7 @@ jobs:
set +e
spack mirror add local-binary file:///home/ubuntu/spack-stack/build-cache/
spack buildcache update-index local-binary || (echo "No valid binary cache found, proceed without" && spack mirror rm local-binary)
set +e
set -e
echo "Packages in spack binary cache:"
spack buildcache list
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu-ci-x86_64-oneapi-ifx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
spack external find --scope system \
--exclude bison --exclude openssl \
--exclude curl --exclude python \
--exclude gmake
--exclude meson --exclude gmake
spack external find --scope system grep
spack external find --scope system sed
spack external find --scope system perl
Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:
set +e
spack mirror add local-binary file:///home/ubuntu/spack-stack/build-cache/
spack buildcache update-index local-binary || (echo "No valid binary cache found, proceed without" && spack mirror rm local-binary)
set +e
set -e
echo "Packages in spack binary cache:"
spack buildcache list
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu-ci-x86_64-oneapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
spack external find --scope system \
--exclude bison --exclude openssl \
--exclude curl --exclude python \
--exclude gmake
--exclude meson --exclude gmake
spack external find --scope system grep
spack external find --scope system sed
spack external find --scope system perl
Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:
set +e
spack mirror add local-binary file:///home/ubuntu/spack-stack/build-cache/
spack buildcache update-index local-binary || (echo "No valid binary cache found, proceed without" && spack mirror rm local-binary)
set +e
set -e
echo "Packages in spack binary cache:"
spack buildcache list
fi
Expand Down
4 changes: 2 additions & 2 deletions configs/common/modules_lmod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ modules:
^[email protected]+debug snapshot=none: 'esmf-8.6.1-debug'
^[email protected]~debug snapshot=none: 'esmf-8.7.0'
^[email protected]+debug snapshot=none: 'esmf-8.7.0-debug'
^[email protected].0b10~debug snapshot=b10: esmf-8.8.0b10
^[email protected].0b10+debug snapshot=b10: esmf-8.8.0b10-debug
^[email protected].0~debug snapshot=none: 'esmf-8.8.0'
^[email protected].0+debug snapshot=none: 'esmf-8.8.0-debug'
openmpi:
environment:
set:
Expand Down
4 changes: 2 additions & 2 deletions configs/common/modules_tcl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ modules:
^[email protected]+debug snapshot=none: 'esmf-8.6.1-debug'
^[email protected]~debug snapshot=none: 'esmf-8.7.0'
^[email protected]+debug snapshot=none: 'esmf-8.7.0-debug'
^[email protected].0b10~debug snapshot=b10: esmf-8.8.0b10
^[email protected].0b10+debug snapshot=b10: esmf-8.8.0b10-debug
^[email protected].0~debug snapshot=none: 'esmf-8.8.0'
^[email protected].0+debug snapshot=none: 'esmf-8.8.0-debug'
openmpi:
environment:
set:
Expand Down
26 changes: 19 additions & 7 deletions configs/common/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ packages:
- any_of: ['@2.3.0 ~openmp']
when: '%intel@2021:'
message: '2.3.0 is the last version to use C++17, use with Intel Classic'
- any_of: ['@2.3.0 ~openmp']
when: '%gcc@:10'
message: 2.3.0 is the last version to use C++17, use with GCC 10 and earlier
- any_of: ['@2.3.0 ~openmp']
when: '%apple-clang@:14'
message: '2.3.0 is the last version to use C++17, use with Apple Clang 14 and earlier'
Expand Down Expand Up @@ -64,7 +67,7 @@ packages:
esmf:
require:
- '~xerces ~pnetcdf +shared +external-parallelio'
- any_of: ['@=8.6.1 snapshot=none', '@=8.8.0b10 snapshot=b10']
- any_of: ['@=8.6.1 snapshot=none', '@=8.8.0 snapshot=none']
- any_of: ['fflags="-fp-model precise" cxxflags="-fp-model precise"']
when: "%intel"
message: "Extra ESMF compile options for Intel"
Expand All @@ -76,6 +79,10 @@ packages:
# message: "Extra ESMF compile options for GCC"
prefer:
- '+python'
# To avoid duplicate packages (concretizer bug?)
expat:
require:
- '~libbsd'
fckit:
require: '@0.13.2 +eckit'
fftw:
Expand Down Expand Up @@ -145,6 +152,10 @@ packages:
require: '@2.1.0'
libpng:
require: '@1.6.37 +pic'
# libtirpc +gssapi doesn't build with oneapi@2025
# https://github.com/JCSDA/spack-stack/issues/1441
libtirpc:
require: '~gssapi'
# Newest version of magics needed for oneapi compilers
magics:
require: "@4.15.3:"
Expand Down Expand Up @@ -214,10 +225,9 @@ packages:
# Avoid full rust dependency: version 43+ requires py-maturin
py-cryptography:
require: '@:42 +rust_bootstrap'
# Introduced in https://github.com/JCSDA/spack-stack/pull/894, pin py-cython
# to avoid duplicate packages being built (cylc dependencies soft-want @3:)
# Pin py-cython to avoid duplicate packages
py-cython:
require: '@0.29.36'
require: '@3'
# As long as we need the "delayed" variant for py-dask,
# we are restricted to version 2021.03.0 (last one that has it)
# and newer than 2021.01.0 because of these issues:
Expand All @@ -232,13 +242,15 @@ packages:
require: '~mpi'
# https://github.com/JCSDA/spack-stack/issues/1276
py-matplotlib:
require: '@3.7.4'
require: '@3.7.4'
# Variant ~mpi not working for latest py-netcdf4
# https://github.com/spack/spack/issues/47652
py-netcdf4:
require: '@1.7.1 +mpi'
py-pandas:
require: '+excel'
# To avoid duplicate packages
py-numpy:
require:
- '@1.26'
# To avoid duplicate packages
py-ruamel-yaml:
require: '@0.17.16'
Expand Down
12 changes: 12 additions & 0 deletions configs/common/packages_intel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ packages:
gettext:
require:
- '@:0.21'
go:
require:
- '%gcc'
go-bootstrap:
require:
- '%gcc'
gh:
require:
- '%gcc'
gsibec:
require:
- '+mkl'
Expand All @@ -21,6 +30,9 @@ packages:
boost:
require:
- '%gcc'
qt:
require:
- '%gcc'
ecflow:
require:
- '%gcc'
Expand Down
3 changes: 3 additions & 0 deletions configs/common/packages_oneapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ packages:
require: '%gcc'
libbsd:
require: '%gcc'
qt:
require:
- '%gcc'
52 changes: 26 additions & 26 deletions configs/containers/docker-ubuntu-clang-mpich.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spack:
f77: /usr/bin/gfortran
fc: /usr/bin/gfortran
flags: {}
operating_system: ubuntu22.04
operating_system: ubuntu24.04
modules: []
environment:
prepend_path:
Expand All @@ -30,7 +30,7 @@ spack:
require: '%clang'
target: [x86_64]
providers:
mpi: [[email protected].1]
mpi: [[email protected].3]
compiler: [[email protected]]
gcc:
buildable: false
Expand All @@ -56,9 +56,9 @@ spack:
mpich:
buildable: false
externals:
- spec: [email protected].1
prefix: /opt/mpich-4.2.1
version: [4.2.1]
- spec: [email protected].3
prefix: /opt/mpich-4.2.3
version: [4.2.3]
diffutils:
buildable: false
externals:
Expand All @@ -82,7 +82,7 @@ spack:
mysql:
buildable: false
externals:
- spec: [email protected].39
- spec: [email protected].40
prefix: /usr
qt:
buildable: false
Expand All @@ -93,9 +93,9 @@ spack:
wget:
buildable: false
externals:
- spec: [email protected].2
- spec: [email protected].4
prefix: /usr
version: [1.21.2]
version: [1.21.4]

specs: []

Expand All @@ -117,7 +117,7 @@ spack:
# Sets the base images for the stages where Spack builds the
# software or where the software gets installed after being built..
images:
os: ubuntu:22.04
os: ubuntu:24.04
spack:
url: https://github.com/jcsda/spack
ref: spack-stack-dev
Expand Down Expand Up @@ -197,15 +197,15 @@ spack:
# Register spack-stack extension repo
RUN spack repo add $SPACK_ROOT/var/spack/repos/spack-stack --scope defaults
# Set default binaries for clang-14 and GNU-12.
RUN ln -svf /usr/bin/gfortran-12 /usr/bin/gfortran && \
ln -svf /usr/bin/cpp-12 /usr/bin/cpp && \
ln -svf /usr/bin/gcc-12 /usr/bin/gcc && \
ln -svf /usr/bin/g++-12 /usr/bin/g++ && \
ln -svf /usr/bin/clang-14 /usr/bin/clang && \
ln -svf /usr/bin/clang++-14 /usr/bin/clang++ && \
ln -svf /usr/bin/clang-cpp-14 /usr/bin/clang-cpp
RUN rm /usr/bin/cpp && ln -s /usr/bin/cpp-12 /usr/bin/cpp && \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100 && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 && \
update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-12 100 && \
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 100 && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 100 && \
update-alternatives --install /usr/bin/clang-cpp clang-cpp /usr/bin/clang-cpp-14 100
# Build mpich outside of spack-stack
ENV MPICH_VERSION=4.2.1
ENV MPICH_VERSION=4.2.3
ENV CC=clang
ENV CXX=clang++
ENV FC=gfortran
Expand All @@ -231,23 +231,23 @@ spack:
# Set environment variables for installing tzdata
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
ENV MPICH_VERSION=4.2.1
ENV MPICH_VERSION=4.2.3
ENV PATH=/opt/mpich-${MPICH_VERSION}/bin:${PATH}
ENV CPATH=/opt/mpich-${MPICH_VERSION}/include:${CPATH}
ENV LD_LIBRARY_PATH=/opt/mpich-${MPICH_VERSION}/lib:${LD_LIBRARY_PATH}
final: |
# Copy spack find output from builder
COPY --from=builder /root/spack_find.out /root/spack_find.out
ENV MPICH_VERSION=4.2.1
ENV MPICH_VERSION=4.2.3
# Set the GNU 12.x toolchain as the default compilers.
# Set default binaries for clang-14 and GNU-12.
RUN ln -svf /usr/bin/gfortran-12 /usr/bin/gfortran && \
ln -svf /usr/bin/cpp-12 /usr/bin/cpp && \
ln -svf /usr/bin/gcc-12 /usr/bin/gcc && \
ln -svf /usr/bin/g++-12 /usr/bin/g++ && \
ln -svf /usr/bin/clang-14 /usr/bin/clang && \
ln -svf /usr/bin/clang++-14 /usr/bin/clang++ && \
ln -svf /usr/bin/clang-cpp-14 /usr/bin/clang-cpp
RUN rm /usr/bin/cpp && ln -s /usr/bin/cpp-12 /usr/bin/cpp && \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100 && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 && \
update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-12 100 && \
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 100 && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 100 && \
update-alternatives --install /usr/bin/clang-cpp clang-cpp /usr/bin/clang-cpp-14 100
# Copy mpich-${MPICH_VERSION} installation from builder
COPY --from=builder /opt/mpich-${MPICH_VERSION} /opt/mpich-${MPICH_VERSION}
# Make a non-root user:nonroot / group:nonroot for running MPI
Expand Down
3 changes: 3 additions & 0 deletions configs/containers/docker-ubuntu-intel-impi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ spack:
ecflow:
require:
- '%gcc'
ectrans:
require:
- '+mkl ~fftw'
findutils:
externals:
- spec: [email protected]
Expand Down
Loading

0 comments on commit 626aa89

Please sign in to comment.