Skip to content

ENH: Make sure the _xerbla error callback is being used by blas functions #12472

Open

Description

@mattip

In working on mamtul, it became apparent that the numpy/core/src/common/python_xerbla.c error handler, which should be registered when linking with OpenBLAS, is not being called. This should be used as it turns the default "print to stderr" to "raise a nice Python exception" when input to one of the blas routines is malformed.

Activity

  1. rgommers commented on Jul 23, 2023

    @rgommers
    Member

    Hmm, this is a bit of a mess. We have two copies of python_xerbla.c; only the one in numpy/linalg/lapack_lite/ is tested, and that test is silently skipped when it's failing:

    $ spin test -- -k xerbla --verbose
    
    numpy/linalg/tests/test_linalg.py::test_xerbla_override SKIPPED (Numpy xerbla not linked in.)       [100%]
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions