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

Make the LCP internal error printout less aggressive #1238

Merged
merged 3 commits into from
Feb 13, 2019

Conversation

mxgrey
Copy link
Member

@mxgrey mxgrey commented Feb 13, 2019

A line in the LCP solver may print out excessive warnings over minor imprecision. This causes unnecessary terminal spam that looks like this:

ODE Message 3: LCP internal error, s <= 0 (s=0.0000e+00)

ODE Message 3: LCP internal error, s <= 0 (s=0.0000e+00)

ODE Message 3: LCP internal error, s <= 0 (s=0.0000e+00)

ODE Message 3: LCP internal error, s <= 0 (s=0.0000e+00)

ODE Message 3: LCP internal error, s <= 0 (s=0.0000e+00)

ODE Message 3: LCP internal error, s <= 0 (s=0.0000e+00)

ODE Message 3: LCP internal error, s <= 0 (s=0.0000e+00)

ODE Message 3: LCP internal error, s <= 0 (s=0.0000e+00)

ODE Message 3: LCP internal error, s <= 0 (s=0.0000e+00)

ODE Message 3: LCP internal error, s <= 0 (s=0.0000e+00)

ODE Message 3: LCP internal error, s <= 0 (s=0.0000e+00)

ODE Message 3: LCP internal error, s <= 0 (s=0.0000e+00)

ODE Message 3: LCP internal error, s <= 0 (s=0.0000e+00)

ODE Message 3: LCP internal error, s <= 0 (s=0.0000e+00)

ODE Message 3: LCP internal error, s <= 0 (s=-1.5440e-13)

ODE Message 3: LCP internal error, s <= 0 (s=-6.4683e-13)

These messages often print even when nothing is really wrong with the simulation. I've wrapped the printout of this message in an if-statement that should make the LCP solver less aggressive when it comes to printing this out.


Before merging a pull request

  • Set version target by selecting a milestone on the right side
  • Summarize this change in CHANGELOG.md

@mxgrey mxgrey added this to the DART 6.8.0 milestone Feb 13, 2019
Copy link
Member

@jslee02 jslee02 left a comment

Choose a reason for hiding this comment

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

Theoretically, the "s" value should always be positive. It's undefined behavior otherwise. However, it seems the tiny values are negligible.

For the case of s <= 0, we may want to fall back to using an iterative constraint solver, which is less accurate but more robust, once it's available. But let's stick to Dantzig until then.

@mxgrey
Copy link
Member Author

mxgrey commented Feb 13, 2019

It wouldn't surprise me if these tiny "failures" boil down to floating point precision issues.

@jslee02 jslee02 merged commit 252c6f4 into release-6.8 Feb 13, 2019
@jslee02 jslee02 deleted the grey/less_aggressive_ode_warning_spam branch February 13, 2019 13:52
@scpeters
Copy link
Collaborator

Another approach is calling dSetMessageHandler to completely silence the ODE messages:

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.

3 participants