Partially revert #3992 and apply alternative fix

This commit is contained in:
Matthias Krack 2025-02-17 14:08:34 +01:00
parent 3a88bc4878
commit df7a5c31cb
8 changed files with 17 additions and 18 deletions

View file

@ -22,7 +22,7 @@ COPY ./tools/toolchain/scripts/VERSION \
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
RUN ./install_cp2k_toolchain.sh \
--install-all \
--mpi-mode=mpich \
--mpi-mode=no \
--with-dbcsr \
--with-gcc=system \
--dry-run

View file

@ -22,7 +22,7 @@ COPY ./tools/toolchain/scripts/VERSION \
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
RUN ./install_cp2k_toolchain.sh \
--install-all \
--mpi-mode=mpich \
--mpi-mode=no \
--with-dbcsr \
--with-gcc=system \
--dry-run

View file

@ -22,7 +22,7 @@ COPY ./tools/toolchain/scripts/VERSION \
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
RUN ./install_cp2k_toolchain.sh \
--install-all \
--mpi-mode=mpich \
--mpi-mode=no \
--with-dbcsr \
--with-gcc=system \
--dry-run

View file

@ -22,7 +22,7 @@ COPY ./tools/toolchain/scripts/VERSION \
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
RUN ./install_cp2k_toolchain.sh \
--install-all \
--mpi-mode=mpich \
--mpi-mode=no \
--with-dbcsr \
--with-gcc=system \
--dry-run

View file

@ -132,7 +132,7 @@ def main() -> None:
for name in "aiida", "ase", "gromacs", "i-pi":
with OutputFile(f"Dockerfile.test_{name}", args.check) as f:
f.write(install_deps_toolchain(with_dbcsr=""))
f.write(install_deps_toolchain(mpi_mode="no", with_dbcsr=""))
f.write(test_3rd_party(name))
for name in "misc", "doxygen":

View file

@ -3,7 +3,7 @@
# author: Ole Schuett
# Compile CP2K.
./build_cp2k_cmake.sh "toolchain" "psmp" || exit 0
./build_cp2k_cmake.sh "toolchain" "ssmp" || exit 0
echo -e "\n========== Installing Dependencies =========="
apt-get update -qq
@ -24,8 +24,7 @@ apt-get install -qq --no-install-recommends \
sudo \
git \
ssh \
mpich
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/*
# Create and activate a virtual environment for Python packages.
python3 -m venv /opt/venv
@ -67,13 +66,13 @@ ln -s /bin/true /usr/bin/aiida-pseudo
# setup code
mkdir -p /opt/conda/envs/cp2k/bin/
cat > /opt/conda/envs/cp2k/bin/cp2k.psmp << EndOfMessage
cat > /opt/conda/envs/cp2k/bin/cp2k.ssmp << EndOfMessage
#!/bin/bash -e
export OMP_NUM_THREADS=2
source /opt/cp2k-toolchain/install/setup
/opt/cp2k/build/bin/cp2k.psmp "\$@"
/opt/cp2k/build/bin/cp2k.ssmp "\$@"
EndOfMessage
chmod +x /opt/conda/envs/cp2k/bin/cp2k.psmp
chmod +x /opt/conda/envs/cp2k/bin/cp2k.ssmp
echo -e "\n========== Running AiiDA-CP2K Tests =========="
set +e # disable error trapping for remainder of script

View file

@ -3,7 +3,7 @@
# author: Ole Schuett
# Compile CP2K.
./build_cp2k_cmake.sh "toolchain" "psmp" || exit 0
./build_cp2k_cmake.sh "toolchain" "ssmp" || exit 0
# Fake installation of data files.
mkdir -p ./share/cp2k
@ -13,7 +13,7 @@ cat > /usr/bin/cp2k_shell << EndOfMessage
#!/bin/bash -e
export OMP_NUM_THREADS=1
source /opt/cp2k-toolchain/install/setup
/opt/cp2k/build/bin/cp2k.psmp --shell "\$@"
/opt/cp2k/build/bin/cp2k.ssmp --shell "\$@"
EndOfMessage
chmod +x /usr/bin/cp2k_shell
@ -23,7 +23,7 @@ cat > /usr/bin/cp2k << EndOfMessage
#!/bin/bash -e
export OMP_NUM_THREADS=1
source /opt/cp2k-toolchain/install/setup
/opt/cp2k/build/bin/cp2k.psmp "\$@"
/opt/cp2k/build/bin/cp2k.ssmp "\$@"
EndOfMessage
chmod +x /usr/bin/cp2k

View file

@ -6,7 +6,7 @@
source /opt/cp2k-toolchain/install/setup
# Compile CP2K.
./build_cp2k_cmake.sh "toolchain" "psmp" || exit 0
./build_cp2k_cmake.sh "toolchain" "ssmp" || exit 0
echo -e "\n========== Installing Dependencies =========="
apt-get update -qq
@ -43,7 +43,7 @@ ulimit -t ${TIMEOUT_SEC} # Limit cpu time.
cd run_1
echo 42 > cp2k_exit_code
sleep 10 # give i-pi some time to startup
OMP_NUM_THREADS=2 /opt/cp2k/build/bin/cp2k.psmp ../in.cp2k
OMP_NUM_THREADS=2 /opt/cp2k/build/bin/cp2k.ssmp ../in.cp2k
echo $? > cp2k_exit_code
) &
@ -83,14 +83,14 @@ export OMP_NUM_THREADS=2
cd run_client
echo 42 > cp2k_client_exit_code
sleep 10 # give server some time to startup
/opt/cp2k/build/bin/cp2k.psmp /opt/cp2k/tests/i-PI/ipi_client.inp
/opt/cp2k/build/bin/cp2k.ssmp /opt/cp2k/tests/i-PI/ipi_client.inp
echo $? > cp2k_client_exit_code
) &
# launch cp2k in server mode
mkdir -p run_server
cd run_server
/opt/cp2k/build/bin/cp2k.psmp /opt/cp2k/tests/i-PI/ipi_server.inp
/opt/cp2k/build/bin/cp2k.ssmp /opt/cp2k/tests/i-PI/ipi_server.inp
SERVER_EXIT_CODE=$?
wait # for cp2k client to shutdown