#20506: dual variables handling in SDP solver(s)
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  dimpase                |       Status:  needs_work
           Type:         |    Milestone:  sage-7.2
  enhancement            |   Resolution:
       Priority:  major  |    Merged in:
      Component:         |    Reviewers:  Matthias Koeppe
  numerical              |  Work issues:
       Keywords:         |       Commit:
        Authors:  Dima   |  604153bf8a00375192e0ff304f373101997fae66
  Pasechnik              |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
  u/dimpase/sdpdual      |
   Dependencies:         |
  #19072                 |
-------------------------+-------------------------------------------------

Comment (by fbissey):

 That explains!
 {{{
 fbissey@QCD-nzi3 ~ $ sage < xx.sage
 ┌────────────────────────────────────────────────────────────────────┐
 │ SageMath version 7.2.beta6, Release Date: 2016-04-28               │
 │ Type "notebook()" for the browser-based notebook interface.        │
 │ Type "help()" for help.                                            │
 └────────────────────────────────────────────────────────────────────┘
 ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
 ┃ Warning: this is a prerelease version, and it may be unstable.     ┃
 ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
 sage: sage: sage: sage: sage: sage: sage: sage: sage: sage: sage:
 pcost       dcost       gap    pres   dres   k/t
  0: -1.2413e+00 -2.7310e+01  2e+01  3e-01  1e+01  1e+00
  1: -1.4977e+00 -3.1971e+00  6e-01  2e-02  9e-01  2e-01
  2: -1.2729e+00 -2.1411e+00  6e-01  1e-02  5e-01  2e-01
  3: -1.1436e+00 -1.2534e+00  8e-02  1e-03  6e-02  2e-02
  4: -1.1034e+00 -1.2438e+00  3e-01  2e-03  8e-02  4e-02
  5: -1.0500e+00 -1.0609e+00  2e-02  1e-04  7e-03  4e-03
  6: -1.0338e+00 -1.0407e+00  4e-02  1e-04  6e-03  7e-03
  7: -1.0201e+00 -1.0209e+00  8e-03  2e-05  1e-03  1e-03
  8: -1.0176e+00 -1.0176e+00  4e-02  4e-05  2e-03  4e-03
  9: -1.0071e+00 -1.0069e+00  3e-03  3e-06  1e-04  5e-04
 10: -1.0042e+00 -1.0038e+00  4e-03  2e-06  8e-05  6e-04
 11: -1.0027e+00 -1.0026e+00  1e-03  4e-07  2e-05  2e-04
 12: -1.0028e+00 -1.0022e+00  8e-03  1e-06  5e-05  7e-04
 13: -1.0009e+00 -1.0009e+00  6e-04  8e-08  4e-06  7e-05
 14: -1.0005e+00 -1.0004e+00  3e-04  2e-08  1e-06  5e-05
 15: -1.0003e+00 -1.0002e+00  8e-04  2e-08  1e-06  1e-04
 16: -1.0000e+00 -1.0000e+00  9e-05  2e-09  1e-07  1e-05
 17: -9.9992e-01 -9.9990e-01  2e-04  2e-09  8e-08  2e-05
 18: -9.9986e-01 -9.9986e-01  2e-05  2e-10  1e-08  4e-06
 19: -9.9985e-01 -9.9984e-01  8e-05  3e-10  1e-08  9e-06
 20: -9.9982e-01 -9.9982e-01  9e-06  3e-11  1e-09  1e-06
 21: -9.9982e-01 -9.9981e-01  3e-05  3e-11  2e-09  3e-06
 22: -9.9981e-01 -9.9981e-01  3e-06  4e-12  2e-10  5e-07
 23: -9.9981e-01 -9.9981e-01  1e-05  7e-11  1e-10  1e-06
 24: -9.9980e-01 -9.9980e-01  1e-06  7e-12  5e-10  2e-07
 25: -9.9980e-01 -9.9980e-01  3e-06  2e-08  1e-09  4e-07
 26: -9.9980e-01 -9.9980e-01  4e-07  3e-09  5e-11  6e-08
 Optimal solution found.
 sage: sage: sage: sage: sage: sage: sage: sage: sage: sage: sage: sage:
 sage: sage: sage: sage:
 ---------------------------------------------------------------------------
 SDPSolverException                        Traceback (most recent call
 last)
 <ipython-input-25-de8ebd622e01> in <module>()
 ----> 1 p.solve() # boom - division by 0

 /usr/lib64/python2.7/site-packages/sage/numerical/sdp.pyx in
 sage.numerical.sdp.SemidefiniteProgram.solve (/scratch2/portage/sci-
 mathematics/sage-9999/work/sage-9999/src-
 python2_7/build/cythonized/sage/numerical/sdp.c:7919)()
     902             3.0
     903         """
 --> 904         self._backend.solve()
     905         return self._backend.get_objective_value()
     906

 /usr/lib64/python2.7/site-
 packages/sage/numerical/backends/cvxopt_sdp_backend.pyx in
 sage.numerical.backends.cvxopt_sdp_backend.CVXOPTSDPBackend.solve
 (/scratch2/portage/sci-mathematics/sage-9999/work/sage-9999/src-
 python2_7/build/cythonized/sage/numerical/backends/cvxopt_sdp_backend.c:5165)()
     418             pass
     419         elif self.answer['status'] == 'primal infeasible':
 --> 420             raise SDPSolverException("CVXOPT: primal infeasible")
     421         elif self.answer['status'] == 'dual infeasible':
     422             raise SDPSolverException("CVXOPT: dual infeasible")

 SDPSolverException: CVXOPT: primal infeasible
 sage: sage: sage: Exiting Sage (CPU time 0m0.60s, Wall time 0m2.40s).
 }}}
 This is sage-on-gentoo. Does `SDP` needs a particular dependency enabled
 in CVXOPT that I could have missed?

--
Ticket URL: <http://trac.sagemath.org/ticket/20506#comment:23>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to