You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This conversion from NaN to integer is required to trigger an invalid operation exception according to the IEEE 754-2008 standard. On most systems this is silently ignored, but on others, under certain compiler settings, this causes the program to crash.
I was able to work around the issue by wrapping the offending line with if (work->settings->check_termination > 0) {}, but I don't understand the context of the code to know if this is correct.
The text was updated successfully, but these errors were encountered:
Thanks for pointing this out! That part of the code is related to how often we update parameter rho. We usually update it at an integer multiple of check_termination.
If check_termination is disabled (we check for convergence only when the algorithm reaches the maximum number of iterations) then we should round the number of iterations to another value that makes sense.
I have changed the code in bd72c40 to use CHECK_TERMINATION constant as a reference number for rounding in case the setting check_termination is 0. It should fix your issue with the IEEE 754-2008 standard.
This line:
https://github.com/oxfordcontrol/osqp/blob/2aeaebb3a3f8f718e16373caccb0c5a8e091a004/src/osqp.c#L343
will attempt to convert
NaN
to ac_int
in the case thatwork->settings->check_termination
equals zero, which is a valid value according to:https://github.com/oxfordcontrol/osqp/blob/2aeaebb3a3f8f718e16373caccb0c5a8e091a004/include/types.h#L167
This conversion from
NaN
to integer is required to trigger an invalid operation exception according to the IEEE 754-2008 standard. On most systems this is silently ignored, but on others, under certain compiler settings, this causes the program to crash.I was able to work around the issue by wrapping the offending line with
if (work->settings->check_termination > 0) {}
, but I don't understand the context of the code to know if this is correct.The text was updated successfully, but these errors were encountered: