Debian Codegraph @

debian/tests/mpi4py-test

raw
1 #!/bin/bash
2
3 # testing on 5 processes is recommended by upstream where possible
4 # and is safe to oversubscribe with OpenMPI
5 # but oversubscribing might be a problem (runs slow) with mpich
6 # 32-bit arm is fine, but there are problems with i386
7
8 DEB_HOST_ARCH=`dpkg-architecture -qDEB_HOST_ARCH`
9 DEB_HOST_ARCH_BITS=`dpkg-architecture -qDEB_HOST_ARCH_BITS`
10
11 nproc=`nproc`
12 MIN_PROC=$(( nproc > 2 ? nproc : 2 ))
13 NUM_PROC=$(( MIN_PROC > 5 ? 5 : MIN_PROC ))
14
15 echo -e "nproc reports ${nproc} processing units available (using ${NUM_PROC})\n"
16
17 ARCH_DEFAULT_MPI_IMPL=`grep ARCH_DEFAULT_MPI_IMPL /usr/share/mpi-default-dev/debian_defaults | sed "s/^.*=//"`
18
19 declare -a DISABLED_TESTS
20
21 # testContiguousBigMPI fails on 32-bit systems
22 # https://github.com/mpi4py/mpi4py/issues/670
23 if [ "x${DEB_HOST_ARCH_BITS}" = "x32" ]; then
24 DISABLED_TESTS=("${DISABLED_TESTS[@]}" testContiguousBigMPI)
25 fi
26
27 # test_spawn fails with openmpi, see Bug#1100120
28 if [ "x${ARCH_DEFAULT_MPI_IMPL}" = "xopenmpi" ]; then
29 DISABLED_TESTS=("${DISABLED_TESTS[@]}" test_spawn)
30 fi
31
32 if [ "${DEB_HOST_ARCH}" = "i386" ]; then
33 DISABLED_TESTS=("${DISABLED_TESTS[@]}"
34 # fails in debci, Bug#1131533
35 TestCCOBufWorld.testAllgather TestCCOBufWorldDup.testAllgather
36 TestCCOVecWorld.testAllgatherv3
37 TestCCOVecWorld.testGatherv3 TestCCOVecWorldDup.testGatherv3
38 )
39 fi
40
41 if [ "${DEB_HOST_ARCH}" = "s390x" ]; then
42 DISABLED_TESTS=("${DISABLED_TESTS[@]}"
43 # segfault via PMIX (PMIX_ERR_BAD_PARAM) in test_dynproc.TestDPM
44 TestDPM
45
46 # failing RMA tests from test_rma_nb
47 testAccumulate testGetAccumulate
48 )
49 fi
50
51 TESTS_SEPARATOR=" -x "
52 DISABLED_TESTS_STRING=$(printf "${TESTS_SEPARATOR}%s" "${DISABLED_TESTS[@]}")
53 if [ "${DISABLED_TESTS_STRING}" = "${TESTS_SEPARATOR}" ]; then
54 DISABLED_TESTS_STRING=""
55 fi
56
57 for pyver in `py3versions -vs`; do
58 PRTE_MCA_rmaps_default_mapping_policy=:oversubscribe \
59 OMPI_MCA_btl_tcp_if_include=lo \
60 GITHUB_ACTIONS=true MPI4PY_TEST_SPAWN=false \
61 mpiexec -v -n $NUM_PROC python$pyver test/runtests.py --verbose ${DISABLED_TESTS_STRING}
62 done