python unit test test_function.py fails with MPI

Issue #1130 new
Drew Parsons created an issue

Testing the current Debian build of dolfin, tests continue to pass in single process mode, but many tests from test_function.py in python/test/unit/function/ fail when run with mpi (openmpi):

$ mpirun -n 3 pytest-3 -v test_function.py 
=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.10.4, pytest-6.2.5, py-1.10.0, pluggy-1.0.0 -- /usr/bin/python3
=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.10.4, pytest-6.2.5, py-1.10.0, pluggy-1.0.0 -- /usr/bin/python3
=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.10.4, pytest-6.2.5, py-1.10.0, pluggy-1.0.0 -- /usr/bin/python3
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/build/tests/output/.hypothesis/examples')
rootdir: /build/tests/output
plugins: asyncio-0.18.2, xvfb-2.0.0, arraydiff-0.5.0, cov-3.0.0, hypothesis-6.36.0, flaky-3.7.0, astropy-header-0.2.1, remotedata-0.3.3, filter-subpackage-0.1.1, doctestplus-0.12.0, mpi-0.6, openfiles-0.5.0, mock-3.6.1
asyncio: mode=legacy
collecting ... cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/build/tests/output/.hypothesis/examples')
rootdir: /build/tests/output
plugins: asyncio-0.18.2, xvfb-2.0.0, arraydiff-0.5.0, cov-3.0.0, hypothesis-6.36.0, flaky-3.7.0, astropy-header-0.2.1, remotedata-0.3.3, filter-subpackage-0.1.1, doctestplus-0.12.0, mpi-0.6, openfiles-0.5.0, mock-3.6.1
asyncio: mode=legacy
collecting ... cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/build/tests/output/.hypothesis/examples')
rootdir: /build/tests/output
plugins: asyncio-0.18.2, xvfb-2.0.0, arraydiff-0.5.0, cov-3.0.0, hypothesis-6.36.0, flaky-3.7.0, astropy-header-0.2.1, remotedata-0.3.3, filter-subpackage-0.1.1, doctestplus-0.12.0, mpi-0.6, openfiles-0.5.0, mock-3.6.1
asyncio: mode=legacy
collected 19 items                                                                                                                                                                                                

collected 19 items                                                                                                                                                                                                
collected 19 items                                                                                                                                                                                                

test_function.py::test_name_argument 
test_function.py::test_name_argument PASSED                                                                                                                                                                 [  5%]PASSED                                                                                                                                                                 [  5%]PASSED                                                                                                                                                                 [  5%]
test_function.py::test_in_function_space 

test_function.py::test_in_function_space test_function.py::test_in_function_space PASSED                                                                                                                                                             [ 10%]
test_function.py::test_compute_vertex_values PASSED                                                                                                                                                             [ 10%]PASSED                                                                                                                                                             [ 10%]
test_function.py::test_compute_vertex_values 
test_function.py::test_compute_vertex_values PASSED                                                                                                                                                         [ 15%]PASSED                                                                                                                                                         [ 15%]PASSED                                                                                                                                                         [ 15%]
test_function.py::test_assign 
test_function.py::test_assign 
test_function.py::test_assign PASSED                                                                                                                                                                        [ 21%]PASSED                                                                                                                                                                        [ 21%]PASSED                                                                                                                                                                        [ 21%]
test_function.py::test_axpy 
test_function.py::test_axpy 
test_function.py::test_axpy PASSED                                                                                                                                                                          [ 26%]PASSED                                                                                                                                                                          [ 26%]PASSED                                                                                                                                                                          [ 26%]
test_function.py::test_call 
test_function.py::test_call 
test_function.py::test_call ERROR                                                                                                                                                                           [ 31%]
test_function.py::test_constant_float_conversion PASSED                                                                                                                                                     [ 36%]
test_function.py::test_real_function_float_conversion1 ERROR                                                                                                                                                                           [ 31%]
test_function.py::test_constant_float_conversion PASSED                                                                                                                                                     [ 36%]
test_function.py::test_real_function_float_conversion1 ERROR                                                                                                                                                [ 42%]ERROR                                                                                                                                                [ 42%]
test_function.py::test_real_function_float_conversion2 
test_function.py::test_real_function_float_conversion2 ERROR                                                                                                                                                [ 47%]
test_function.py::test_real_function_float_conversion3 ERROR                                                                                                                                                [ 47%]
test_function.py::test_real_function_float_conversion3 ERROR                                                                                                                                                [ 52%]
test_function.py::test_scalar_conditions ERROR                                                                                                                                                [ 52%]
test_function.py::test_scalar_conditions ERROR                                                                                                                                                              [ 57%]
test_function.py::test_interpolation_mismatch_rank0 ERROR                                                                                                                                                              [ 57%]
test_function.py::test_interpolation_mismatch_rank0 ^\Quit

Apart from the specific test errors list here, the test run also hangs.

The problem can be seen in debian test logs (non-verbose, reporting only the time-out at test_function.py) and was reported at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1008225

For Debian I’ll work around the problem by skipping test_function.py in the MPI unit tests.

Comments (1)

  1. Log in to comment