ralna / RALFit

A non-linear least squares solver
Other
25 stars 6 forks source link

BUG in EVAL_J recovery #53

Closed talassio closed 5 years ago

talassio commented 5 years ago

Description

Different logic paths where taken when eval_J returned inform/=0 and when J had NaNs or Infinities. reset_gradients was only triggered in the latter case. This commit treats both cases in the same manner. See lines:

https://github.com/ralna/RALFit/blob/5ba945bf1ffcc1f24e80070dbfadef7fc3690fb7/libRALFit/src/ral_nlls_internal.f90#L617-L653

Not only rho can have two values -1.0 or -2.0 but the reset_gradients is only triggered when J has NaNs or infinities.

This has been fixed in the box-logic branch, see https://github.com/talassio/RALFit/commit/29b06f6188b1abd5ac71b870fbfa3745f3e9f90d

https://github.com/talassio/RALFit/blob/29b06f6188b1abd5ac71b870fbfa3745f3e9f90d/libRALFit/src/ral_nlls_internal.f90#L719-L763

tyronerees commented 5 years ago

fixed in #54