Skip to content

Commit ec176d3

Browse files
authored
Fix CI timeouts (#4458)
* Do not use 'mpiexec -n 1' for serial tests This was causing a hang during MPI_Finalize. * modify timeouts
1 parent 5360642 commit ec176d3

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.github/workflows/core.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ jobs:
233233
: # Use pytest-xdist here so we can have a single collated output (not possible
234234
: # for parallel tests)
235235
firedrake-run-split-tests 1 1 -n 8 "$EXTRA_PYTEST_ARGS" firedrake-repo/tests/tsfc
236-
timeout-minutes: 60
236+
timeout-minutes: 10
237237

238238
- name: Run PyOP2 tests
239239
if: inputs.run_tests && (success() || steps.install.conclusion == 'success')
@@ -245,7 +245,7 @@ jobs:
245245
firedrake-run-split-tests 2 4 "$EXTRA_PYTEST_ARGS" firedrake-repo/tests/pyop2
246246
firedrake-run-split-tests 3 2 "$EXTRA_PYTEST_ARGS" firedrake-repo/tests/pyop2
247247
firedrake-run-split-tests 4 2 "$EXTRA_PYTEST_ARGS" firedrake-repo/tests/pyop2
248-
timeout-minutes: 15
248+
timeout-minutes: 10
249249

250250

251251
- name: Run Firedrake tests (nprocs = 1)
@@ -255,14 +255,14 @@ jobs:
255255
: # Use pytest-xdist here so we can have a single collated output (not possible
256256
: # for parallel tests)
257257
firedrake-run-split-tests 1 1 -n 8 "$EXTRA_PYTEST_ARGS" firedrake-repo/tests/firedrake
258-
timeout-minutes: 60
258+
timeout-minutes: 90
259259

260260
- name: Run tests (nprocs = 2)
261261
if: inputs.run_tests && (success() || steps.install.conclusion == 'success')
262262
run: |
263263
. venv/bin/activate
264264
firedrake-run-split-tests 2 4 "$EXTRA_PYTEST_ARGS" firedrake-repo/tests/firedrake
265-
timeout-minutes: 30
265+
timeout-minutes: 60
266266

267267
- name: Run tests (nprocs = 3)
268268
if: inputs.run_tests && (success() || steps.install.conclusion == 'success')

scripts/firedrake-run-split-tests

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,14 @@ extra_args=${@:3}
3535
cache_cmd="PYOP2_CACHE_DIR=\$VIRTUAL_ENV/.cache/pyop2/job{#} \
3636
FIREDRAKE_TSFC_KERNEL_CACHE_DIR=\$VIRTUAL_ENV/.cache/tsfc/job{#}"
3737

38-
pytest_exec="mpiexec -n ${num_procs} python -m pytest"
38+
if [ $num_procs = 1 ]; then
39+
# Cannot use mpiexec -n 1 because this can sometimes hang with
40+
# OpenMPI at MPI_Finalize
41+
pytest_exec="python3 -m pytest"
42+
else
43+
pytest_exec="mpiexec -n ${num_procs} python3 -m pytest"
44+
fi
3945
marker_spec="parallel[${num_procs}]"
40-
4146
pytest_cmd="${pytest_exec} -v \
4247
--splits ${num_jobs} --group {#} \
4348
-m ${marker_spec} ${extra_args}"

0 commit comments

Comments
 (0)