MOSEK / Mosek.jl

Interface to the Mosek solver in Julia
MIT License
49 stars 28 forks source link

Mosek returns "UNKNOWN_RESULT_STATUS" after very few iterations #193

Closed chengg04 closed 4 years ago

chengg04 commented 4 years ago

I am solving a SDP problem with Mosek's default settings. I got "UNKNOWN_RESULT_STATUS" after 29 iterations and about 16 sec. Here is the log:

MOSEK warning 52: A numerically large lower bound value  2.6e+08 is specified for constraint '' (35).
MOSEK warning 53: A numerically large upper bound value  2.6e+08 is specified for constraint '' (35).
MOSEK warning 52: A numerically large lower bound value  2.0e+08 is specified for constraint '' (36).
MOSEK warning 53: A numerically large upper bound value  2.0e+08 is specified for constraint '' (36).
MOSEK warning 52: A numerically large lower bound value  1.6e+08 is specified for constraint '' (37).
MOSEK warning 53: A numerically large upper bound value  1.6e+08 is specified for constraint '' (37).
MOSEK warning 52: A numerically large lower bound value  1.4e+08 is specified for constraint '' (38).
MOSEK warning 53: A numerically large upper bound value  1.4e+08 is specified for constraint '' (38).
Problem
  Name                   :                 
  Objective sense        : min             
  Type                   : CONIC (conic optimization problem)
  Constraints            : 3685            
  Cones                  : 0               
  Scalar variables       : 0               
  Matrix variables       : 1               
  Integer variables      : 0               

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator - tries                  : 1                 time                   : 0.00            
Lin. dep.  - tries                  : 1                 time                   : 0.00            
Lin. dep.  - number                 : 0               
Presolve terminated. Time: 0.00    
Problem
  Name                   :                 
  Objective sense        : min             
  Type                   : CONIC (conic optimization problem)
  Constraints            : 3685            
  Cones                  : 0               
  Scalar variables       : 0               
  Matrix variables       : 1               
  Integer variables      : 0               

