Update Ubuntu CI runner from old AWS c6i ParallelCluster to c6a single-node instance #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ubuntu-ci-c6a-x86_64-intel-build | |
on: | |
pull_request: | |
paths-ignore: | |
- 'doc/**' | |
- '**.md' | |
- '.github/ISSUE_TEMPLATE/*' | |
- '.gitignore' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
ubuntu-ci-x86_64-intel-build: | |
runs-on: [ubuntu-ci-c6a-x86_64] | |
steps: | |
- name: cleanup | |
run: | | |
pwd | |
ls -lart | |
rm -fr * | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: create-env | |
run: | | |
source ./setup.sh | |
export ENVNAME=ue-intel-2021.10.0 | |
export ENVDIR=$PWD/envs/${ENVNAME} | |
spack stack create env --site linux.default --template unified-dev --name ${ENVNAME} | |
spack env activate ${ENVDIR} | |
export SPACK_SYSTEM_CONFIG_PATH="${ENVDIR}/site" | |
# Find external packages | |
spack external find --scope system \ | |
--exclude bison --exclude openssl \ | |
--exclude curl --exclude python | |
spack external find --scope system sed | |
spack external find --scope system perl | |
spack external find --scope system wget | |
PATH="/usr/local/opt/qt5/bin:$PATH" \ | |
spack external find --scope system qt | |
spack external find --scope system texlive | |
spack external find --scope system mysql | |
# For GNU - need to for bootstrapping | |
spack compiler find --scope system | |
# For Intel | |
echo "" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml | |
echo "compilers:" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml | |
echo "- compiler:" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml | |
echo " spec: [email protected]" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml | |
echo " paths:" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml | |
echo " cc: /opt/intel/oneapi/compiler/2023.2.3/linux/bin/intel64/icc" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml | |
echo " cxx: /opt/intel/oneapi/compiler/2023.2.3/linux/bin/intel64/icpc" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml | |
echo " f77: /opt/intel/oneapi/compiler/2023.2.3/linux/bin/intel64/ifort" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml | |
echo " fc: /opt/intel/oneapi/compiler/2023.2.3/linux/bin/intel64/ifort" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml | |
echo " flags:" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml | |
echo " cflags: -diag-disable=10441" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml | |
echo " cxxflags: -diag-disable=10441" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml | |
echo " fflags: -diag-disable=10448" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml | |
echo " operating_system: ubuntu22.04" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml | |
echo " target: x86_64" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml | |
echo " modules: []" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml | |
echo " environment:" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml | |
echo " prepend_path:" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml | |
echo " LD_LIBRARY_PATH: '/opt/intel/oneapi/compiler/2023.2.3/linux/compiler/lib/intel64_lin'" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml | |
echo " extra_rpaths: []" >> ${SPACK_SYSTEM_CONFIG_PATH}/compilers.yaml | |
# Need to find external Intel MPI and annotate with the | |
# correct compiler, no way to do that with spack commands. | |
echo "" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml | |
echo " intel-oneapi-mpi:" >> ${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]%[email protected]" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml | |
echo " prefix: /opt/intel/oneapi" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml | |
# Add external ecflow for Intel | |
echo "" >> ${SPACK_SYSTEM_CONFIG_PATH}/packages.yaml | |
echo " ecflow:" >> ${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 | |
export -n SPACK_SYSTEM_CONFIG_PATH | |
# For buildcaches | |
spack config add config:install_tree:padded_length:200 | |
# Set compiler and MPI | |
spack config add "packages:all:providers:mpi:[[email protected]]" | |
spack config add "packages:all:compiler:[[email protected]]" | |
sed -i "s/\['\%aocc', '\%apple-clang', '\%gcc', '\%intel'\]/\['\%intel'\]/g" $ENVDIR/spack.yaml | |
# 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]" | |
# Concretize and check for duplicates | |
spack concretize 2>&1 | tee log.concretize.intel-2021.10.0 | |
${SPACK_STACK_DIR}/util/show_duplicate_packages.py -d log.concretize.intel-2021.10.0 -i fms -i crtm -i esmf -i mapl | |
# Add and update source cache | |
spack mirror add local-source file:///home/ubuntu/spack-stack/source-cache/ | |
spack mirror create -a -d /home/ubuntu/spack-stack/source-cache/ | |
# Add binary cache and reindex it | |
spack mirror add local-binary file:///home/ubuntu/spack-stack/build-cache/ | |
spack buildcache update-index local-binary | |
echo "Packages in combined spack build caches:" | |
spack buildcache list | |
# Break installation up in pieces and create build caches in between | |
# 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.intel-2021.10.0.base-env | |
spack buildcache create -a -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.intel-2021.10.0.jedi-base-env | |
spack buildcache create -a -u /home/ubuntu/spack-stack/build-cache/ jedi-base-env | |
# the rest | |
echo "unified-env ..." | |
spack install --fail-fast --source --no-check-signature 2>&1 | tee log.install.intel-2021.10.0.unified-env | |
spack buildcache create -a -u /home/ubuntu/spack-stack/build-cache/ | |
# Next steps: synchronize source and build cache to a central/combined mirror? | |
echo "Next steps ..." | |
### Don't think this works when using config padded length stuff for creating build caches? | |
### '${SPACK_STACK_DIR}/util/ldd_check.py $SPACK_ENV 2>&1 | tee log.ldd_check | |
spack clean -a | |
spack module tcl refresh -y | |
spack stack setup-meta-modules | |
spack env deactivate | |
- name: test-env | |
run: | | |
module use /home/ubuntu/spack-stack/modulefiles | |
export ENVNAME=ue-intel-2021.10.0 | |
export ENVDIR=$PWD/envs/${ENVNAME} | |
ls -l ${ENVDIR}/install/modulefiles/Core | |
module use ${ENVDIR}/install/modulefiles/Core | |
module load stack-intel/2021.10.0 | |
module load stack-intel-oneapi-mpi/2021.10.0 | |
module load stack-python/3.10.13 | |
module available | |
module load jedi-ufs-env/1.0.0 | |
module load ewok-env/1.0.0 | |
module load soca-env/1.0.0 | |
module list |