PerformanceEstimation / Performance-Estimation-Toolbox

Code of the Performance Estimation Toolbox (PESTO) whose aim is to ease the access to the PEP methodology for performing worst-case analyses of first-order methods in convex and nonconvex optimization. The numerical worst-case analyses from PEP can be performed just by writting the algorithms just as you would implement them.
http://www.di.ens.fr/~ataylor/share/PESTO_CDC_2017.pdf
MIT License
52 stars 6 forks source link

error in eig #2

Closed Caoang327 closed 3 years ago

Caoang327 commented 5 years ago

Hi. I am pretty interested in your work. But I find that I couldn't run the demo code on my computer. When I run the demo1.m, I get Error using eig Input matrix contains NaN or Inf.

Error in pep/solve (line 310) [V,D]=eig(double(G));%

Error in demo1 (line 101) P.solve()

I find that double(G) will get a matrix full of NaN. I'm using Matlab 2018a on mac(I hope it would
influence too much).

Thank you very much

AdrienTaylor commented 5 years ago

Dear,

It seems that you did not install Yalmip and/or a proper SDP solver (see "Setup" part in the readme here https://github.com/AdrienTaylor/Performance-Estimation-Toolbox). Please run "yalmiptest" and then I may be able to help further !

(If you got a NaN at that point, it is because the SDP was not solved!)

Cheers,

Adrien

Le mer. 27 mars 2019 à 03:35, Caoang327 notifications@github.com a écrit :

Hi. I am pretty interested in your work. But I find that I couldn't run the demo code on my computer. When I run the demo1.m, I get Error using eig Input matrix contains NaN or Inf.

Error in pep/solve (line 310) [V,D]=eig(double(G));%

Error in demo1 (line 101) P.solve()

I find that double(G) will get a matrix full of NaN. I'm using Matlab 2018a on mac(I hope it would influence too much).

Thank you very much

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AdrienTaylor/Performance-Estimation-Toolbox/issues/2, or mute the thread https://github.com/notifications/unsubscribe-auth/AKEh2BBoTweiXysEznPuhni69cj9uYwjks5vatj4gaJpZM4cM1Ab .

Caoang327 commented 5 years ago

Hi.

Thanks for your reply.

I find that I fail to pass the yalmiptest. The error is:

Invalid MEX-file '/Users/angcao/Desktop/SDPT3-4.0/Solver/Mexfun/mexmat.mexmaci64': dlopen(/Users/angcao/Desktop/SDPT3-4.0/Solver/Mexfun/mexmat.mexmaci64, 6): Library not loaded: @loader_path/libmex.dylib Referenced from: /Users/angcao/Desktop/SDPT3-4.0/Solver/Mexfun/mexmat.mexmaci64 Reason: image not found. I am using SDPT3-4.0. Could you plz tell me how to fix it? Thank you very much.

AdrienTaylor commented 5 years ago

As it is, I don't know.

However, I had better experiences with Mosek, or Sedumi, for solving PEPs. Therefore, I would recommend using one of those!

Caoang327 commented 5 years ago

Thank you very much. Just for sure, do I need to link the solver to yalm by some steps? Or it would be automatically linked?

AdrienTaylor commented 5 years ago

It should be automatically linked. If it is not, I guess you should check on yalmip's wiki. But I think you should first check that the solver is properly installed and that you, if required, you added the required folders to the matlab path !

AdrienTaylor commented 3 years ago

Hello Jonathan,

Can you try typing

yalmiptest ? It should give you the list of solvers that are installed, and then it should run a few test to verify that they are indeed in working order. The NaN problem is normally only caused by a problem with the solver. So alternatively, Mosek works very well, and features an academic license (they provide it quite quickly), and otherwise, sdpt3 does the job, too!

Adrien

Le ven. 18 déc. 2020 à 01:59, Jonathan Glaser notifications@github.com a écrit :

Hi Adrien,

I am getting this error too, and believe that I have yalmip and Sedumi installed correctly. Do you have any idea what I could do to solve it?

Thanks

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/AdrienTaylor/Performance-Estimation-Toolbox/issues/2#issuecomment-747800364, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACQSDWGOU6LOBLS47E3TCI3SVKSPFANCNFSM4HBTKANQ .

jmg764 commented 3 years ago

Hi Adrien,

Thanks so much for your help. It seems that I had both Mosek and Sedumi installed, and Mosek was not configured correctly.

I've really enjoyed reading your work, and am working on a final research project for a course https://www.chrismusco.com/amlds2020/ at New York University that is based on it. My goal, if possible, is to use PESTO in order to implement your accelerated gradient method http://proceedings.mlr.press/v125/barre20a/barre20a.pdf (Algorithm 2) using Hazan and Kakade's https://arxiv.org/pdf/1905.00313.pdf adaptive Polyak step size. I'm completely new to Matlab but I have been able to get PESTO running on my machine. I'm thinking that it is possible to achieve this by performing some basic modifications on A_PolyakStepsTakeI or A_PolyakStepsTakeII, but was wondering if this is the correct way to go about doing this? If not, is there an alternative approach you would recommend?

Much appreciated, Jonathan

On Fri, Dec 18, 2020 at 3:26 AM Adrien Taylor notifications@github.com wrote:

Hello Jonathan,

Can you try typing

yalmiptest ? It should give you the list of solvers that are installed, and then it should run a few test to verify that they are indeed in working order. The NaN problem is normally only caused by a problem with the solver. So alternatively, Mosek works very well, and features an academic license (they provide it quite quickly), and otherwise, sdpt3 does the job, too!

Adrien

Le ven. 18 déc. 2020 à 01:59, Jonathan Glaser notifications@github.com a écrit :

Hi Adrien,

I am getting this error too, and believe that I have yalmip and Sedumi installed correctly. Do you have any idea what I could do to solve it?

Thanks

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub < https://github.com/AdrienTaylor/Performance-Estimation-Toolbox/issues/2#issuecomment-747800364 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ACQSDWGOU6LOBLS47E3TCI3SVKSPFANCNFSM4HBTKANQ

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_AdrienTaylor_Performance-2DEstimation-2DToolbox_issues_2-23issuecomment-2D747943104&d=DwMFaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=X7nczGAnGErSnOkGZu-lyA&m=dATOrdW9VBhcppvNAENBzzU1_UJlB-R-5dczLyAvtio&s=o2g7CDt2YsZxfpF1ihl38iSLzd6hR3SlWqkTvEkD8Jg&e=, or unsubscribe https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ALXYYOCXI2FKFBIIEYDPO4DSVMG2JANCNFSM4HBTKANQ&d=DwMFaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=X7nczGAnGErSnOkGZu-lyA&m=dATOrdW9VBhcppvNAENBzzU1_UJlB-R-5dczLyAvtio&s=7xTthZgF9mC4Tq2nYuRoYbcCguT0KM91SR0LE7d00Ds&e= .