For Windows:
MATLAB reports something like
DLL load failed for mex file c:\mosek\5\tools\toolbox\14sp3\mosekopt.dll The specified procedure could not be found. ??? Invalid MEX-file
By default MATLAB cannot locate the MOSEK optimization toolbox functions. Therefore you must execute the addpath command within MATLAB to change the so-called matlabpath appropriately. Indeed matlabpath should include a path to the MOSEK optimization toolbox functions. Pleas see the section “Locating the toolbox functions” in the MOSEK optimization toolbox for MATLAB manual for details on setting matlabpath.
If you have initialized matlabpath the problem is most likely that MOSEK cannot load the MOSEK DLL. The reason for this is that the variable PATH does not have the appropriate value.
Please check the Installation manual for instructions about how to setup the operating system variable PATH.
For Linus/Solaris/UNIX: MATLAB reports something similar to
Unable to load mex file: /usr/local/mosek/2/toolbox/14sp3/mosekopt.mexglx. libmosek.so.2.5: cannot open shared object file: No such file or directory ??? Invalid MEX-file
The cause of the problem is that the shared library
libmosek.so.2.5
cannot be loaded. This problem normally is caused by that the OS environment variable
LD_LIBRARY_PATH
is not appropriately setup. This environment variable is not called LD_LIBRARY_PATH on all platforms and Table 5.2 shows the appropriate name for different platforms.
|
Note you can inspect the value of the variable inside MATLAB by executing the command
!echo $LD_LIBRARY_PATH
Finally, it is worthwhile to consult the MOSEK optimization tools installation manual for further details.
MAC OSX:
On MAC OSX you should setup the DYLD_LIBRARY_PATH variable appropriately. This can be tricky. Particularly if using MOSEK with another application such as MATLAB and is invoking MATLAB by clicking on the MATLAB icon. In such case you should either create or update the file
$HOME/.MacOSX/environment.plist
which should at least contain
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>\mosek{}LM_LICENSE_FILE</key> <string>/home/eda/mosek/4/licenses/mosek.lic</string> <key>DYLD_LIBRARY_PATH</key> <string>/home/eda/mosek/4/tools/platform/osx32ppc/bin</string> </dict> </plist>
You should of course input the relevant paths in string scopes for your installation.
Before the setup in this file takes effect you should logout and login.