Skip to content

Commit

Permalink
Update CI pipelines to find compilers using spack external find
Browse files Browse the repository at this point in the history
spack compiler find no longer finds nvhpc, but spack external find does.
  • Loading branch information
msimberg committed Sep 6, 2024
1 parent 88fae0f commit 4fa0d56
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .gitlab/docker/Dockerfile.spack_compiler
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,20 @@ RUN spack compiler info $COMPILER > /dev/null 2> /dev/null; compiler_missing=$?;
fi && \
if [[ $compiler_missing != 0 ]]; then \
spack install $spack_compiler arch=$SPACK_ARCH && \
spack compiler add --scope site $(spack location -i $spack_compiler) && \
spack external find \
--scope site \
--path $(spack location -i $spack_compiler) gcc llvm && \
\
printf " all:\n require:\n - one_of: [\"%%${COMPILER}\"${NVHPC_COMPILER:+,\"%%}${NVHPC_COMPILER}${NVHPC_COMPILER:+\"}]" \
>> $SPACK_ROOT/etc/spack/packages.yaml && \
\
if [[ ! -z "$NVHPC_COMPILER" ]]; then \
nvhpc_version=${NVHPC_COMPILER#nvhpc@} && \
spack install $NVHPC_COMPILER%$spack_compiler arch=$SPACK_ARCH && \
spack compiler add --scope site \
$(spack location -i $NVHPC_COMPILER)/Linux_x86_64/$nvhpc_version/compilers/bin; \
spack external find \
--scope site \
--path $(spack location -i $NVHPC_COMPILER)/Linux_x86_64/$nvhpc_version/compilers/bin \
nvhpc; \
fi && \
spack clean --all; \
fi
Expand Down

0 comments on commit 4fa0d56

Please sign in to comment.