octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #29553] missing arpack: make check segfaults o


From: Petr Mikulik
Subject: [Octave-bug-tracker] [bug #29553] missing arpack: make check segfaults on eigs
Date: Tue, 08 Jun 2010 09:20:47 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/532.8 (KHTML, like Gecko) Chrome/4.0.295.0 Safari/532.8

Follow-up Comment #19, bug #29553 (project octave):

File eigs.cc still contains testing code block which does nothing unless
Octave is compiled with arpack:

%!shared n, k, A, d0, d2
%! n = 20;
%! k = 4;
%! A =
sparse([3:n,1:n,1:(n-2)],[1:(n-2),1:n,3:n],[ones(1,n-2),4*ones(1,n),ones(1,n-2)]);
%! d0 = eig (A);
%! d2 = sort (d0);
%! [~, idx] = sort (abs(d0));
%! d0 = d0(idx);

There is no assert() command afterwards, thus these commands are useless.

I think the whole test code should be in %!testif HAVE_ARPACK,

%% Real positive definite tests, n must be even
%!testif HAVE_ARPACK
%! shared n, k, A, d0, d2
%! n = 20;
%! k = 4;
%! d1 = eigs (A, k);
...

instead of tens of
%!testif HAVE_ARPACK
%! d1 = eigs (A, k);
%! assert (d1, d0(end:-1:(end-k+1)), 1e-11);



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?29553>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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