Error handling when factorization fail
At the moment when factorization fail, pastix_print_error prints an error message and calls exit(1)
, stopping the program.
For the calling code it can be a problem, because no error handling can be done. In particular, when the Cholesky factorization fails, it's impossible to recover from it, when it could be convenient to be able to handle it and try an LDLT factorization instead (after all Cholesky factorization can be used as a way to check if a matrix is SPD).
https://gitlab.inria.fr/solverstack/pastix/-/blob/master/kernels/core_zpotrfsp.c?ref_type=heads#L88
Would it be possible to have the factorization function return an error instead ? Or is there a hidden way to handle this kind of error ?