-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix container builds, merge/rename spack-stack extension repos, add Intel oneAPI 2024.0.2 compiler/MPI on AWS ParallelCluster #966
Merged
climbfuji
merged 17 commits into
JCSDA:develop
from
climbfuji:bugfix/container_dockerfile_spackext
Jan 26, 2024
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
c4b61e9
Add [email protected] compiler/mpi for aws-pcluster
climbfuji 2157267
Update .gitmodules and submodule pointer for spack for code review an…
climbfuji 157f874
Add logic to copy spack extension with spack-stack hash into containe…
climbfuji 189f06c
Fix intel-oneapi-mpi version in configs/sites/aws-pcluster/packages.yaml
climbfuji 9caad8b
Add missing commands to register spack extension repos in configs/con…
climbfuji 9d5cdbb
Revert .gitmodules and spack submodule ptr update
climbfuji 0f10e99
Use existing 'pre_build' extra instructions instead of adding a new key
climbfuji 041c7a0
Merge spack-ext/repos/jcsda-emc and spack-ext/repos/jcsda-emc-bundles…
climbfuji ce2207d
Update configs/containers/docker-ubuntu-intel-impi.yaml, configs/cont…
climbfuji 5f5f0b7
Update .gitmodules and submodule pointer for spack for code review an…
climbfuji 55411a1
Update pflogger to 1.12
climbfuji dc789a6
Revert unintended update of configs/sites/aws-pcluster/README.md
climbfuji 9df9865
Bug fixes in configs/containers/*.yaml
climbfuji 9038e1f
Fix container_create unit tests
climbfuji 1e5f561
Revert .gitmodules and update submodule pointer for spack
climbfuji 06452f4
Fix bug in container configs (wrong repos target name)
climbfuji ba02618
Trigger CI
climbfuji File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -136,11 +136,6 @@ | |
libyaml: | ||
version: ['0.2.5'] | ||
mapl: | ||
# 2.35.2 goes with [email protected], 2.40.3 goes with [email protected] | ||
# turn off ~pflogger and extdata2g to avoid compilation | ||
# errors with [email protected]+, see | ||
# https://github.com/JCSDA/spack-stack/issues/769 | ||
# also: ... extdata2g segfault UFS? | ||
version: ['2.40.3'] | ||
variants: +shared +pflogger ~f2py | ||
# If making changes here, also check the Discover site config and the CI workflows | ||
|
@@ -199,6 +194,9 @@ | |
variants: +pnetcdf | ||
parallel-netcdf: | ||
version: ['1.12.2'] | ||
pflogger: | ||
version: ['1.12.0'] | ||
variants: +mpi | ||
pixman: | ||
variants: +pic | ||
# Do not build pkgconf - https://github.com/jcsda/spack-stack/issues/123 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ spack: | |
require: '%clang' | ||
target: [x86_64] | ||
providers: | ||
mpi: [[email protected].1] | ||
mpi: [[email protected].2] | ||
compiler: [[email protected]] | ||
gcc: | ||
buildable: false | ||
|
@@ -68,12 +68,6 @@ spack: | |
externals: | ||
- spec: [email protected] +clang | ||
prefix: /usr | ||
mpich: | ||
buildable: false | ||
externals: | ||
- spec: [email protected] | ||
prefix: /opt/mpich-4.1.1 | ||
version: [4.1.1] | ||
mysql: | ||
buildable: false | ||
externals: | ||
|
@@ -175,47 +169,26 @@ spack: | |
# Extra instructions | ||
extra_instructions: | ||
pre_build: | | ||
#Create symbolic links for clang compilers | ||
# Copy the spack-stack extension repo into the spack code | ||
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 | ||
# Build mpich outside of spack-stack | ||
ENV MPICH_VERSION=4.1.1 | ||
ENV CC=clang | ||
ENV CXX=clang++ | ||
ENV FC=gfortran | ||
RUN mkdir -p /opt/mpich-${MPICH_VERSION}/src && \ | ||
cd /opt/mpich-${MPICH_VERSION}/src && \ | ||
wget http://www.mpich.org/static/downloads/${MPICH_VERSION}/mpich-${MPICH_VERSION}.tar.gz && \ | ||
tar -xzf mpich-${MPICH_VERSION}.tar.gz && \ | ||
cd mpich-${MPICH_VERSION} && \ | ||
CFLAGS="-fPIC" CXXFLAGS="-fPIC" FCFLAGS="-fPIC" LDFLAGS="-fPIC" \ | ||
./configure --prefix=/opt/mpich-${MPICH_VERSION} --enable-fortran --enable-cxx --with-device=ch4:ofi && \ | ||
make -j2 && \ | ||
make install && \ | ||
ls /opt/mpich-${MPICH_VERSION} | ||
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} | ||
build: | | ||
# Put output of spack find into a file | ||
RUN cd /opt/spack-environment && \ | ||
spack env activate -d . && \ | ||
spack find 2>&1 | tee /root/spack_find.out | ||
pre_final: | | ||
#Set environment variables for installing tzdata | ||
# Set environment variables for installing tzdata | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV TZ=Etc/UTC | ||
ENV MPICH_VERSION=4.1.1 | ||
ENV CC=clang | ||
ENV CXX=clang++ | ||
ENV FC=gfortran | ||
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: | | ||
# Create symbolic links for clang compilers | ||
RUN cd /usr/bin && \ | ||
|
@@ -224,11 +197,7 @@ spack: | |
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 | ||
ENV MPICH_VERSION=4.1.1 | ||
COPY --from=builder /root/spack_find.out /root/spack_find.out | ||
# 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 | ||
RUN useradd -U -k /etc/skel -s /bin/bash -d /home/nonroot -m nonroot --uid 43891 && \ | ||
echo "ulimit -s unlimited" >> /home/nonroot/.bashrc && \ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,12 +35,11 @@ spack: | |
externals: | ||
- spec: [email protected] | ||
prefix: /usr | ||
# Try this next time, already used for clang/intel | ||
#gmake: | ||
# buildable: false | ||
# externals: | ||
# - spec: [email protected] | ||
# prefix: /usr | ||
gmake: | ||
buildable: false | ||
externals: | ||
- spec: [email protected] | ||
prefix: /usr | ||
diffutils: | ||
buildable: false | ||
externals: | ||
|
@@ -150,8 +149,13 @@ spack: | |
|
||
# Extra instructions | ||
extra_instructions: | ||
pre_build: | | ||
# Copy the spack-stack extension repo into the spack code | ||
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 | ||
pre_final: | | ||
#Set environment variables for installing tzdata | ||
# Set environment variables for installing tzdata | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV TZ=Etc/UTC | ||
ENV CC=gcc | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,24 +16,26 @@ compilers: | |
set: | ||
I_MPI_PMI_LIBRARY: '/opt/slurm/lib/libpmi.so' | ||
extra_rpaths: [] | ||
# Spack gets confused if there is an Intel and a OneAPI compiler ... | ||
#- compiler: | ||
# spec: [email protected] | ||
# paths: | ||
# cc: /opt/intel/oneapi/compiler/2022.1.0/linux/bin/icx | ||
# cxx: /opt/intel/oneapi/compiler/2022.1.0/linux/bin/icpx | ||
# f77: /opt/intel/oneapi/compiler/2022.1.0/linux/bin/ifx | ||
# fc: /opt/intel/oneapi/compiler/2022.1.0/linux/bin/ifx | ||
# flags: {} | ||
# operating_system: ubuntu20.04 | ||
# target: x86_64 | ||
# modules: [] | ||
# environment: | ||
# #prepend_path: | ||
# # LD_LIBRARY_PATH: '/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/lib/intel64_lin' | ||
# set: | ||
# I_MPI_PMI_LIBRARY: '/opt/slurm/lib/libpmi.so' | ||
# extra_rpaths: [] | ||
- compiler: | ||
spec: [email protected] | ||
paths: | ||
cc: /mnt/experiments-efs/intel-oneapi-2024.0.2/compiler/2024.0/bin/icx | ||
cxx: /mnt/experiments-efs/intel-oneapi-2024.0.2/compiler/2024.0/bin/icpx | ||
f77: /mnt/experiments-efs/intel-oneapi-2024.0.2/compiler/2024.0/bin/ifort | ||
fc: /mnt/experiments-efs/intel-oneapi-2024.0.2/compiler/2024.0/bin/ifort | ||
flags: {} | ||
operating_system: ubuntu20.04 | ||
target: x86_64 | ||
modules: | ||
- tbb/2021.11 | ||
- compiler-rt/2024.0.2 | ||
- oclfpga/2024.0.0 | ||
- compiler/2024.0.2 | ||
- ifort/2024.0.2 | ||
environment: | ||
set: | ||
I_MPI_PMI_LIBRARY: '/opt/slurm/lib/libpmi.so' | ||
extra_rpaths: [] | ||
- compiler: | ||
spec: [email protected] | ||
paths: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
packages: | ||
all: | ||
compiler: [[email protected], [email protected]] | ||
#compiler: [oneapi@2022.1.0] | ||
#compiler: [oneapi@2024.0.2] | ||
providers: | ||
mpi: [[email protected], [email protected]] | ||
#mpi: [[email protected]] | ||
|
||
### MPI, Python, MKL | ||
mpi: | ||
|
@@ -16,11 +17,11 @@ packages: | |
- libfabric-aws/1.16.0~amzn4.0 | ||
- intelmpi | ||
#externals: | ||
#- spec: intel-oneapi-mpi@2021.6.0%oneapi@2022.1.0 | ||
# prefix: /opt/intel | ||
#- spec: intel-oneapi-mpi@2021.11%oneapi@2024.0.2 | ||
# prefix: /mnt/experiments-efs/intel-oneapi-2024.0.2 | ||
# modules: | ||
# - libfabric-aws/1.16.0~amzn4.0 | ||
# - intelmpi | ||
# - mpi/2021.11 | ||
openmpi: | ||
externals: | ||
- spec: [email protected]%[email protected]~cuda~cxx~cxx_exceptions~java~memchecker+pmi~static~wrapper-rpath | ||
|
@@ -32,10 +33,6 @@ packages: | |
|
||
### Modification of common packages | ||
|
||
# https://github.com/spack/spack/issues/42137 | ||
pflogger: | ||
variants: +mpi | ||
|
||
### All other external packages listed alphabetically | ||
autoconf: | ||
externals: | ||
|
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
32 changes: 32 additions & 0 deletions
32
spack-ext/repos/spack-stack/packages/jedi-geos-env/package.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other | ||
# Spack Project Developers. See the top-level COPYRIGHT file for details. | ||
# | ||
# SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||
|
||
from spack.package import * | ||
|
||
|
||
class JediGeosEnv(BundlePackage): | ||
"""Development environment for JEDI-GEOS""" | ||
|
||
homepage = "https://github.com/JCSDA/jedi-bundle" | ||
git = "https://github.com/JCSDA/jedi-bundle.git" | ||
|
||
maintainers("climbfuji", "srherbener") | ||
|
||
version("1.0.0") | ||
|
||
depends_on("jedi-base-env", type="run") | ||
#depends_on("blas", type="run") | ||
depends_on("mepo", type="run") | ||
depends_on("esmf", type="run") | ||
# mapl is built as part of GEOS, don't load; | ||
# needs external gftl-shared/fargparse/pflogger | ||
# depends_on("mapl", type="run") | ||
depends_on("gftl-shared", type="run") | ||
depends_on("fargparse", type="run") | ||
depends_on("pflogger", type="run") | ||
# | ||
depends_on("py-numpy", type="run") | ||
|
||
# There is no need for install() since there is no code. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
repo: | ||
namespace: spack-stack |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We haven't used this and I don't think we need it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I can go either way. I'm okay with removing it for now, but if we run into issues again like we had with the ESMF recipe where it was using the calling environment (incl. PATH) rather than the Spack build environment in places, then we should revisit and try to make it work on all systems (I don't remember how far I got with testing, I think it worked on more than just Acorn and Orion but those were the ones that needed added customization).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks. I'll take it out for now. I never had to do anything particular about the environment except for Cray systems where you need to have a separate set of modules loaded, depending on the compiler you build for (see Narwhal instructions). Since we've agreed today to move forward with separate environments for different compilers, that will be even less of an issue (again, essentially doing what we already do for Narwhal).