-
Notifications
You must be signed in to change notification settings - Fork 198
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
HYPRE_Initialize() after errors? #1215
Comments
Hi Junchao, In general, this is not a fatal error but a safeguard mechanism. The error message serves as a debugging aid, reminding users to explicitly call While this recovery mechanism tries to avoid fatal errors, it's not always successful and our recommended approach is to always call HYPRE_Initialize() explicitly before any other hypre call to ensure predictable behavior and eliminate unnecessary warnings. |
The problem is in that case, |
Could you move your call to |
Yes, we can. It is not a problem for petsc. I just feel in hypre if you think it is a warning, you should not set the error code. |
Hi Junchao, currently, hypre doesn’t distinguish between warnings and errors, leaving it to applications to handle our error codes. However, that’s a fair point, and I’ll bring it up with the team to consider improving this in the future. Also feel free to propose any pull requests if you are interested! |
Hello, I met an error (call
HYPRE_SetMemoryLocation()
without callingHYPRE_Initialize()
before) and then I found the code at https://github.com/hypre-space/hypre/blob/master/src/utilities/general.c#L18-L28,It is weird to see you trigger an error complaining
HYPRE_Initialize()
is not called inhypre_error_w_msg()
, then still doHYPRE_Initialize()
yourself.Then what is the purpose of this error/complaint :)?.
The text was updated successfully, but these errors were encountered: