Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSet AugLagrangian tolerance based on ElemType #217
Conversation
|
Wow, nice catch. |
|
Second approval provided automatically after 24 hours. |
|
Thanks @conradsnicta, those are some nice resources. I think maybe that is what was going on here. |
Finally, after far too long, I took some time to look into #142. I was able to replicate the problem with the
Johnson844LovaszThetaFMatSDPtest.The augmented Lagrangian optimizer (
AugLagrangian) keeps a penalty parametersigmainternally. This is stored as adouble---butJohnson844LovaszThetaFMatSDPis a test that specifically usesarma::fmatas an objective matrix type (so, e.g.,floatis the element type).AugLagrangianwas also hard-coded to terminate on an absolute objective difference of1e-10---but for this particular test, the objective function converges to-14... and due to the precision afforded by1e-14, it's not actually possible to have two differentfloats very near-14that are less than1e-10apart! So, I modified the tolerance to be based on the value ofnumeric_limits<ElemType>::epsilon().Next, I also set a limit on how large
sigmacan grow. The optimization will terminate whensigmais greater than half the size that can be represented byElemType. This issue (when paired with the other one) is what caused these errors:Those were caused by a too-large
sigma.Anyway, to the best of my belief this fixes the issue. The only thing I am not sure of is why this failure only seemed to occur on an i386 system, instead of also on an x86_64 system. But, I don't know that I'll dig deeper this time---if it works, it works. :)