Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
rickgrubin-noaa committed Aug 30, 2024
2 parents 8f4e4b6 + a8bb4fb commit c875d01
Show file tree
Hide file tree
Showing 53 changed files with 630 additions and 310 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/ubuntu-ci-x86_64-intel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,13 @@ jobs:
#echo " - spec: [email protected]%[email protected]" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
#echo " prefix: /opt/intel/oneapi" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
# Add external ecflow for Intel
# Add external qt@5 to build ecflow
echo "" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
echo " ecflow::" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
echo " qt::" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
echo " buildable: False" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
echo " externals:" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
echo " - spec: [email protected]+ui+static_boost" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
echo " modules:" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
echo " - ecflow/5.11.4" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
echo " - spec: [email protected]" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
echo " prefix: /usr" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml
export -n SPACK_SYSTEM_CONFIG_PATH
Expand All @@ -121,13 +120,13 @@ jobs:
# Set compiler and MPI specs
spack config add "packages:all:providers:mpi:[[email protected]]"
spack config add "packages:all:compiler:[[email protected]]"
spack config add "packages:all:compiler:[[email protected], [email protected]]"
# Add additional variants for MET packages, different from config/common/packages.yaml
spack config add "packages:met:variants:+python +grib2 +graphics +lidar2nc +modis"
# Don't generate ecflow module when using external package
spack config add "modules:default:tcl:exclude:[ecflow]"
# Don't generate qt module when using external package
spack config add "modules:default:tcl:exclude:[qt]"
# Concretize and check for duplicates
spack concretize 2>&1 | tee log.concretize.intel-2021.10.0-buildcache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-ci-x86_64-oneapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
# Set compiler and MPI specs
spack config add "packages:all:providers:mpi:[[email protected]]"
spack config add "packages:all:compiler:[[email protected]]"
spack config add "packages:all:compiler:[[email protected],[email protected]]"
# Add additional variants for MET packages, different from config/common/packages.yaml
spack config add "packages:met:variants:+python +grib2 +graphics +lidar2nc +modis"
Expand Down
6 changes: 4 additions & 2 deletions configs/common/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ packages:
require: '@3.4:'
# 1.85 incompatible with [email protected] - use latest 'good version'
boost:
require: '@1.84 ~atomic +chrono +date_time +exception +filesystem ~graph ~iostreams ~locale ~log ~math ~mpi ~numpy +pic +program_options +python ~random +regex +serialization ~signals +system +test +thread +timer ~wave cxxstd=17 visibility=hidden'
require:
- '@1.84 ~atomic +chrono +date_time +exception +filesystem ~graph ~iostreams ~locale ~log ~math ~mpi ~numpy +pic +program_options +python ~random +regex +serialization ~signals +system +test +thread +timer ~wave cxxstd=17 visibility=hidden'
bufr:
require: '@12.1.0 +python'
bufr-query:
Expand All @@ -37,7 +38,8 @@ packages:
eccodes:
require: '@2.33.0 +png +tools'
ecflow:
require: '@5.11.4 +ui'
require:
- '@5.11.4 +ui'
eckit:
require: '@1.27.0 linalg=eigen,lapack compression=lz4,bzip2'
ecmwf-atlas:
Expand Down
6 changes: 6 additions & 0 deletions configs/common/packages_intel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,9 @@ packages:
py-numpy:
require:
- '^intel-oneapi-mkl'
boost:
require:
- '%gcc'
ecflow:
require:
- '%gcc'
130 changes: 75 additions & 55 deletions configs/containers/docker-ubuntu-clang-mpich.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ spack:

compilers:
- compiler:
spec: clang@10.0.0
spec: clang@14.0.0
paths:
cc: /usr/bin/clang
cxx: /usr/bin/clang++
f77: /usr/bin/gfortran
fc: /usr/bin/gfortran
flags: {}
operating_system: ubuntu20.04
operating_system: ubuntu22.04
modules: []
environment:
prepend_path:
LD_LIBRARY_PATH: '/usr/lib/llvm-10/lib'
LD_LIBRARY_PATH: '/usr/lib/llvm-14/lib'
extra_rpaths: []

# Basic package config from configs/common/packages.yaml
Expand All @@ -31,11 +31,16 @@ spack:
target: [x86_64]
providers:
mpi: [[email protected]]
compiler: [clang@10.0.0]
compiler: [clang@14.0.0]
gcc:
buildable: false
externals:
- spec: [email protected]
- spec: [email protected]
prefix: /usr
gcc-runtime:
buildable: false
externals:
- spec: [email protected]
prefix: /usr
g2:
# https://github.com/NOAA-EMC/NCEPLIBS-g2/issues/745
Expand All @@ -49,52 +54,52 @@ spack:
- any_of: ['fflags="-no-pie"']
when: "@1.10.2: %clang"
message: "Extra g2tmpl compile options for version 1.10.2+ with clang"
gmake:
llvm:
buildable: false
externals:
- spec: [email protected]
- spec: [email protected] +clang
prefix: /usr
diffutils:
mpich:
buildable: false
externals:
- spec: [email protected]
prefix: /usr
git:
- spec: [email protected]
prefix: /opt/mpich-4.2.1
version: [4.2.1]
gmake:
buildable: false
externals:
- spec: [email protected]~tcltk
- spec: [email protected]
prefix: /usr
git-lfs:
diffutils:
buildable: false
externals:
- spec: [email protected]
- spec: [email protected]
prefix: /usr
llvm:
git:
buildable: false
externals:
- spec: [email protected] +clang
- spec: [email protected]~tcltk
prefix: /usr
mpich:
git-lfs:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/mpich-4.2.1
version: [4.2.1]
- spec: [email protected]
prefix: /usr
mysql:
buildable: false
externals:
- spec: [email protected].32
- spec: [email protected].39
prefix: /usr
qt:
buildable: false
externals:
- spec: qt@5.12.8
- spec: qt@5.15.3
prefix: /usr
version: [5.15.3]
wget:
buildable: false
externals:
- spec: wget@1.20.3
- spec: wget@1.21.2
prefix: /usr
version: [1.21.2]

Expand All @@ -118,7 +123,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:20.04
os: ubuntu:22.04
spack:
url: https://github.com/jcsda/spack
ref: spack-stack-dev
Expand All @@ -131,36 +136,46 @@ spack:
os_packages:
build:
- bc
- clang-10
- libclang-10-dev
- libc++-10-dev
- cpp
- g++
- gcc
- gfortran
- clang-14
- libclang-14-dev
- libc++-14-dev
- libomp5-14
- libomp-14-dev
- libc++abi-14-dev
- cpp-12
- libgomp1
- g++-12
- gcc-12
- gfortran-12
- git
- git-lfs
- make
- mysql-server
- qt5-default
- qtbase5-dev
- qt5-qmake
- libqt5svg5-dev
- qt5dxcb-plugin
- wget

final:
- bc
- clang-10
- libclang-10-dev
- libc++-10-dev
- cpp
- g++
- gcc
- gfortran
- clang-14
- libclang-14-dev
- libc++-14-dev
- libomp5-14
- libomp-14-dev
- libc++abi-14-dev
- cpp-12
- libgomp1
- g++-12
- gcc-12
- gfortran-12
- git
- git-lfs
- make
- mysql-server
- qt5-default
- qtbase5-dev
- qt5-qmake
- libqt5svg5-dev
- qt5dxcb-plugin
- wget
Expand All @@ -177,6 +192,8 @@ spack:
- python3-setuptools
- unzip
- vim
- nano
- less

# Extra instructions
extra_instructions:
Expand All @@ -185,14 +202,14 @@ spack:
COPY spack-ext-SPACK_STACK_HASH/repos/spack-stack $SPACK_ROOT/var/spack/repos/spack-stack
# Register spack-stack extension repo
RUN spack repo add $SPACK_ROOT/var/spack/repos/spack-stack --scope defaults
# Create symbolic links for clang compilers
RUN cd /usr/bin && \
ln -svf clang-10 clang && \
ln -svf clang++-10 clang++ && \
ln -svf clang-cpp-10 clang-cpp && \
cd /usr/lib/llvm-10/lib && \
ln -svf libc++abi.so.1.0 libc++abi.so
#
# 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
# Build mpich outside of spack-stack
ENV MPICH_VERSION=4.2.1
ENV CC=clang
Expand Down Expand Up @@ -225,16 +242,18 @@ spack:
ENV CPATH=/opt/mpich-${MPICH_VERSION}/include:${CPATH}
ENV LD_LIBRARY_PATH=/opt/mpich-${MPICH_VERSION}/lib:${LD_LIBRARY_PATH}
final: |
# Create symbolic links for clang compilers
RUN cd /usr/bin && \
ln -svf clang-10 clang && \
ln -svf clang++-10 clang++ && \
ln -svf clang-cpp-10 clang-cpp && \
cd /usr/lib/llvm-10/lib && \
ln -svf libc++abi.so.1.0 libc++abi.so
# Copy spack find output from builder
COPY --from=builder /root/spack_find.out /root/spack_find.out
ENV MPICH_VERSION=4.2.1
# 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
# 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 All @@ -252,6 +271,7 @@ spack:
echo "export CC=clang" >> /root/.bashrc && \
echo "export CXX=clang++" >> /root/.bashrc && \
echo "export FC=gfortran" >> /root/.bashrc && \
echo "export jedi_cmake_ROOT=$(ls -d /opt/software/linux-ubuntu*/clang-*/jedi-cmake-*)" >> /root/.bashrc && \
printf "[credential]\n helper = cache --timeout=7200\n" >> /root/.gitconfig
# Labels for the image
Expand Down
Loading

0 comments on commit c875d01

Please sign in to comment.