help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Run and interface external program compiled with ICC (NOT mkoctfile


From: Jaroslav Hajek
Subject: Re: Run and interface external program compiled with ICC (NOT mkoctfile!)
Date: Tue, 29 Jun 2010 19:59:40 +0200

On Tue, Jun 29, 2010 at 5:52 PM, Carlos222 <address@hidden> wrote:
>
>
>>Well, the matrix operations in Octave are usually as fast or faster than
>>matlab. You have to make sure that you use an optimized BLAS library, of
>>course. Octave lags when your .m code uses explicit loops
>>(for, while...), accessing the data element-by-element. The usual cure
>>for that is rewriting the .m code to vectorize it. If you can't
>>vectorize, only then you'd rewrite it in compiled language.
>
>>You should run some speed tests for your code; use tic/toc and/or
>>cputime functions to measure the speed of operations that matter to you.
>
> Dear Przemek,
> Thank you for your suggestion. I have a good experience in programing for
> Matlab. For sure all my code is already vectorized.
>
>
>>Octave has excellent library interface, so you can write your
>>computational kernel and compile it into an Octave-loadable native
>>binary module (an .oct file); you'd then write the I/O and
>>pre/post-processing in the interpreted language (.m files), and then
>>call out your binary computation code, passing the data into and out of it
>>using Octave data API. There have been good examples of that on this
> l>ist, even quite recently.
>
> By the other hand, I dont have the same experience with compiled languages.
> I am afraid that if I use the mocktave I will not be able to use some
> features like the automatic parallelization present in the intel compilers.
> So what is your opinion ?
>

Note that mkoctfile is just a wrapper script; it simply calls the
compiler used to build Octave. If you have invested in a commercial
compiler and BLAS library, I recommend you use them for Octave, after
all that is one of its strongest points.
Building Octave is not an easy task, though, mainly because of lot of
dependent libraries (if you sacrifice the functionality, building is a
lot easier).


-- 
RNDr. Jaroslav Hajek, PhD
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]