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

fluids: report TS converged reason and exit cleanly #1134

Merged
merged 2 commits into from
Jan 7, 2023

Conversation

jedbrown
Copy link
Member

@jedbrown jedbrown commented Jan 7, 2023

Sample output now:

Time taken for solution (sec): 2.2825
Time integrator CONVERGED_ITS on time step 100 with final time 0.2

and when nonlinear solve fails

Time taken for solution (sec): 7.13569
Time integrator DIVERGED_NONLINEAR_SOLVE on time step 65 with final time 0.13

Usually one should run with -snes_converged_reason and perhaps more SNES/KSP diagnostics to understand why it failed. We could extract and report the most recent of those on divergence in case people are running with those monitors off.

Copy link
Collaborator

@jrwrigh jrwrigh left a comment

Choose a reason for hiding this comment

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

LGTM (reviewing only the TS converged reason parts).

examples/fluids/src/setupts.c Show resolved Hide resolved
The final state does not get written by the monitor with the default of
-ts_error_if_step_fails 1. Now we exit cleanly regardless of reason,
ensuring that the final state checkpoint and monitor has been called.
@jedbrown jedbrown force-pushed the jed/fluids-ts-reason-no-error branch from ed3c436 to 65fa31e Compare January 7, 2023 16:39
@jedbrown jedbrown merged commit 0d157ec into main Jan 7, 2023
@jedbrown jedbrown deleted the jed/fluids-ts-reason-no-error branch January 7, 2023 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants