Compile a standalone exe file which contains cvx


(Dai Wang) #1

I saw there are two similar topics, but still want to ask around again if there is a way to compile a executable file which contains CVX. I compiled files to a standalone exe file on Linux machine and wanted to use runtime to call it. However, I had a hard time to deal with cvx errors. It firstly showed:

Setting up environment variables

LD_LIBRARY_PATH is .:/home/parallels/matlabruntime/v91/runtime/glnxa64:/home/parallels/matlabruntime/v91/bin/glnxa64:/home/parallels/matlabruntime/v91/sys/os/glnxa64:/home/parallels/matlabruntime/v91/sys/opengl/lib/glnxa64


CVX: Software for Disciplined Convex Programming ©2014 CVX Research
Version 2.1, Build 1116 (d4cc5c5) Thu Mar 30 21:54:11 2017

Installation info:
Path: /home/parallels/.mcrCache9.1/simula0/matlab_scripts/simulation/solver/cvx
MATLAB version: 9.1 (R2016b)
OS: Linux amd64 version 4.15.0-34-generic
Java version: 1.7.0_60
Manifest missing; cannot verify file structure.
Preferences: none found; defaults loaded.
License host:
Username: parallels
Host ID: 001c42a85875 (enp0s5)
Installed license:
No license installed.
No valid licenses found.
Click here to fill out an academic license request
for the username and first hostid listed above.

Setting CVX paths…done.
Saving updated path…failed. (see below)
Searching for solvers…Struct contents reference from a non-struct array object.

Error in cvx_setup (line 114)


Then I realized some subfolders(e.g.shims) in cvx folder were not compiled automatically. So I manually added them, but another error showed up.


Setting CVX paths…done.
Saving updated path…failed. (see below)
Searching for solvers…7 shims found.
7 solvers skipped:
/home/parallels/.mcrCache9.1/simula1/home/parallels/Tesla/energy_applications/matlab_scripts/solver/cvx/shims/cvx_cbc
unexpected error:
Error using feval
Undefined function ‘cvx_cbc’ for input arguments of type
‘struct’.
Error in cvx_setup (line 83)
Error in simulateSite (line 15)
/home/parallels/.mcrCache9.1/simula1/home/parallels/Tesla/energy_applications/matlab_scripts/solver/cvx/shims/cvx_cbc_win
unexpected error:
Error using feval
Undefined function ‘cvx_cbc_win’ for input arguments of type
‘struct’.
Error in cvx_setup (line 83)
Error in simulateSite (line 15)
/home/parallels/.mcrCache9.1/simula1/home/parallels/Tesla/energy_applications/matlab_scripts/solver/cvx/shims/cvx_glpk
unexpected error:
Error using feval
Undefined function ‘cvx_glpk’ for input arguments of type
‘struct’.
Error in cvx_setup (line 83)
Error in simulateSite (line 15)
/home/parallels/.mcrCache9.1/simula1/home/parallels/Tesla/energy_applications/matlab_scripts/solver/cvx/shims/cvx_gurobi
unexpected error:
Error using feval
Undefined function ‘cvx_gurobi’ for input arguments of type
‘struct’.
Error in cvx_setup (line 83)
Error in simulateSite (line 15)
/home/parallels/.mcrCache9.1/simula1/home/parallels/Tesla/energy_applications/matlab_scripts/solver/cvx/shims/cvx_mosek
unexpected error:
Error using feval
Undefined function ‘cvx_mosek’ for input arguments of type
‘struct’.
Error in cvx_setup (line 83)
Error in simulateSite (line 15)
/home/parallels/.mcrCache9.1/simula1/home/parallels/Tesla/energy_applications/matlab_scripts/solver/cvx/shims/cvx_sdpt3
unexpected error:
Error using feval
Undefined function ‘cvx_sdpt3’ for input arguments of type
‘struct’.
Error in cvx_setup (line 83)
Error in simulateSite (line 15)
/home/parallels/.mcrCache9.1/simula1/home/parallels/Tesla/energy_applications/matlab_scripts/solver/cvx/shims/cvx_sedumi
unexpected error:
Error using feval
Undefined function ‘cvx_sedumi’ for input arguments of type
‘struct’.
Error in cvx_setup (line 83)
Error in simulateSite (line 15)
No valid solvers were found. This suggests a corrupt installation. Please
try re-installing the files and re-running cvx_setup. If the same error
occurs, please contact CVX support.
Please report this error to support, and include entire output of
CVX_SETUP in your support request.


It seems those .m functions in ./cvx/shims cannot be recognized. I dug a little more into “cvx_setup”. The error locates at line 83, "tsolv = feval(tsolv.sname, tsolv) ". Any body has a work around? Thanks in advance.


(Mark L. Stone) #2

I don;t think anything has changed since the mot recent threads on this topic. if you can somehow make something work, great, but this is not supported, and you are on your own. if someone has had success, they are of course free to post about what they did.