Using Mosek 11 with CVX

Good morning, I am trying to use MOSEK 11.0.16 with CXV 2.2. My MATLAB version is 2024b. I have successfully obtain the MOSEK academic licence and installed MOSEK and it can be used in MATLAB (tested with mosekdiag).

I am using Ubuntu. The MOSEK licence is placed in ./home/mosek/mosek.lic , while the MEX file of MOSEK is placed in ./cvx/mosek/11.0/toolbox/r2019b/mosekopt.mexa64 . I also have another MEX file ./cvx/mosek/11.0/toolbox/r2019bom/mosekopt.mexa64

When I run cvx_setup, CVX cannot find the .MEX file of MOSEK, despite the folder with the mosek licence being added to the path, and returns:

Setting CVX paths…done.
Saving updated path…failed. (see below)
Searching for solvers…5 shims found.
2 solvers initialized (* = default):

  • SDPT3 4.0 {cvx}/sdpt3
    SeDuMi 1.02, {cvx}/sedumi
    3 solvers skipped:
    GLPK
    Could not find a GLPK installation.
    Gurobi unknown
    Could not find a Gurobi MEX file.
    Mosek unknown
    Could not find a MOSEK MEX file.
    Saving updated preferences…done.
    Testing with a simple model…done!

Just to try, I looked how the version of cvx that you can download with MOSEK 9.0 included is, and I tried to create a folder with the .MEX file in a simular fashion ( ./cvx/mosek/a64/mosekopt.mexa64 ) but still CVX wasn’t able to find the .MEX file.

Did anyone encountered the same problem? Thank you in advance!

Complete step by step instructions:

Your license path

./home/mosek/mosek.lic

looks incorrect. If you follow the instructions from the link step by step you will be able to diagnose and rectify all issues.

Thank you for your prompt reply.

I went through the process again and everything seemed alright.
In the end, what seemed to give problem, what that I had put the folder of MOSEK inside the folder of CVX. As soon as I moved it outside, CVX was able to find it and initialise the solver.