-
Notifications
You must be signed in to change notification settings - Fork 270
Description
If I run M2 locally on Ubuntu 24.04 (I've tried version 1.25.11 from ppa:macaulay2/macaulay2, version 1.25.11-82-ga66365a76b (development) from ppa:profzoom/macaulay2, and version 1.25.11-84-g432b335e4d (development) compiled from source), this command always fails:
i1 : needsPackage "SumsOfSquares"; QQ[x,y];
i3 : lowerBound(x^2+x*y+y^2+x+9, RoundTol=>infinity, Solver=>"CSDP")
o3 = (, MomentMatrix null )
GramMatrix null
Monomials 3x1 matrix over QQ[x..y]
Status SDP failed
o3 : SequenceHowever, if I run the same command on Macaulay2Web (version 1.25.11-1572-g6198e3f03b-dirty (vanilla)), it successfully gives me a lower bound:
i3 : net lowerBound(x^2+x*y+y^2+x+9, RoundTol=>infinity, Solver=>"CSDP")
o3 = (8.66667, MomentMatrix 3x3 matrix over RR_53 )
GramMatrix 3x3 matrix over RR_53
Monomials 3x1 matrix over RR_53[x..y]
Parameters 1x1 matrix over RR_53
Status SDP solved, primal-dual feasibleI am unable to get the corresponding commit (pzinn@6198e3f) to build locally to test it. But I've checked via get "!csdp || true" that both the local and web versions are running CSDP 6.2.0.
If I locally patch SumsOfSquares.m2 to print out the underlying optimize() call with printingPrecision = 0, I get:
needsPackage "SemidefiniteProgramming";
optimize(sdp(matrix{{4.499999999999998, .5, 0}, {.5, 1, .5}, {0, .5, 1}}, 1:matrix{{.7071067811865475, 0, 0}, {0, 0, 0}, {0, 0, 0}}, matrix{{.7071067811865475}}), Solver=>"CSDP")which similarly returns SDP failed. However, if I replace 4.499999999999998 with 4.5, I get SDP solved, primal-dual feasible. So this issue may have to do with floating-point weirdness.
But weirdly, this isn't even a hard boundary for feasibility: replacing the first entry with 3.999999999999998 or 5.499999999999997 (corresponding to +8 or +11 in lowerBound()) also makes it succeed.