Optimizer  - threads                : 4               
Optimizer  - solved problem         : the primal      
Optimizer  - Constraints            : 3685
Optimizer  - Cones                  : 0
Optimizer  - Scalar variables       : 3600              conic                  : 0               
Optimizer  - Semi-definite variables: 1                 scalarized             : 1830            
Factor     - setup time             : 0.73              dense det. time        : 0.00            
Factor     - ML order time          : 0.48              GP order time          : 0.00            
Factor     - nonzeros before factor : 6.79e+06          after factor           : 6.79e+06        
Factor     - dense dim.             : 0                 flops                  : 1.67e+10        
ITE PFEAS    DFEAS    GFEAS    PRSTATUS   POBJ              DOBJ              MU       TIME  
0   2.6e+08  1.0e+00  1.0e+00  0.00e+00   3.158279953e-03   0.000000000e+00   1.0e+00  0.73  
1   1.8e+08  7.0e-01  7.7e-01  -1.00e+00  3.066692134e-02   5.420588349e-01   7.0e-01  1.29  
2   1.1e+08  4.2e-01  6.3e-01  -1.00e+00  5.568211894e-02   1.468461190e+00   4.2e-01  1.79  
3   9.0e+07  3.5e-01  5.6e-01  -1.00e+00  6.366940618e-02   1.958246124e+00   3.5e-01  2.27  
4   7.4e+07  2.9e-01  5.4e-01  -1.00e+00  8.624179595e-02   2.547283217e+00   2.9e-01  2.73  
5   4.6e+07  1.8e-01  4.3e-01  -1.00e+00  1.531939943e-01   4.644791184e+00   1.8e-01  3.20  
6   2.7e+07  1.0e-01  2.8e-01  -1.00e+00  3.375460063e-01   9.012248256e+00   1.0e-01  3.67  
7   2.2e+07  8.6e-02  2.3e-01  -1.00e+00  3.835511691e-01   1.126437528e+01   8.6e-02  4.14  
8   1.3e+07  5.2e-02  2.6e-01  -1.00e+00  6.191194974e-01   1.861132387e+01   5.2e-02  4.62  
9   1.0e+07  3.9e-02  3.5e-01  -1.00e+00  8.084095382e-01   2.461863513e+01   3.9e-02  5.10  
10  6.2e+06  2.4e-02  1.7e-01  -1.00e+00  1.227082779e+00   4.142518553e+01   2.4e-02  5.58  
11  2.9e+06  1.1e-02  1.4e-01  -1.00e+00  2.377412913e+00   9.031100900e+01   1.1e-02  6.19  
12  1.4e+06  5.4e-03  5.0e-03  -1.00e+00  3.026733044e+00   1.867710864e+02   5.4e-03  6.74  
13  6.2e+05  2.4e-03  2.3e-03  -1.00e+00  2.524428198e+00   4.120670476e+02   2.4e-03  7.33  
14  2.8e+05  1.1e-03  5.6e-02  -1.00e+00  2.583309857e+00   9.206827850e+02   1.1e-03  7.80  
15  2.6e+05  1.0e-03  4.4e-02  -1.00e+00  2.592518176e+00   9.703725262e+02   1.0e-03  8.32  
16  2.6e+05  1.0e-03  4.3e-02  -1.00e+00  2.593581647e+00   9.798465321e+02   1.0e-03  8.84  
17  2.6e+05  1.0e-03  4.3e-02  -1.00e+00  2.593581647e+00   9.798465321e+02   1.0e-03  9.42  
18  2.6e+05  1.0e-03  6.9e-02  -1.00e+00  2.593594464e+00   9.807679685e+02   1.0e-03  9.91  
19  2.5e+05  1.0e-03  3.9e-02  -1.00e+00  2.596969965e+00   1.005571743e+03   1.0e-03  10.91 
20  2.5e+05  9.7e-04  5.9e-02  -1.00e+00  2.600361709e+00   1.034473602e+03   9.7e-04  11.55 
21  2.5e+05  9.7e-04  5.9e-02  -1.00e+00  2.600361709e+00   1.034473602e+03   9.7e-04  12.08 
22  2.4e+05  9.5e-04  1.3e-02  -1.00e+00  2.602267260e+00   1.058084658e+03   9.5e-04  12.55 
23  2.4e+05  9.5e-04  7.8e-02  -1.00e+00  2.602492191e+00   1.062866668e+03   9.5e-04  13.03 
24  2.4e+05  9.5e-04  7.8e-02  -1.00e+00  2.602492191e+00   1.062866668e+03   9.5e-04  13.52 
25  2.4e+05  9.4e-04  2.3e-02  -1.00e+00  2.601870491e+00   1.071753769e+03   9.4e-04  14.01 
26  2.2e+05  8.6e-04  6.7e-02  -1.00e+00  2.596581741e+00   1.161675485e+03   8.6e-04  14.46 
27  2.2e+05  8.4e-04  4.7e-02  -1.00e+00  2.595514730e+00   1.186290741e+03   8.4e-04  14.93 
28  2.2e+05  8.4e-04  6.1e-02  -1.00e+00  2.595507147e+00   1.185999695e+03   8.4e-04  15.39 
29  2.2e+05  8.4e-04  6.1e-02  -1.00e+00  2.595507147e+00   1.185999695e+03   8.4e-04  15.85 
Optimizer terminated. Time: 16.35   

Solution status: UNKNOWN_RESULT_STATUS

On the other hand, SCS is able to get better bounds after 10k iterations.

I am aware of issues #73 and #100. However, in my case the absolute value of PRSTATUS is 1, which should mean the problem is nice (https://github.com/JuliaOpt/Mosek.jl/issues/73#issuecomment-206934792).

I also tried to set the solver parameters to MSK_IPAR_INTPNT_MAX_ITERATIONS = 10000, MSK_DPAR_OPTIMIZER_MAX_TIME = 60, MSK_DPAR_MIO_TOL_REL_GAP = 1e-08, MSK_IPAR_BI_IGNORE_MAX_ITER = 1. But Mosek still terminates within 29 iterations.

erling-d-andersen commented 4 years ago

Changing the number iterations is almost always waste of time in a case like this.

Btw when PRSTATUS converge to -1 your problem is most likely either primal or dual infeasible. However, in this case Mosek cannot compute a valid certificate and hence report unknown. My guess is that the problem is primal infeasible.

Here are some things to try:

https://docs.mosek.com/9.1/faq/faq.html

for how dump the problem to disk.

Hope it helps.

chengg04 commented 4 years ago

Thank you for this fast reply. I have tried to remove the objective, but Mosek still returns UNKNOWN_RESULT_STATUS after 20 seconds. I will try to scale my problem next, and probably dump the problem to Mosek.

I'll close this issue as it does not seem a problem in the JuMP side.