Skip to content

Commit

Permalink
Docker: Give i-Pi a bit more time to startup
Browse files Browse the repository at this point in the history
  • Loading branch information
oschuett committed Apr 15, 2020
1 parent 9927c90 commit 71703c0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tools/docker/scripts/test_i-pi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,25 @@ echo -e "\n========== Running i-Pi Tests =========="

cd /opt/i-pi/examples/cp2k/nvt-cl
set +e # disable error trapping for remainder of script
ulimit -t 300 # abort after 5 minutes

TIMEOUT_SEC="300"
ulimit -t ${TIMEOUT_SEC} # Limit cpu time.

# launch cp2k
(
mkdir -p run_1
cd run_1
echo 42 > cp2k_exit_code
sleep 2 # give i-pi some time to startup
sleep 10 # give i-pi some time to startup
export OMP_NUM_THREADS=2
mpiexec -np 2 /workspace/cp2k/exe/local/cp2k.pdbg ../in.cp2k
echo $? > cp2k_exit_code
) &

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

wait # for cp2k to shutdown
Expand Down

0 comments on commit 71703c0

Please sign in to comment.