Running the old mex file on new releases of matlab

I try to run a program originally tested on Matlab 6.5 in the new version (R2009a). The program uses some mex files, and when I try to run it, I get the following error:

??? Invalid MEX file '/normalizedCut/common_files/sparsifyc.mexglx': normalizedCut / common_files / sparsifyc.mexglx: symbol mxGetIr, version libmx.INTERNAL is not defined in the libmx.so file with a link to the link.

(the code I'm trying to set up is Normalized cut by Shi and Malic, and can be found here: http://www.cis.upenn.edu/~jshi/software/files/NcutClustering_7.zip )

If I try to run the code on the same system, but Matlab 2007a is working fine.

Is there any backward compatibility issue for 2009a? Are there any flags anywhere on the system that I can change to help it work?

When I googled, I saw some references to the env variable LD_LIBRARY_PATH, but what exactly should be added to it, I could not find out.

Thank you Yair

+6
matlab mex
source share
2 answers

The source code for these mex functions is apparently available in the source “Image Segmentation with a Normalized Section” on this page: http://www.cis.upenn.edu/~jshi/software/ (in the specific_NcutImage_files subdirectory in the unpacked one. zip)

+4
source share

This is quite common in order to have problems running mex functions with different versions of Matlab. The errors you get look like they are related to changes to the APIs in Matlab (although this surprises me a bit). I had a big problem due to binary incompatibility caused by changes in gcc. I suggest contacting Jiambo and asking him if he can build a new version or free the source.

In the worst case, you may try to reimplement these mex functions. The normalized section algorithm is pretty simple in Matlab (see Shea and Malik's article ). According to the names of mex-functions, they look as if they basically duplicate the existing functionality of matlab (matrix multiplication, matrix distribution). There’s no unnecessary chance that if you reimplement them as normal m-code functions, they will be faster anyway due to the multi-core support that was added to Matlab.

0
source share

All Articles