|
"Abel Brown" <brown.2179@osu.edu> wrote in message
news:fstb2b$po6$1@fred.mathworks.com...
> "Titus" <titus.edelhofer@mathworks.de> wrote in message
> <fssq0b$g98$1@fred.mathworks.com>...
>>
>> "Abel Brown" <brown.2179@osu.edu> schrieb im Newsbeitrag
>> news:fsscs7$88n$1@fred.mathworks.com...
>> > OK so im reading "Technical Solutions" with solution ID:
>> > 1-15VWV from February 23 2007 for R2007a.
>> >
>> > The lowdown of tech soln 1-15VWV:
>> > My MEX-file, that was compiled using the MATLAB Compiler 2.1
>> > (R12), runs more slowly than the M-file equivalent. However,
>> > when I use optimizations, I see a significant speed
> improvement.
>> >
>> > For example,
>> >
>> >
>> > tic; squibo(10000); toc
>> >
>> > elapsed_time=
>> > 2.230000
>> >
>> > mcc squibo
>> > tic; squibo(10000); toc;
>> >
>> > elapsed_time=
>> > 5.34000
>> >
>> > mcc -ri squibo
>> > tic; squibo(10000); toc
>> >
>> > elapsed_time=
>> > 0.083400
>> >
>> > I just got my hands on the 2007b matlab compiler desperately
>> > hoping to speed up some interpolation routines etc etc.
>> >
>> > so i call mcc interp_function.m and it says
>> > ??? Error using ==> mcc
>> > Unable to determine application type, since no wrapper
>> > function was specified.
>> > Please use the -W switch or specify application type via -m
>> > or -l.
>> > Type 'mcc -?' for further assistance.
>> >
>> > The only thing i want to do is exactly what is in the
>> > aforementioned "Technical Solution" and that's it!
>> >
>> > Why the run around?
>> >
>> >
>> >
>>
>> Hi,
>> unfortunately you missed the first line of the solution:
>> "Note that compiling M-code to MEX-files is no longer
> supported with the
>> release of MATLAB Compiler 4.0 (R14)."
>> The compile does not convert to C-Code anymore but is more
> of a runtime
>> environment for the MATLAB code. Therefore converting to a
> MEX file would
>> not make sense at all, even if the compiler would do it.
>>
>> Therefore: the profiler is the way to go
>> help profile
>> and try to speed up the code within MATLAB.
>>
>> Hope this helps,
>> Titus
>>
>>
>
> No Titus this does not help.
>
> Don't insult me by telling me to use the profiler and that
> this doesn't make sense at all!
I understand, and I believe Titus understands, that you're trying to create
a MEX-file from an M-file; it's simply not possible with the current version
of MATLAB Compiler.
> Im not a novice matlab programmer. I know what i need!
If there was a new type of file, say a .runfast file, that sped up your code
but was explicitly NOT a MEX-file, would that be acceptable? Is your goal
to have a MEX-file, or is your goal to have your function run faster? [I
suspect the latter.]
If you use the Profiler and MLINT to help you optimize your code and take
advantage of the JIT technology introduced in MATLAB 6.5 (R13) and enhanced
in subsequent releases, the .m file could _be_ that .runfast file.
In case you haven't seen the documentation on the introduction of the JIT
technology (which I think is likely, from the fact that you mentioned you
were using Release 12) here's the link to the release notes on that
technology from Release 13:
http://www.mathworks.com/access/helpdesk_r13/help/base/relnotes/matlab/matlab134.html#52037
You used to accomplish your goal of having your function run faster by
compiling it to a MEX-file. That method is no longer available; now you
will need to try a different approach, namely optimizing your M-file itself,
as Titus suggested.
> Your response is very similar to other who have asked this
> question. (Jim Rockford, 02 march 2008, "Matlab compiler
> question")
>
> For years the main feature of the compiler was to convert m
> code to mex files. And suddenly without warning it's a "run
> time environment".
That change was made in MATLAB Compiler 4.0 (R14), which was released in
mid-2004. This change was not "without warning", but the warnings occurred
several years ago, during one of the releases you "jumped over" in your
conversion from Release 12 to Release R2007b. That's why you were unaware
of this change.
> I'v read all the current documentation
> and no where does it say the compiler no longer supports mex
> file creation!?! This is just crazy!
It was documented in the release notes for MATLAB Compiler 4.0, which are
still included in the release notes for the current version of the Compiler,
version 4.8 (R2008a).
http://www.mathworks.com/access/helpdesk/help/toolbox/compiler/rn/bqnylfk-1.html
> How do i get compiler 3.0 (R13)? I dont care if i have to
> go back to R2007a to use it.
Using that version of the Compiler is not supported with Release R2007a; I
believe you would need to use Release 13 to do so. If you want to do that,
I suggest you contact your sales representative, or the person who maintains
your license.
--
Steve Lord
slord@mathworks.com
|