Skip to content

Commit

Permalink
Docker: Fix i-PI test
Browse files Browse the repository at this point in the history
  • Loading branch information
oschuett committed Jan 26, 2024
1 parent a1add34 commit 8dc197e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tools/docker/scripts/test_i-pi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,24 @@ echo -e "\n========== Installing Dependencies =========="
apt-get update -qq
apt-get install -qq --no-install-recommends \
python3 \
python3-venv \
python3-pip \
python3-wheel \
python3-setuptools
rm -rf /var/lib/apt/lists/*

# Create and activate a virtual environment for Python packages.
python3 -m venv /opt/venv
export PATH="/opt/venv/bin:$PATH"

echo -e "\n========== Installing i-Pi =========="
git clone --quiet --depth=1 --single-branch -b master https://github.com/i-pi/i-pi.git /opt/i-pi
cd /opt/i-pi
pip3 install --quiet .

echo -e "\n========== Running i-Pi Tests =========="

cd /opt/i-pi/examples/clients/cp2k/nvt-cl
cd /opt/i-pi/examples/clients/cp2k/nvt_cl
set +e # disable error trapping for remainder of script

TIMEOUT_SEC="300"
Expand All @@ -56,7 +61,7 @@ ulimit -t ${TIMEOUT_SEC} # Limit cpu time.
# launch i-pi
sed -i "s/total_steps>1000/total_steps>10/" input.xml
# Limit walltime too, because waiting for a connection consumes no cpu time.
timeout ${TIMEOUT_SEC} /usr/local/bin/i-pi input.xml
timeout ${TIMEOUT_SEC} i-pi input.xml
IPI_EXIT_CODE=$?

wait # for cp2k to shutdown
Expand Down

0 comments on commit 8dc197e

Please sign in to comment.