Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommended way to override superlu_abort_and_exit() with USER_ABORT? #73

Open
alexchandel opened this issue Feb 15, 2023 · 2 comments
Open

Comments

@alexchandel
Copy link

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.

@xiaoyeli
Copy link
Owner

Have you tried?

-DUSER_ABORT(msg)=MySUError(msg)

Or, you can modify the source file SRC/slu_util.h, with your new definitions.

@alexchandel
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants