help-octave
[Top][All Lists]
Advanced

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

Execution and Plot times for 1Kx1K ambiguity function


From: Labitt, Bruce
Subject: Execution and Plot times for 1Kx1K ambiguity function
Date: Tue, 29 Jul 2008 14:15:56 -0400

I am trying to track down some timing differences between octave and
matlab for a reference program.  Matlab R2006A WinXP vs Octave 3.0.1
Scientific Linux 5.2.  I configured Octave with the following:

./configure LDFLAGS="-L/lib64 -L/usr/lib64" F77=gfortran
LD_LIBRARY_PATH="/usr/lib64:/lib64"

I have fftw3, ATLAS and lapack installed.  All were built from source.

Octave/matlab Program is below:

clear
sigma = 1e-6;
M = 1024;
uinput = sigma*randn(1,M)+chirp(1:M,-0.01,M,0.01,'linear');
N = size(uinput,2)          
tau = N; U = uinput; nfft=N;  u=U;  j = 0; v = u;
tic
delay = linspace(-4*N,4*N,nfft);
freq_del = 8 / tau / nfft;  vfft = fft(v,nfft);
for freq = -4/tau:freq_del:4/tau;
    j = j+1;
    exf = exp(sqrt(-1) * 2. * pi * freq .* delay);
    u_times_exf = u .* exf;
    ufft = fft(u_times_exf,nfft);
    prod = ufft .* conj(vfft);
    ambig(:,j) =fftshift(abs(ifft(prod))');
end
freq = linspace(-1,1,nfft+1);  delay = linspace(-1,1,nfft);
figure(1)
ambig = transpose(ambig)./ max(max(ambig));
toc
mesh(delay,freq,20*log10(ambig+eps))
axis tight
ylabel('Normalized frequency')
xlabel('Normalized delay')
zlabel('Code ambiguity function')

Execution time for WinXP on laptop core2 duo T7300 2GHz, 4GB RAM:  13.5
sec
Execution time for linux on Pentium4 3.4GHz 8GB RAM 667MHz:        22.75
sec

By execution time I only mean what tic;toc; reports.  I am surprised at
the speed difference.

Matlab plots the mesh plot within 5 additional seconds on my laptop,
Octave through gnuplot has not been able to plot anything yet to the
screen.  

If I run top I see gnuplot at 100% CPU and 7% memory.  gnuplot has been
running for 37 minutes now and has not rendered the figure.

Anyone got an idea on how to diagnose this "slowness" and to hopefully
fix this?  I've got much larger problems to solve than this, so the
speed difference is an issue.  I realize this is just the problem
statement.  What else should I provide the list (or select others) to
help the analysis?

TIA
Bruce



reply via email to

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