Recommended way to override `superlu_abort_and_exit()` with `USER_ABORT`?
What is the supported way to override superlu_abort_and_exit() using USER_ABORT? While one can define the macro to one's own function (e.g. -DUSER_ABORT=MySUError), SuperLU provides no way to inject the declaration, and the signature of void superlu_abort_and_exit(char *) is not the signature of an implicit function.
Have you tried?
-DUSER_ABORT(msg)=MySUError(msg)
Or, you can modify the source file SRC/slu_util.h, with your new definitions.
-DUSER_ABORT(msg)=MySUError(msg)
That's equivalent to -DUSER_ABORT=MySUError, although less portable between compilers.
The problem is that regardless of what you define USER_ABORT to be, it will be implicitly defined (short of modding SuperLU's own headers as you suggest, which is not maintainable), and it will likely have an invalid signature.