Why do MEX-files run slower in MATLAB 6.0 (R12) than they did in MATLAB 5.3.1 (R11.1 or earlier) on my Linux machine?

1 view (last 30 days)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 20 Jan 2010
MEX-files in MATLAB 6.0 (R12) are very different than MEX-files in previous versions of MATLAB. Therefore, in order for MEX-files that were generated in earlier versions of MATLAB to run in MATLAB 6.0 and above, the MEX-files must be regenerated in the new MATLAB version.
There is another change that was made specifically in the Linux verion of MATLAB 6.0. In MATLAB 6.0, the extension for MEX-files in Linux has changed from .lnx to .glnx.
If you are running MATLAB 6.0 (or above) and you do not regenerate new MEX-files from your MATLAB functions, either of 2 possible results may occur:
1. If you happen to be running the original function, you may have performance issues.
2. If you happen to be running the old version of the MEX-file (in Linux this would be the .lnx file) you will get errors or segmentation violations.
To determine which file you are executing, execute the following at the MATLAB command prompt:
which FOO
The reason that MathWorks changed the extension was that we moved from libc5 to glibc C libraries and all MEX-files would need to be rebuilt in R12. We changed the extension to allow users the ability to use their old MEX files (for use in R11.1 and earlier) in the same directory as their new MEX files (for use in R12).

More Answers (0)

Categories

Find more on MATLAB Report Generator in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!