-
Notifications
You must be signed in to change notification settings - Fork 3
Fix spack images #35
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
base: v4
Are you sure you want to change the base?
Fix spack images #35
Changes from all commits
f1ff66e
c03daa1
ea0fc3e
c176f6a
9c43f41
e7a1429
e449b3a
d96d6ab
cde58a9
c7ada36
f42369b
3f5a168
1a5b5fb
3eb932a
33b7e57
ca817da
c1a8e5d
530225d
bdcfa84
a28a51a
393f34c
3e26a3c
f33be62
9ce34e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -141,3 +141,4 @@ jobs: | |
| LIBS=${{ matrix.level }} | ||
| tags: | | ||
| ${{ steps.info.outputs.fullspack }} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,22 +36,37 @@ ARG COMPILER | |
| ARG SPACK_INSTALL_ARGS="--show-log-on-error --fail-fast" | ||
|
|
||
| # Install the spack compiler with our latest system compiler | ||
| COPY ${COMPILER}.lst compilerpkg.lst | ||
| RUN spack solve -I -U \ | ||
| "$(cat compilerpkg.lst)%$(spack compilers | tr ' ' '\n' | grep @)" \ | ||
| && spack install ${SPACK_INSTALL_ARGS} -U \ | ||
| "$(cat compilerpkg.lst)%$(spack compilers | tr ' ' '\n' | grep @)" | ||
|
|
||
|
|
||
| # Prevent building any new compiler | ||
| RUN spack config --scope site add 'packages:llvm:buildable: false' | ||
| RUN spack config --scope site add 'packages:gcc:buildable: false' | ||
| COPY ${COMPILER}.lst compilerpkg.lst | ||
| RUN <<'EORUN' | ||
| set -e | ||
| COMPILER_PKG="$(cat compilerpkg.lst)" | ||
| SPACK_VERSION="$(spack compilers | tr ' ' '\n' | grep @)" | ||
|
JAuriac marked this conversation as resolved.
JAuriac marked this conversation as resolved.
|
||
| # Select the ~bootstrap gcc variant as the 3-stage bootstrap fails on latest spack | ||
| if [[ "$COMPILER_PKG" == gcc* ]] | ||
| then | ||
| COMPILER_SPECIFIC_VARIANTS="~bootstrap" | ||
| else | ||
| COMPILER_SPECIFIC_VARIANTS="" | ||
| fi | ||
| spack solve -I -U ${COMPILER_PKG}${COMPILER_SPECIFIC_VARIANTS}%${SPACK_VERSION} \ | ||
| && spack install ${SPACK_INSTALL_ARGS} -U "${COMPILER_PKG}${COMPILER_SPECIFIC_VARIANTS}%${SPACK_VERSION}" | ||
| EORUN | ||
|
|
||
| # Prevent building any new compiler and set compiler flags for doxygen to support LTO | ||
| RUN <<'EORUN' | ||
| set -e | ||
| spack config --scope site add "packages:llvm:buildable:false" | ||
| spack config --scope site add "packages:gcc:buildable:false" | ||
| if spack --version | grep -qs '^1\.' && spack find llvm &>/dev/null | ||
| then | ||
| spack config --scope site add "packages:doxygen:require:ldflags=-fuse-ld=lld" | ||
| fi | ||
| EORUN | ||
|
|
||
| # Generate a compiler ref | ||
| # * before 1.0, rely on the compilers section and generate a mixed compiler for llvm | ||
| # * from spack 1.0 on, define a toolchain | ||
| RUN <<EORUN | ||
| RUN <<'EORUN' | ||
| set -e | ||
| if ( spack --version | grep -qs '^1\.' ) | ||
| then | ||
|
|
@@ -86,39 +101,42 @@ else | |
| fi | ||
| EORUN | ||
|
|
||
|
|
||
| # Install an environment with our base libraries using the compiler ref we just generated | ||
| # Create an environment with our base libraries using the compiler ref we just generated | ||
| COPY <<'EOCOPY' spack.yaml | ||
| spack: | ||
| view: false | ||
| definitions: | ||
| - buildeps: [] | ||
| - compiler: [] | ||
| - libs: [] | ||
| - mpi: [] | ||
| - mpilibs: [] | ||
| specs: | ||
| - '$buildeps' | ||
| - matrix: | ||
| - ['$%compiler'] | ||
| - - '$libs' | ||
| - '$mpi' | ||
| - matrix: | ||
| - ['$%compiler'] | ||
| - ['$^mpi'] | ||
| - ['$mpilibs'] | ||
| - $buildeps | ||
| - $libs | ||
| - $mpi | ||
| - $mpilibs | ||
|
Comment on lines
+114
to
+117
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why remove the matrix ?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was causing an error (see the comment on line 122). I couldn't find a related issue in Spack, but removing the matrix seems to fix the problem. I am still a bit confused about this error, maybe someone with more experience in Spack can investigate it further. |
||
| EOCOPY | ||
| RUN spack env create pdienv spack.yaml | ||
| COPY deps.sh deps.sh | ||
| RUN . deps.sh && spack -e pdienv add -l buildeps ${BASE_BUILDDEPS} | ||
| RUN . deps.sh && spack -e pdienv add -l libs ${BASE_LIBS} | ||
| RUN <<EORUN | ||
|
|
||
| # The toolchain is attached directly to each lib spec (string-parsed), which | ||
| # avoids the matrix that crashes in expand_toolchains on latest spack | ||
| RUN <<'EORUN' | ||
| set -e | ||
| if ( spack --version | grep -qs '^1\.' ) | ||
| then spack -e pdienv add -l compiler pditoolchain | ||
| else spack -e pdienv add -l compiler "$(spack compilers | tr ' ' '\n' | grep @)" | ||
| . deps.sh | ||
| if spack --version | grep -qs '^1\.' | ||
| then COMPILER_REF="%pditoolchain" | ||
| else COMPILER_REF="%$(spack compilers | tr ' ' '\n' | grep @)" | ||
|
JAuriac marked this conversation as resolved.
|
||
| fi | ||
| for p in ${BASE_BUILDDEPS}; do | ||
| spack -e pdienv add -l buildeps "$p" | ||
| done | ||
| for p in ${BASE_LIBS}; do | ||
| spack -e pdienv add -l libs "$p ${COMPILER_REF}" | ||
| done | ||
| EORUN | ||
|
|
||
| # Concretize, fetch, install | ||
| RUN spack -e pdienv concretize --reuse | ||
| RUN spack -e pdienv fetch \ | ||
| || spack -e pdienv fetch \ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| llvm+llvm_dylib+link_llvm_dylib~lldb | ||
| llvm+llvm_dylib+link_llvm_dylib+lld~lldb |
|
iole-bolognesi marked this conversation as resolved.
|
|
iole-bolognesi marked this conversation as resolved.
|
|
iole-bolognesi marked this conversation as resolved.
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -173,4 +173,4 @@ RUN export VERBOSE=1 \ | |
|
|
||
|
|
||
|
|
||
| FROM main | ||
| FROM main | ||
Uh oh!
There was an error while loading. Please reload this page.