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

#716: Write file when nonlinear solver does not converge #717

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

cwschilly
Copy link
Collaborator

Fixes #716

@cwschilly cwschilly linked an issue Jan 17, 2025 that may be closed by this pull request
@cwschilly cwschilly requested a review from fnrizzi January 17, 2025 21:29
@fnrizzi
Copy link
Member

fnrizzi commented Jan 20, 2025

@cwschilly can you please post here some examples of the file written?

@cwschilly
Copy link
Collaborator Author

@fnrizzi The file is always called nonlinear_solver_failed.txt and contains the error string for whichever exception that was thrown:

Pressio Exception Error String
ResidualEvaluationFailureUnrecoverable "Residual evaluation failed"
ResidualHasNans "NaNs found in residual"
MaximumIterations "Root Finder: Reached maximum number of iterations before convergence."
LineSearchStepTooSmall "Line search step size too small"
LineSearchObjFunctionChangeTooSmall "Line search objective function change too small"

@eparish1
Copy link
Collaborator

The log file doesn't seem to be getting written if we hit the maximum number of iterations. I don't see anything obvious. Do you all?

@@ -79,6 +81,9 @@ void root_solving_loop_impl(NewtonTag /*problemTag*/,
/* stage 4*/
if (mustStop(iStep)){
PRESSIOLOG_DEBUG("nonlinsolver: stopping");
writeNonlinearSolverTerminationFile(
"Root Finder: Reached maximum number of iterations before convergence."
);
break;
Copy link
Collaborator Author

@cwschilly cwschilly Feb 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log file doesn't seem to be getting written if we hit the maximum number of iterations. I don't see anything obvious. Do you all?

@eparish1 If I understand your question correctly, it is being written out here.

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

Successfully merging this pull request may close these issues.

Write file when nonlinear solver does not converge
3 participants