firedrakeproject / firedrake

Firedrake is an automated system for the portable solution of partial differential equations using the finite element method (FEM)
https://firedrakeproject.org
Other
513 stars 160 forks source link

INSTALL: Tests not passing on fresh install M2 Mac #3793

Open eloayza-romero opened 4 weeks ago

eloayza-romero commented 4 weeks ago

Describe the error Smoke tests don't pass on fresh install

Steps to Reproduce firedrake-install --netgen --package-branch petsc JDBetteridge/merge_upstream

ie: The exact command used for installation/update '...'

Expected behavior Describe what you expected to happen.

Error message

============================= test session starts ==============================
platform darwin -- Python 3.11.10, pytest-8.3.3, pluggy-1.5.0 -- /Users/kloayzar/firedrake/bin/python
cachedir: .pytest_cache
rootdir: /Users/kloayzar/firedrake/src/firedrake
configfile: setup.cfg
plugins: anyio-4.6.0, mpi-0.1, nbval-0.11.0, xdist-3.6.1
collecting ... collected 3615 items / 3588 deselected / 1 skipped / 27 selected

tests/regression/test_dg_advection.py::test_dg_advection_icosahedral_sphere PASSED [  3%]
tests/regression/test_dg_advection.py::test_dg_advection_icosahedral_sphere_parallel FAILED [  7%]
tests/regression/test_dg_advection.py::test_dg_advection_cubed_sphere PASSED [ 11%]
tests/regression/test_dg_advection.py::test_dg_advection_cubed_sphere_parallel FAILED [ 14%]
tests/regression/test_poisson_strong_bcs.py::test_poisson_analytic[params0-1-False] PASSED [ 18%]
tests/regression/test_poisson_strong_bcs.py::test_poisson_analytic[params1-1-True] PASSED [ 22%]
tests/regression/test_poisson_strong_bcs.py::test_poisson_analytic[params2-2-False] PASSED [ 25%]
tests/regression/test_poisson_strong_bcs.py::test_poisson_analytic[params3-2-True] PASSED [ 29%]
tests/regression/test_poisson_strong_bcs.py::test_poisson_analytic[params4-1-False] PASSED [ 33%]
tests/regression/test_poisson_strong_bcs.py::test_poisson_analytic[params5-1-True] PASSED [ 37%]
tests/regression/test_poisson_strong_bcs.py::test_poisson_analytic[params6-2-False] PASSED [ 40%]
tests/regression/test_poisson_strong_bcs.py::test_poisson_analytic[params7-2-True] PASSED [ 44%]
tests/regression/test_poisson_strong_bcs.py::test_poisson_analytic_linear[params0-1-False] PASSED [ 48%]
tests/regression/test_poisson_strong_bcs.py::test_poisson_analytic_linear[params1-1-True] PASSED [ 51%]
tests/regression/test_poisson_strong_bcs.py::test_poisson_analytic_linear[params2-2-False] PASSED [ 55%]
tests/regression/test_poisson_strong_bcs.py::test_poisson_analytic_linear[params3-2-True] PASSED [ 59%]
tests/regression/test_poisson_strong_bcs.py::test_poisson_analytic_linear[params4-1-False] PASSED [ 62%]
tests/regression/test_poisson_strong_bcs.py::test_poisson_analytic_linear[params5-1-True] PASSED [ 66%]
tests/regression/test_poisson_strong_bcs.py::test_poisson_analytic_linear[params6-2-False] PASSED [ 70%]
tests/regression/test_poisson_strong_bcs.py::test_poisson_analytic_linear[params7-2-True] PASSED [ 74%]
tests/regression/test_poisson_strong_bcs.py::test_poisson_analytic_linear_parallel FAILED [ 77%]
tests/regression/test_poisson_strong_bcs_nitsche.py::test_poisson_nitsche[1-False] PASSED [ 81%]
tests/regression/test_poisson_strong_bcs_nitsche.py::test_poisson_nitsche[1-True] PASSED [ 85%]
tests/regression/test_poisson_strong_bcs_nitsche.py::test_poisson_nitsche[2-False] PASSED [ 88%]
tests/regression/test_poisson_strong_bcs_nitsche.py::test_poisson_nitsche[2-True] PASSED [ 92%]
tests/regression/test_stokes_mini.py::test_stokes_mini[aij] PASSED       [ 96%]
tests/regression/test_stokes_mini.py::test_stokes_mini[nest] PASSED      [100%]

=================================== FAILURES ===================================
________________ test_dg_advection_icosahedral_sphere_parallel _________________

args = (), kwargs = {}

    def parallel_callback(*args, **kwargs):
>       subprocess.run(cmd, check=True)

../pytest-mpi/pytest_mpi.py:210: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

input = None, capture_output = False, timeout = None, check = True
popenargs = (['mpiexec', '-n', '1', '-genv', '_PYTEST_MPI_CHILD_PROCESS', '1', ...],)
kwargs = {}
process = <Popen: returncode: 15 args: ['mpiexec', '-n', '1', '-genv', '_PYTEST_MPI_CH...>
stdout = None, stderr = None, retcode = 15

    def run(*popenargs,
            input=None, capture_output=False, timeout=None, check=False, **kwargs):
        """Run command with arguments and return a CompletedProcess instance.

        The returned instance will have attributes args, returncode, stdout and
        stderr. By default, stdout and stderr are not captured, and those attributes
        will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
        or pass capture_output=True to capture both.

        If check is True and the exit code was non-zero, it raises a
        CalledProcessError. The CalledProcessError object will have the return code
        in the returncode attribute, and output & stderr attributes if those streams
        were captured.

        If timeout is given, and the process takes too long, a TimeoutExpired
        exception will be raised.

        There is an optional argument "input", allowing you to
        pass bytes or a string to the subprocess's stdin.  If you use this argument
        you may not also use the Popen constructor's "stdin" argument, as
        it will be used internally.

        By default, all communication is in bytes, and therefore any "input" should
        be bytes, and the stdout and stderr will be bytes. If in text mode, any
        "input" should be a string, and stdout and stderr will be strings decoded
        according to locale encoding, or by "encoding" if set. Text mode is
        triggered by setting any of text, encoding, errors or universal_newlines.

        The other arguments are the same as for the Popen constructor.
        """
        if input is not None:
            if kwargs.get('stdin') is not None:
                raise ValueError('stdin and input arguments may not both be used.')
            kwargs['stdin'] = PIPE

        if capture_output:
            if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
                raise ValueError('stdout and stderr arguments may not be used '
                                 'with capture_output.')
            kwargs['stdout'] = PIPE
            kwargs['stderr'] = PIPE

        with Popen(*popenargs, **kwargs) as process:
            try:
                stdout, stderr = process.communicate(input, timeout=timeout)
            except TimeoutExpired as exc:
                process.kill()
                if _mswindows:
                    # Windows accumulates the output in a single blocking
                    # read() call run on child threads, with the timeout
                    # being done in a join() on those threads.  communicate()
                    # _after_ kill() is required to collect that and add it
                    # to the exception.
                    exc.stdout, exc.stderr = process.communicate()
                else:
                    # POSIX _communicate already populated the output so
                    # far into the TimeoutExpired exception.
                    process.wait()
                raise
            except:  # Including KeyboardInterrupt, communicate handled that.
                process.kill()
                # We don't call process.wait() as .__exit__ does that for us.
                raise
            retcode = process.poll()
            if check and retcode:
>               raise CalledProcessError(retcode, process.args,
                                         output=stdout, stderr=stderr)
E               subprocess.CalledProcessError: Command '['mpiexec', '-n', '1', '-genv', '_PYTEST_MPI_CHILD_PROCESS', '1', '/Users/kloayzar/firedrake/bin/pytest', '--runxfail', '-s', '-q', '/Users/kloayzar/firedrake/src/firedrake/tests/regression/test_dg_advection.py::test_dg_advection_icosahedral_sphere_parallel', ':', '-n', '2', '/Users/kloayzar/firedrake/bin/pytest', '--runxfail', '-s', '-q', '/Users/kloayzar/firedrake/src/firedrake/tests/regression/test_dg_advection.py::test_dg_advection_icosahedral_sphere_parallel', '--tb=no', '--no-summary', '--no-header', '--disable-warnings', '--show-capture=no']' returned non-zero exit status 15.

/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py:571: CalledProcessError
----------------------------- Captured stdout call -----------------------------

===================================================================================
=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
=   PID 52447 RUNNING AT IC-QTNJVKV9YL
=   EXIT CODE: 6
=   CLEANING UP REMAINING PROCESSES
=   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
===================================================================================
YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Terminated: 15 (signal 15)
This typically refers to a problem with your application.
Please see the FAQ page for debugging suggestions
----------------------------- Captured stderr call -----------------------------
Fatal Python error: Aborted

Current thread 0x0000000200f13240 (most recent call first):
  File "/Users/kloayzar/firedrake/src/firedrake/firedrake/dmhooks.py", line 108 in push_attr
  File "/Users/kloayzar/firedrake/src/firedrake/firedrake/dmhooks.py", line 228 in __enter__
  File "/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 517 in enter_context
  File "/Users/kloayzar/firedrake/src/firedrake/firedrake/variational_solver.py", line 323 in solve
  File "/Users/kloayzar/firedrake/src/firedrake/firedrake/adjoint_utils/variational_solver.py", line 89 in wrapper
  File "/Users/kloayzar/firedrake/src/firedrake/tests/regression/test_dg_advection.py", line 53 in run_test
  File "/Users/kloayzar/firedrake/src/firedrake/tests/regression/test_dg_advection.py", line 74 in test_dg_advection_icosahedral_sphere_parallel
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/python.py", line 159 in pytest_pyfunc_call
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/python.py", line 1627 in runtest
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/runner.py", line 174 in pytest_runtest_call
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/runner.py", line 242 in <lambda>
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/runner.py", line 341 in from_call
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/runner.py", line 241 in call_and_report
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/runner.py", line 132 in runtestprotocol
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/runner.py", line 113 in pytest_runtest_protocol
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/main.py", line 362 in pytest_runtestloop
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/main.py", line 337 in _main
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/main.py", line 283 in wrap_session
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/main.py", line 330 in pytest_cmdline_main
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/config/__init__.py", line 175 in main
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/config/__init__.py", line 201 in console_main
  File "/Users/kloayzar/firedrake/bin/pytest", line 8 in <module>

Extension modules: mpi4py.MPI, zmq.backend.cython._zmq, tornado.speedups, petsc4py.PETSc, numpy._core._multiarray_umath, numpy.linalg._umath_linalg, pyop2.sparsity, cython.cimports.libc.math, scipy._lib._ccallback_c, scipy.special._ufuncs_cxx, scipy.special._ufuncs, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator, charset_normalizer.md, scipy.special._specfun, scipy.special._comb, scipy.linalg._fblas, scipy.linalg._flapack, scipy.linalg.cython_lapack, scipy.linalg._cythonized_array_utils, scipy.linalg._solve_toeplitz, scipy.linalg._decomp_lu_cython, scipy.linalg._matfuncs_sqrtm_triu, scipy.linalg.cython_blas, scipy.linalg._matfuncs_expm, scipy.linalg._decomp_update, scipy.sparse._sparsetools, _csparsetools, scipy.sparse._csparsetools, scipy.sparse.linalg._dsolve._superlu, scipy.sparse.linalg._eigen.arpack._arpack, scipy.sparse.linalg._propack._spropack, scipy.sparse.linalg._propack._dpropack, scipy.sparse.linalg._propack._cpropack, scipy.sparse.linalg._propack._zpropack, scipy.sparse.csgraph._tools, scipy.sparse.csgraph._shortest_path, scipy.sparse.csgraph._traversal, scipy.sparse.csgraph._min_spanning_tree, scipy.sparse.csgraph._flow, scipy.sparse.csgraph._matching, scipy.sparse.csgraph._reordering, scipy.special._ellip_harm_2, symengine.lib.symengine_wrapper, firedrake.cython.dmcommon, firedrake.cython.extrusion_numbering, firedrake.cython.spatialindex, firedrake.cython.patchimpl, h5py._errors, h5py.defs, h5py._objects, h5py.h5, h5py.utils, h5py.h5t, h5py.h5s, h5py.h5ac, h5py.h5p, h5py.h5r, h5py._proxy, h5py._conv, h5py.h5z, h5py.h5a, h5py.h5d, h5py.h5ds, h5py.h5g, h5py.h5i, h5py.h5o, h5py.h5f, h5py.h5fd, h5py.h5pl, h5py.h5l, h5py._selector, firedrake.cython.hdf5interface, firedrake.cython.mgimpl, vtkmodules.vtkCommonCore, vtkmodules.vtkCommonMath, vtkmodules.vtkCommonTransforms, vtkmodules.vtkCommonDataModel, PIL._imaging, kiwisolver._cext, scipy.spatial._ckdtree, scipy._lib.messagestream, scipy.spatial._qhull, scipy.spatial._voronoi, scipy.spatial._distance_wrap, scipy.spatial._hausdorff, scipy.spatial.transform._rotation (total: 94)
___________________ test_dg_advection_cubed_sphere_parallel ____________________

args = (), kwargs = {}

    def parallel_callback(*args, **kwargs):
>       subprocess.run(cmd, check=True)

../pytest-mpi/pytest_mpi.py:210: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

input = None, capture_output = False, timeout = None, check = True
popenargs = (['mpiexec', '-n', '1', '-genv', '_PYTEST_MPI_CHILD_PROCESS', '1', ...],)
kwargs = {}
process = <Popen: returncode: 59 args: ['mpiexec', '-n', '1', '-genv', '_PYTEST_MPI_CH...>
stdout = None, stderr = None, retcode = 59

    def run(*popenargs,
            input=None, capture_output=False, timeout=None, check=False, **kwargs):
        """Run command with arguments and return a CompletedProcess instance.

        The returned instance will have attributes args, returncode, stdout and
        stderr. By default, stdout and stderr are not captured, and those attributes
        will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
        or pass capture_output=True to capture both.

        If check is True and the exit code was non-zero, it raises a
        CalledProcessError. The CalledProcessError object will have the return code
        in the returncode attribute, and output & stderr attributes if those streams
        were captured.

        If timeout is given, and the process takes too long, a TimeoutExpired
        exception will be raised.

        There is an optional argument "input", allowing you to
        pass bytes or a string to the subprocess's stdin.  If you use this argument
        you may not also use the Popen constructor's "stdin" argument, as
        it will be used internally.

        By default, all communication is in bytes, and therefore any "input" should
        be bytes, and the stdout and stderr will be bytes. If in text mode, any
        "input" should be a string, and stdout and stderr will be strings decoded
        according to locale encoding, or by "encoding" if set. Text mode is
        triggered by setting any of text, encoding, errors or universal_newlines.

        The other arguments are the same as for the Popen constructor.
        """
        if input is not None:
            if kwargs.get('stdin') is not None:
                raise ValueError('stdin and input arguments may not both be used.')
            kwargs['stdin'] = PIPE

        if capture_output:
            if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
                raise ValueError('stdout and stderr arguments may not be used '
                                 'with capture_output.')
            kwargs['stdout'] = PIPE
            kwargs['stderr'] = PIPE

        with Popen(*popenargs, **kwargs) as process:
            try:
                stdout, stderr = process.communicate(input, timeout=timeout)
            except TimeoutExpired as exc:
                process.kill()
                if _mswindows:
                    # Windows accumulates the output in a single blocking
                    # read() call run on child threads, with the timeout
                    # being done in a join() on those threads.  communicate()
                    # _after_ kill() is required to collect that and add it
                    # to the exception.
                    exc.stdout, exc.stderr = process.communicate()
                else:
                    # POSIX _communicate already populated the output so
                    # far into the TimeoutExpired exception.
                    process.wait()
                raise
            except:  # Including KeyboardInterrupt, communicate handled that.
                process.kill()
                # We don't call process.wait() as .__exit__ does that for us.
                raise
            retcode = process.poll()
            if check and retcode:
>               raise CalledProcessError(retcode, process.args,
                                         output=stdout, stderr=stderr)
E               subprocess.CalledProcessError: Command '['mpiexec', '-n', '1', '-genv', '_PYTEST_MPI_CHILD_PROCESS', '1', '/Users/kloayzar/firedrake/bin/pytest', '--runxfail', '-s', '-q', '/Users/kloayzar/firedrake/src/firedrake/tests/regression/test_dg_advection.py::test_dg_advection_cubed_sphere_parallel', ':', '-n', '2', '/Users/kloayzar/firedrake/bin/pytest', '--runxfail', '-s', '-q', '/Users/kloayzar/firedrake/src/firedrake/tests/regression/test_dg_advection.py::test_dg_advection_cubed_sphere_parallel', '--tb=no', '--no-summary', '--no-header', '--disable-warnings', '--show-capture=no']' returned non-zero exit status 59.

/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py:571: CalledProcessError
----------------------------- Captured stderr call -----------------------------
Fatal Python error: Segmentation fault

Current thread 0x0000000200f13240 (most recent call first):
  File "/Users/kloayzar/firedrake/src/firedrake/firedrake/variational_solver.py", line 324 in solve
  File "/Users/kloayzar/firedrake/src/firedrake/firedrake/adjoint_utils/variational_solver.py", line 89 in wrapper
  File "/Users/kloayzar/firedrake/src/firedrake/tests/regression/test_dg_advection.py", line 48 in run_test
  File "/Users/kloayzar/firedrake/src/firedrake/tests/regression/test_dg_advection.py", line 83 in test_dg_advection_cubed_sphere_parallel
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/python.py", line 159 in pytest_pyfunc_call
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/python.py", line 1627 in runtest
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/runner.py", line 174 in pytest_runtest_call
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/runner.py", line 242 in <lambda>
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/runner.py", line 341 in from_call
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/runner.py", line 241 in call_and_report
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/runner.py", line 132 in runtestprotocol
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/runner.py", line 113 in pytest_runtest_protocol
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/main.py", line 362 in pytest_runtestloop
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/main.py", line 337 in _main
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/main.py", line 283 in wrap_session
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/main.py", line 330 in pytest_cmdline_main
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_callers.py", line 103 in _multicall
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/pluggy/_hooks.py", line 513 in __call__
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/config/__init__.py", line 175 in main
  File "/Users/kloayzar/firedrake/lib/python3.11/site-packages/_pytest/config/__init__.py", line 201 in console_main
  File "/Users/kloayzar/firedrake/bin/pytest", line 8 in <module>

Extension modules: mpi4py.MPI, zmq.backend.cython._zmq, tornado.speedups, petsc4py.PETSc, numpy._core._multiarray_umath, numpy.linalg._umath_linalg, pyop2.sparsity, cython.cimports.libc.math, scipy._lib._ccallback_c, scipy.special._ufuncs_cxx, scipy.special._ufuncs, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator, charset_normalizer.md, scipy.special._specfun, scipy.special._comb, scipy.linalg._fblas, scipy.linalg._flapack, scipy.linalg.cython_lapack, scipy.linalg._cythonized_array_utils, scipy.linalg._solve_toeplitz, scipy.linalg._decomp_lu_cython, scipy.linalg._matfuncs_sqrtm_triu, scipy.linalg.cython_blas, scipy.linalg._matfuncs_expm, scipy.linalg._decomp_update, scipy.sparse._sparsetools, _csparsetools, scipy.sparse._csparsetools, scipy.sparse.linalg._dsolve._superlu, scipy.sparse.linalg._eigen.arpack._arpack, scipy.sparse.linalg._propack._spropack, scipy.sparse.linalg._propack._dpropack, scipy.sparse.linalg._propack._cpropack, scipy.sparse.linalg._propack._zpropack, scipy.sparse.csgraph._tools, scipy.sparse.csgraph._shortest_path, scipy.sparse.csgraph._traversal, scipy.sparse.csgraph._min_spanning_tree, scipy.sparse.csgraph._flow, scipy.sparse.csgraph._matching, scipy.sparse.csgraph._reordering, scipy.special._ellip_harm_2, symengine.lib.symengine_wrapper, firedrake.cython.dmcommon, firedrake.cython.extrusion_numbering, firedrake.cython.spatialindex, firedrake.cython.patchimpl, h5py._errors, h5py.defs, h5py._objects, h5py.h5, h5py.utils, h5py.h5t, h5py.h5s, h5py.h5ac, h5py.h5p, h5py.h5r, h5py._proxy, h5py._conv, h5py.h5z, h5py.h5a, h5py.h5d, h5py.h5ds, h5py.h5g, h5py.h5i, h5py.h5o, h5py.h5f, h5py.h5fd, h5py.h5pl, h5py.h5l, h5py._selector, firedrake.cython.hdf5interface, firedrake.cython.mgimpl, vtkmodules.vtkCommonCore, vtkmodules.vtkCommonMath, vtkmodules.vtkCommonTransforms, vtkmodules.vtkCommonDataModel, PIL._imaging, kiwisolver._cext, scipy.spatial._ckdtree, scipy._lib.messagestream, scipy.spatial._qhull, scipy.spatial._voronoi, scipy.spatial._distance_wrap, scipy.spatial._hausdorff, scipy.spatial.transform._rotation (total: 94)
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range
[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
[0]PETSC ERROR: or see https://petsc.org/release/faq/#valgrind and https://petsc.org/release/faq/
[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run 
[0]PETSC ERROR: to get more information on the crash.
[0]PETSC ERROR: Run with -malloc_debug to check if memory corruption is causing the crash.
application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0
____________________ test_poisson_analytic_linear_parallel _____________________

args = (), kwargs = {}

    def parallel_callback(*args, **kwargs):
>       subprocess.run(cmd, check=True)

../pytest-mpi/pytest_mpi.py:210: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

input = None, capture_output = False, timeout = None, check = True
popenargs = (['mpiexec', '-n', '1', '-genv', '_PYTEST_MPI_CHILD_PROCESS', '1', ...],)
kwargs = {}
process = <Popen: returncode: 1 args: ['mpiexec', '-n', '1', '-genv', '_PYTEST_MPI_CHI...>
stdout = None, stderr = None, retcode = 1

    def run(*popenargs,
            input=None, capture_output=False, timeout=None, check=False, **kwargs):
        """Run command with arguments and return a CompletedProcess instance.

        The returned instance will have attributes args, returncode, stdout and
        stderr. By default, stdout and stderr are not captured, and those attributes
        will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
        or pass capture_output=True to capture both.

        If check is True and the exit code was non-zero, it raises a
        CalledProcessError. The CalledProcessError object will have the return code
        in the returncode attribute, and output & stderr attributes if those streams
        were captured.

        If timeout is given, and the process takes too long, a TimeoutExpired
        exception will be raised.

        There is an optional argument "input", allowing you to
        pass bytes or a string to the subprocess's stdin.  If you use this argument
        you may not also use the Popen constructor's "stdin" argument, as
        it will be used internally.

        By default, all communication is in bytes, and therefore any "input" should
        be bytes, and the stdout and stderr will be bytes. If in text mode, any
        "input" should be a string, and stdout and stderr will be strings decoded
        according to locale encoding, or by "encoding" if set. Text mode is
        triggered by setting any of text, encoding, errors or universal_newlines.

        The other arguments are the same as for the Popen constructor.
        """
        if input is not None:
            if kwargs.get('stdin') is not None:
                raise ValueError('stdin and input arguments may not both be used.')
            kwargs['stdin'] = PIPE

        if capture_output:
            if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
                raise ValueError('stdout and stderr arguments may not be used '
                                 'with capture_output.')
            kwargs['stdout'] = PIPE
            kwargs['stderr'] = PIPE

        with Popen(*popenargs, **kwargs) as process:
            try:
                stdout, stderr = process.communicate(input, timeout=timeout)
            except TimeoutExpired as exc:
                process.kill()
                if _mswindows:
                    # Windows accumulates the output in a single blocking
                    # read() call run on child threads, with the timeout
                    # being done in a join() on those threads.  communicate()
                    # _after_ kill() is required to collect that and add it
                    # to the exception.
                    exc.stdout, exc.stderr = process.communicate()
                else:
                    # POSIX _communicate already populated the output so
                    # far into the TimeoutExpired exception.
                    process.wait()
                raise
            except:  # Including KeyboardInterrupt, communicate handled that.
                process.kill()
                # We don't call process.wait() as .__exit__ does that for us.
                raise
            retcode = process.poll()
            if check and retcode:
>               raise CalledProcessError(retcode, process.args,
                                         output=stdout, stderr=stderr)
E               subprocess.CalledProcessError: Command '['mpiexec', '-n', '1', '-genv', '_PYTEST_MPI_CHILD_PROCESS', '1', '/Users/kloayzar/firedrake/bin/pytest', '--runxfail', '-s', '-q', '/Users/kloayzar/firedrake/src/firedrake/tests/regression/test_poisson_strong_bcs.py::test_poisson_analytic_linear_parallel', ':', '-n', '1', '/Users/kloayzar/firedrake/bin/pytest', '--runxfail', '-s', '-q', '/Users/kloayzar/firedrake/src/firedrake/tests/regression/test_poisson_strong_bcs.py::test_poisson_analytic_linear_parallel', '--tb=no', '--no-summary', '--no-header', '--disable-warnings', '--show-capture=no']' returned non-zero exit status 1.

/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py:571: CalledProcessError
----------------------------- Captured stdout call -----------------------------
[1] error: 12.124355652982139
F[0] error: 12.124355652982139
F
1 failed, 2 warnings in 0.62s

=================================== FAILURES ===================================
____________________ test_poisson_analytic_linear_parallel _____________________

    @pytest.mark.parallel(nprocs=2)
    def test_poisson_analytic_linear_parallel():
        from mpi4py import MPI
        error = run_test_linear(1, 1)
        print('[%d]' % MPI.COMM_WORLD.rank, 'error:', error)
>       assert error < 5e-6
E       assert 12.124355652982139 < 5e-06

tests/regression/test_poisson_strong_bcs.py:92: AssertionError
=============================== warnings summary ===============================
../../lib/python3.11/site-packages/pytools/persistent_dict.py:63
  /Users/kloayzar/firedrake/lib/python3.11/site-packages/pytools/persistent_dict.py:63: RecommendedHashNotFoundWarning: Unable to import recommended hash 'siphash24.siphash13', falling back to 'hashlib.sha256'. Run 'python3 -m pip install siphash24' to install the recommended hash.
    warn("Unable to import recommended hash 'siphash24.siphash13', "

../fiat/FIAT/__init__.py:5
  /Users/kloayzar/firedrake/src/fiat/FIAT/__init__.py:5: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/regression/test_poisson_strong_bcs.py::test_poisson_analytic_linear_parallel
1 failed, 2 warnings in 0.62s
WARNING! There are options you set that were not used!
WARNING! could be spelling mistake, etc!
There are 3 unused database options. They are:
Option left: name:--runxfail (no value) source: command line
Option left: name:-q value: /Users/kloayzar/firedrake/src/firedrake/tests/regression/test_poisson_strong_bcs.py::test_poisson_analytic_linear_parallel source: command line
Option left: name:-s (no value) source: command line
=============================== warnings summary ===============================
../../lib/python3.11/site-packages/pytools/persistent_dict.py:63
  /Users/kloayzar/firedrake/lib/python3.11/site-packages/pytools/persistent_dict.py:63: RecommendedHashNotFoundWarning: Unable to import recommended hash 'siphash24.siphash13', falling back to 'hashlib.sha256'. Run 'python3 -m pip install siphash24' to install the recommended hash.
    warn("Unable to import recommended hash 'siphash24.siphash13', "

../fiat/FIAT/__init__.py:5
  /Users/kloayzar/firedrake/src/fiat/FIAT/__init__.py:5: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/regression/test_dg_advection.py::test_dg_advection_icosahedral_sphere_parallel
FAILED tests/regression/test_dg_advection.py::test_dg_advection_cubed_sphere_parallel
FAILED tests/regression/test_poisson_strong_bcs.py::test_poisson_analytic_linear_parallel
==== 3 failed, 24 passed, 1 skipped, 3588 deselected, 2 warnings in 23.47s =====
WARNING! There are options you set that were not used!
WARNING! could be spelling mistake, etc!
There are 2 unused database options. They are:
Option left: name:-k value: poisson_strong or stokes_mini or dg_advection source: command line
Option left: name:-v (no value) source: command line

Add error message with full backtrace. Please add these as text using three backticks (`) for highlighting. Please do not add screenshots. firedrake-install.log configure.log

Please also include either firedrake-install.log which is found in the directory firedrake-install was run or firedrake-update.log found in the virtualenv directory.

Additionally please include the PETSc configure log located in $VIRTUAL_ENV/src/petsc/configure.log.

Environment:

Additional context Add any other context about the problem here.

Ig-dolci commented 4 weeks ago

@eloayza-romero Could you please do a test for me? Here are the steps:

  1. Open the file firedrake/src/firedrake/tests/regression/test_poisson_strong_bcs.py.

  2. At the end of the file, add the following lines:

    if __name__ == '__main__':
       test_poisson_analytic_linear_parallel()
  3. Ensure that you have the Firedrake virtual environment activated, then run the following command:

    mpiexec -np 2 python test_poisson_strong_bcs.py
  4. After running the test, verify that the output errors are similar as follows:

    [1] error: 8.809531411201023e-16
    [0] error: 8.809531411201023e-16
eloayza-romero commented 4 weeks ago

Hi,

After the suggested changes, the output errors are the same as the ones you obtained.

Ig-dolci commented 4 weeks ago

Great! This means that Python executions for parallel solvers are working correctly in your machine. Unfortunately, we have a known issue with running parallel firedrake pytest on macOS, which arises from a package used for matrix factorization (MUMPS). Fortunately, this shouldn't affect your work, as it looks like the Python executions run on your system. If you still encounter any issues with parallel Python executions, please don't hesitate to inform us.

eloayza-romero commented 4 weeks ago

Thanks