How to get mosek working in cvx matlab on ubuntu 22.04

I have installed gurobi with a academic license. I am now trying to install mosek to compare speed. I have tried hard but I don’t succeed.

So far I have a license file but I guess I am missing a toolbox directory or something as I have nothing name matlab or similar and no *.m files. Some help is appreciated.

/home/tk/mosek:
total used in directory 24 available 35.7 GiB
drwxrwxr-x 3 tk tk 4096 Jul 11 09:11 .
drwxr-xr-x 95 tk tk 12288 Jul 23 08:41 …
drwxrwxr-x 4 tk tk 4096 Jul 11 08:57 10.2
-rw-rw-r-- 1 tk tk 1030 Jul 11 08:52 mosek.lic

/home/tk/mosek/10.2:
total used in directory 748 available 35.9 GiB
drwxrwxr-x 4 tk tk 4096 Jul 11 08:57 .
drwxrwxr-x 3 tk tk 4096 Jul 11 09:11 …
drwxrwxr-x 3 tk tk 4096 Jul 11 08:57 doc
-rw-r–r-- 1 tk tk 461740 Jun 13 08:49 intro.pdf
-rw-r–r-- 1 tk tk 284396 Jun 13 08:49 mosek-eula.pdf
drwxrwxr-x 4 tk tk 4096 Jul 11 08:57 tools

If you don’t have the toolbox folder then you downloaded the wrong package, ie. Linux ARM64 instead of Linux64x86. The correct link is:

https://download.mosek.com/stable/10.2.1/mosektoolslinux64x86.tar.bz2

Further instructions in

https://docs.mosek.com/latest/toolbox/install-interface.html

Thanks a lot for your help. I looked for the newest ubuntu package which was the wrong architecture.

Now things seems work. I can share the following

  • For my problem gurobi is 10% slower than mosek and SDPT3 is 23% slower than gurobi
  • I have a slack variable in cvx “variable s nonnegative;”
    • SDPT3 and mosek gives negative but insignificant small values for s
      e.g. 1e-9 where the constraints are like 0.1.
    • gurobi does not give negative values for the same data

I think I will go with gurobi

cvx_solver

Name Status Version Location

Gurobi selected 11.03 /home/tk/gurobi1103/linux64/matlab
Gurobi_2 11.03 /home/tk/gurobi1103/linux64/matlab
Mosek 10.2.1 /home/tk/mosek/10.2/toolbox/r2017a
SDPT3 default 4.0 {cvx}/sdpt3
SeDuMi 1.02, {cvx}/sedumi