mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-21 06:25:15 -04:00
make_cp2k.sh: Use Spack v1.2.0 (#5546)
This commit is contained in:
parent
cccb9b4cd4
commit
345b391c5e
4 changed files with 10 additions and 12 deletions
10
make_cp2k.sh
10
make_cp2k.sh
|
|
@ -914,7 +914,7 @@ echo ""
|
|||
### Build CP2K dependencies with Spack if needed or requested ###
|
||||
|
||||
# Spack version
|
||||
export SPACK_VERSION="${SPACK_VERSION:-1.1.1}"
|
||||
export SPACK_VERSION="${SPACK_VERSION:-1.2.1}"
|
||||
export SPACK_BUILD_PATH="${BUILD_PATH}/spack"
|
||||
export SPACK_ROOT="${SPACK_BUILD_PATH}/spack"
|
||||
|
||||
|
|
@ -1159,7 +1159,7 @@ if [[ ! -f "${SPACK_BUILD_PATH}/BUILD_DEPENDENCIES_COMPLETED" ]]; then
|
|||
spack compiler list
|
||||
|
||||
# Retrieve the newest compiler version found by spack
|
||||
GCC_VERSION_NEWEST="$(spack compilers | awk '/gcc/ {print $2}' | sort -V | tail -n 1)"
|
||||
GCC_VERSION_NEWEST="$(spack compilers | sed -nE 's/.*gcc@([0-9]+(\.[0-9]+)*).*/\1/p' | sort -V | tail -n 1)"
|
||||
echo "The newest GCC compiler version found by spack is ${GCC_VERSION_NEWEST}"
|
||||
GCC_VERSION_NEWEST="$(echo "${GCC_VERSION_NEWEST}" | sed -E -e 's/.*@([0-9]+).*/\1/' | cut -d. -f1)"
|
||||
|
||||
|
|
@ -1230,7 +1230,7 @@ if [[ ! -f "${SPACK_BUILD_PATH}/BUILD_DEPENDENCIES_COMPLETED" ]]; then
|
|||
${EXIT_CMD} 1
|
||||
fi
|
||||
# Concretize CP2K dependencies
|
||||
if ! spack -e "${CP2K_ENV}" concretize --fresh --jobs $((NUM_PROCS)); then
|
||||
if ! spack -e "${CP2K_ENV}" concretize --fresh --jobs "${NUM_PROCS}"; then
|
||||
echo -e "\nERROR: The spack concretize for environment \"${CP2K_ENV}\" failed"
|
||||
echo ""
|
||||
echo "HINT: The (-ue | --use_externals) flags can cause conflicts with outdated"
|
||||
|
|
@ -1257,7 +1257,7 @@ if [[ ! -f "${SPACK_BUILD_PATH}/BUILD_DEPENDENCIES_COMPLETED" ]]; then
|
|||
spack compiler list
|
||||
fi
|
||||
fi
|
||||
if ! spack -e "${CP2K_ENV}" --no-user-config --no-system-config concretize --fresh --jobs $((NUM_PROCS)); then
|
||||
if ! spack -e "${CP2K_ENV}" concretize --fresh --jobs "${NUM_PROCS}"; then
|
||||
echo -e "\nERROR: The spack concretize for environment \"${CP2K_ENV}\" failed"
|
||||
${EXIT_CMD} 1
|
||||
fi
|
||||
|
|
@ -1266,7 +1266,7 @@ if [[ ! -f "${SPACK_BUILD_PATH}/BUILD_DEPENDENCIES_COMPLETED" ]]; then
|
|||
((VERBOSE > 0)) && spack find -c
|
||||
|
||||
# Install CP2K dependencies via Spack
|
||||
if ! spack -e "${CP2K_ENV}" install --jobs "$((NUM_PROCS / NUM_PACKAGES))" --concurrent-packages "${NUM_PACKAGES}" "${VERBOSE_SPACK}"; then
|
||||
if ! spack -e "${CP2K_ENV}" install -j "${NUM_PROCS}" -p "${NUM_PACKAGES}" "${VERBOSE_SPACK}"; then
|
||||
echo "ERROR: Building the CP2K dependencies with spack failed"
|
||||
if [[ "${USE_EXTERNALS}" == "yes" ]]; then
|
||||
echo "HINT: Try to re-run the build without the (-ue | --use_externals) flag which avoids"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Usage: ./spack_cache_start.sh; podman build --shm-size=1g -t spack_ssmp-static -f ./Dockerfile.test_spack_ssmp-static ../../
|
||||
#
|
||||
|
||||
ARG BASE_IMAGE="ubuntu:24.04"
|
||||
ARG BASE_IMAGE="ubuntu:26.04"
|
||||
|
||||
###### Stage 1: Build CP2K dependencies ######
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ WORKDIR /opt/cp2k
|
|||
COPY ./tools/spack ./tools/spack
|
||||
COPY ./tools/docker ./tools/docker
|
||||
COPY ./make_cp2k.sh .
|
||||
RUN ./make_cp2k.sh -bd_only -cv ssmp-static -gpu none -gv 14 -mpi no
|
||||
RUN ./make_cp2k.sh -bd_only -cv ssmp-static -gpu none -mpi no
|
||||
|
||||
###### Stage 2: Build CP2K ######
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ COPY ./tools/build_utils ./tools/build_utils
|
|||
COPY ./cmake ./cmake
|
||||
COPY ./CMakeLists.txt .
|
||||
|
||||
RUN ./make_cp2k.sh -cv ssmp-static -gv 14 -gpu none -mpi no
|
||||
RUN ./make_cp2k.sh -cv ssmp-static -gpu none -mpi no
|
||||
|
||||
###### Stage 3: Install CP2K ######
|
||||
|
||||
|
|
|
|||
|
|
@ -192,8 +192,6 @@ def main() -> None:
|
|||
install_cp2k_spack(
|
||||
version="ssmp-static",
|
||||
mpi_mode="no",
|
||||
base_image="ubuntu:24.04",
|
||||
gcc_version=14,
|
||||
testopts=testopts,
|
||||
image_tag=f.image_tag,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -48,8 +48,8 @@ class Libint(CMakePackage):
|
|||
depends_on("cxx", type="build")
|
||||
depends_on("fortran", type="build", when="+fortran")
|
||||
|
||||
depends_on("boost", type="build")
|
||||
depends_on("eigen", type="build")
|
||||
depends_on("boost")
|
||||
depends_on("eigen")
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
env.append_flags("CXXFLAGS", "-g1")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue