xiaoyeli / superlu

Supernodal sparse direct solver. https://portal.nersc.gov/project/sparse/superlu/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Recommended way to override `superlu_abort_and_exit()` with `USER_ABORT`?

alexchandel opened this issue · comments

commented

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.

commented

-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.