Compile with mcc


#1

I am trying to use mcc -m to compile executables from matlab codes using cvx, but always failed when I tried to run it on command line. The codes run without problem in the matlab IDE.

The most recent errors is :

‘/ifs/spectrum/yshi/cvx/keywords/variable.m’
is not in the application’s expanded CTF archive at
’/ifshome/yshi/.mcrCache7.17/FOD_Ad0’.
This is typically caused by calls to ADDPATH in your startup.m or matlabrc.m files. Please see the compiler documentation and use the ISDEPLOYED function to ensure ADDPATH commands are not executed by deployed applications.
Previously accessible file “/ifs/spectrum/yshi/cvx/keywords/variable.m” is now
inaccessible.

The function variable.m is actually in the CTF archive because I used -a option in mcc to include everything in cvx.

Any suggestions? Thanks!


(Michael C. Grant) #2

You cannot compile MATLAB code that uses CVX, I’m afraid.


(Chris Cox) #3

Is this ever expected to change? At least in our distributed cluster computing environment, it is essential that all Matlab code be compiled because of licensing issues with Matlab (and also, certainly, to ensure stable results assuming you also deploy the appropriate runtime). But at any rate, being able to compile code that uses CVX would open it up to a lot more computing power.


(Michael C. Grant) #4

The current version almost certainly will never officially support compilation. It is not designed with compilation in mind, and relies on hacks to the MATLAB language and environment that are not likely to be portable. I have some preliminary work on a complete rewrite of CVX that would be much easier to compile. But to be perfectly honest, it must necessarily proceed at a very slow pace because I have to give priority to paid work.


#5

Could you please tell if there is any news regarding the issue? Is it expected to have a version of CVX which can be compiled? Thank you


(Michael C. Grant) #6

It is not like to happen without a paid contract to implement it.