# HG changeset patch # User John W. Eaton # Date 1296241509 18000 # Node ID 35c55d1241c7acaa87cf62c2e0ed174b4c7ee3da # Parent 9f5d2ef078e8dd7b30bfdbe27235c4f8291ab978 remove configure checks for ARPACK diff -r 9f5d2ef078e8 -r 35c55d1241c7 ChangeLog --- a/ChangeLog Fri Jan 28 14:04:33 2011 -0500 +++ b/ChangeLog Fri Jan 28 14:05:09 2011 -0500 @@ -1,3 +1,10 @@ +2011-01-28 John W. Eaton + + * configure.ac: Don't check for ARPACK. + * common.mk (ARPACK_CPPFLAGS, ARPACK_LDFLAGS, ARPACK_LIBS): + Delete variables. + (do_subst_config_vals): Don't substitute them. + 2011-01-27 Ben Abbott * README.MacOS: Modify instructions for MacPorts to "deactivate" diff -r 9f5d2ef078e8 -r 35c55d1241c7 common.mk --- a/common.mk Fri Jan 28 14:04:33 2011 -0500 +++ b/common.mk Fri Jan 28 14:05:09 2011 -0500 @@ -247,10 +247,6 @@ READLINE_LIBS = @READLINE_LIBS@ TERM_LIBS = @TERM_LIBS@ -ARPACK_CPPFLAGS = @ARPACK_CPPFLAGS@ -ARPACK_LDFLAGS = @ARPACK_LDFLAGS@ -ARPACK_LIBS = @ARPACK_LIBS@ - DL_LIBS = @DL_LIBS@ LIBS = @LIBS@ @@ -460,9 +456,6 @@ -e "s|%OCTAVE_CONF_AMD_LIBS%|\"${AMD_LIBS}\"|" \ -e "s|%OCTAVE_CONF_AR%|\"${AR}\"|" \ -e "s|%OCTAVE_CONF_ARFLAGS%|\"${ARFLAGS}\"|" \ - -e "s|%OCTAVE_CONF_ARPACK_CPPFLAGS%|\"${ARPACK_CPPFLAGS}\"|" \ - -e "s|%OCTAVE_CONF_ARPACK_LDFLAGS%|\"${ARPACK_LDFLAGS}\"|" \ - -e "s|%OCTAVE_CONF_ARPACK_LIBS%|\"${ARPACK_LIBS}\"|" \ -e "s|%OCTAVE_CONF_BLAS_LIBS%|\"${BLAS_LIBS}\"|" \ -e "s|%OCTAVE_CONF_CAMD_CPPFLAGS%|\"${CAMD_CPPFLAGS}\"|" \ -e "s|%OCTAVE_CONF_CAMD_LDFLAGS%|\"${CAMD_LDFLAGS}\"|" \ diff -r 9f5d2ef078e8 -r 35c55d1241c7 configure.ac --- a/configure.ac Fri Jan 28 14:04:33 2011 -0500 +++ b/configure.ac Fri Jan 28 14:05:09 2011 -0500 @@ -1107,15 +1107,6 @@ LIBS="$save_LIBS" fi -save_LIBS="$LIBS" -LIBS="$LAPACK_LIBS $BLAS_LIBS $FLIBS $LIBS" -OCTAVE_CHECK_LIBRARY(arpack, ARPACK, - [ARPACK not found. The eigs function will be disabled.], - [], - [dseupd], - [Fortran 77], [don't use the ARPACK library, disable eigs function]) -LIBS="$save_LIBS" - ### Enable dynamic linking. --enable-shared implies this, so ### --enable-dl is only need if you are only building static libraries ### and want to try dynamic linking too (works on some systems, for @@ -2079,7 +2070,6 @@ AMD CPPFLAGS: $AMD_CPPFLAGS AMD LDFLAGS: $AMD_LDFLAGS AMD libraries: $AMD_LIBS - ARPACK libraries: $ARPACK_LIBS BLAS libraries: $BLAS_LIBS CAMD CPPFLAGS: $CAMD_CPPFLAGS CAMD LDFLAGS: $CAMD_LDFLAGS @@ -2329,7 +2319,7 @@ AC_MSG_WARN([Make. This should work automatically for gfortran. If]) AC_MSG_WARN([you use another compiler, you will need to set this]) AC_MSG_WARN([variable on the configure command line. You must also]) - AC_MSG_WARN([compile the ARPACK, BLAS, LAPACK, QRUPDATE, and SuiteSparse]) + AC_MSG_WARN([compile the BLAS, LAPACK, QRUPDATE, and SuiteSparse]) AC_MSG_WARN([libraries to use 8 byte signed integers for array indexing.]) AC_MSG_WARN([]) warn_msg_printed=true diff -r 9f5d2ef078e8 -r 35c55d1241c7 liboctave/ChangeLog --- a/liboctave/ChangeLog Fri Jan 28 14:04:33 2011 -0500 +++ b/liboctave/ChangeLog Fri Jan 28 14:05:09 2011 -0500 @@ -1,3 +1,7 @@ +2011-01-28 John W. Eaton + + * eigs-base.cc: Assume we have ARPACK. + 2011-01-27 John W. Eaton * Sparse.cc (Sparse::assign (const idx_vector&, const idx_vector&, diff -r 9f5d2ef078e8 -r 35c55d1241c7 liboctave/eigs-base.cc --- a/liboctave/eigs-base.cc Fri Jan 28 14:04:33 2011 -0500 +++ b/liboctave/eigs-base.cc Fri Jan 28 14:05:09 2011 -0500 @@ -44,7 +44,6 @@ #include "dbleLU.h" #include "CmplxLU.h" -#ifdef HAVE_ARPACK typedef ColumnVector (*EigsFunc) (const ColumnVector &x, int &eigs_error); typedef ComplexColumnVector (*EigsComplexFunc) (const ComplexColumnVector &x, int &eigs_error); @@ -202,8 +201,6 @@ static Matrix utsolve (const Matrix&, const ColumnVector&, const Matrix&); -#endif - template static octave_idx_type lusolve (const SM& L, const SM& U, M& m) diff -r 9f5d2ef078e8 -r 35c55d1241c7 scripts/ChangeLog --- a/scripts/ChangeLog Fri Jan 28 14:04:33 2011 -0500 +++ b/scripts/ChangeLog Fri Jan 28 14:05:09 2011 -0500 @@ -1,3 +1,7 @@ +2011-01-28 John W. Eaton + + * sparse/svds.m: Use "test" instead of "testif HAVE_ARPACK". + 2011-01-27 Rik * plot/whitebg.m: Improve docstring. diff -r 9f5d2ef078e8 -r 35c55d1241c7 scripts/sparse/svds.m --- a/scripts/sparse/svds.m Fri Jan 28 14:04:33 2011 -0500 +++ b/scripts/sparse/svds.m Fri Jan 28 14:05:09 2011 -0500 @@ -253,17 +253,17 @@ %! rand('state',42) %! opts.v0 = rand (2*n,1); % Initialize eigs ARPACK starting vector %! % to guarantee reproducible results -%!testif HAVE_ARPACK +%!test %! [u2,s2,v2,flag] = svds(A,k); %! s2 = diag(s2); %! assert(flag,!1); %! assert(s2, s(end:-1:end-k+1), 1e-10); -%!testif HAVE_ARPACK +%!test %! [u2,s2,v2,flag] = svds(A,k,0,opts); %! s2 = diag(s2); %! assert(flag,!1); %! assert(s2, s(k:-1:1), 1e-10); -%!testif HAVE_ARPACK +%!test %! idx = floor(n/2); %! % Don't put sigma right on a singular value or there are convergence issues %! sigma = 0.99*s(idx) + 0.01*s(idx+1); @@ -271,6 +271,6 @@ %! s2 = diag(s2); %! assert(flag,!1); %! assert(s2, s((idx+floor(k/2)):-1:(idx-floor(k/2))), 1e-10); -%!testif HAVE_ARPACK +%!test %! [u2,s2,v2,flag] = svds(zeros (10), k); %! assert (isequal(u2, eye (10, k)) && isequal (s2, zeros(k)) && isequal (v2, eye(10, 7))) diff -r 9f5d2ef078e8 -r 35c55d1241c7 src/ChangeLog --- a/src/ChangeLog Fri Jan 28 14:04:33 2011 -0500 +++ b/src/ChangeLog Fri Jan 28 14:05:09 2011 -0500 @@ -1,3 +1,13 @@ +2011-01-28 John W. Eaton + + * DLD-FUNCTIONS/eigs.cc (Feigs): Assume we have ARPACK. + Use "test" instead of "testif HAVE_ARPACK". + * toplev.cc (octave_config_info): Remove ARPACK_CPPFLAGS, + ARPACK_LDFLAGS, ARPACK_LIBS from the struct. + * oct-conf.h.in (OCTAVE_CONF_ARPACK_CPPFLAGS, + OCTAVE_CONF_ARPACK_LDFLAGS, OCTAVE_CONF_ARPACK_LIBS): + Delete #defines. + 2011-01-28 Kai Habel * DLD-FUNCTIONS/__fltk_uigetfile__.cc: File filter value is 1-based diff -r 9f5d2ef078e8 -r 35c55d1241c7 src/DLD-FUNCTIONS/eigs.cc --- a/src/DLD-FUNCTIONS/eigs.cc Fri Jan 28 14:04:33 2011 -0500 +++ b/src/DLD-FUNCTIONS/eigs.cc Fri Jan 28 14:05:09 2011 -0500 @@ -304,7 +304,7 @@ @end deftypefn") { octave_value_list retval; -#ifdef HAVE_ARPACK + int nargin = args.length (); std::string fcn_name; octave_idx_type n = 0; @@ -750,9 +750,6 @@ if (! fcn_name.empty ()) clear_function (fcn_name); -#else - error ("eigs: not available in this version of Octave"); -#endif return retval; } @@ -771,107 +768,107 @@ %! [~, idx] = sort (abs(d0)); %! d0 = d0(idx); %! rand("state", 42); % initialize generator to make eigs behavior reproducible -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k); %! assert (d1, d0(end:-1:(end-k+1)), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A,k+1); %! assert (d1, d0(end:-1:(end-k)),1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'lm'); %! assert (d1, d0(end:-1:(end-k+1)), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'sm'); %! assert (d1, d0(k:-1:1), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'la'); %! assert (d1, d2(end:-1:(end-k+1)), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'sa'); %! assert (d1, d2(1:k), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'be'); %! assert (d1, d2([1:floor(k/2), (end - ceil(k/2) + 1):end]), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k+1, 'be'); %! assert (d1, d2([1:floor((k+1)/2), (end - ceil((k+1)/2) + 1):end]), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 4.1); %! [~,idx0] = sort (abs(d0 - 4.1)); %! [~,idx1] = sort (abs(d1 - 4.1)); %! assert (d1(idx1), d0(idx0(1:k)), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs(A, speye(n), k, 'lm'); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! assert (eigs(A,k,4.1), eigs(A,speye(n),k,4.1), 1e-11); -%!testif HAVE_ARPACK +%!test %! opts.cholB=true; %! d1 = eigs(A, speye(n), k, 'lm', opts); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! opts.cholB=true; %! q = [2:n,1]; %! opts.permB=q; %! d1 = eigs(A, speye(n)(q,q), k, 'lm', opts); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! opts.cholB=true; %! d1 = eigs(A, speye(n), k, 4.1, opts); %! assert (abs(d1), eigs(A,k,4.1), 1e-11); -%!testif HAVE_ARPACK +%!test %! opts.cholB=true; %! q = [2:n,1]; %! opts.permB=q; %! d1 = eigs(A, speye(n)(q,q), k, 4.1, opts); %! assert (abs(d1), eigs(A,k,4.1), 1e-11); -%!testif HAVE_ARPACK +%!test %! assert (eigs(A,k,4.1), eigs(A,speye(n),k,4.1), 1e-11); -%!testif HAVE_ARPACK +%!test %! fn = @(x) A * x; %! opts.issym = 1; opts.isreal = 1; %! d1 = eigs (fn, n, k, 'lm', opts); %! assert (d1, d0(end:-1:(end-k+1)), 1e-11); -%!testif HAVE_ARPACK +%!test %! fn = @(x) A \ x; %! opts.issym = 1; opts.isreal = 1; %! d1 = eigs (fn, n, k, 'sm', opts); %! assert (d1, d0(k:-1:1), 1e-11); -%!testif HAVE_ARPACK +%!test %! fn = @(x) (A - 4.1 * eye(n)) \ x; %! opts.issym = 1; opts.isreal = 1; %! d1 = eigs (fn, n, k, 4.1, opts); %! assert (d1, eigs(A,k,4.1), 1e-11); -%!testif HAVE_ARPACK +%!test %! AA = speye (10); %! fn = @(x) AA * x; %! opts.issym = 1; opts.isreal = 1; %! assert (eigs (fn, 10, AA, 3, 'lm', opts), [1; 1; 1],10*eps); -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'lm'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*speye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'sm'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*speye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'la'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*speye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'sa'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*speye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'be'); %! d1 = diag(d1); %! for i=1:k @@ -891,117 +888,117 @@ %! [~, idx] = sort (abs(d0)); %! d0 = d0(idx); %! rand("state", 42); % initialize generator to make eigs behavior reproducible -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A,k+1); %! assert (abs(d1), abs(d0(end:-1:(end-k))),1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'lm'); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'sm'); %! assert (abs(d1), abs(d0(1:k)), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'lr'); %! [~, idx] = sort (real(d0)); %! d2 = d0(idx); %! assert (real(d1), real(d2(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'sr'); %! [~, idx] = sort (real(abs(d0))); %! d2 = d0(idx); %! assert (real(d1), real(d2(1:k)), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'li'); %! [~, idx] = sort (imag(abs(d0))); %! d2 = d0(idx); %! assert (sort(imag(d1)), sort(imag(d2(end:-1:(end-k+1)))), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'si'); %! [~, idx] = sort (imag(abs(d0))); %! d2 = d0(idx); %! assert (sort(imag(d1)), sort(imag(d2(1:k))), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 4.1); %! [~,idx0] = sort (abs(d0 - 4.1)); %! [~,idx1] = sort (abs(d1 - 4.1)); %! assert (abs(d1(idx1)), abs(d0(idx0(1:k))), 1e-11); %! assert (sort(imag(d1(idx1))), sort(imag(d0(idx0(1:k)))), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs(A, speye(n), k, 'lm'); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! opts.cholB=true; %! d1 = eigs(A, speye(n), k, 'lm', opts); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! opts.cholB=true; %! q = [2:n,1]; %! opts.permB=q; %! d1 = eigs(A, speye(n)(q,q), k, 'lm', opts); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! opts.cholB=true; %! d1 = eigs(A, speye(n), k, 4.1, opts); %! assert (abs(d1), eigs(A,k,4.1), 1e-11); -%!testif HAVE_ARPACK +%!test %! opts.cholB=true; %! q = [2:n,1]; %! opts.permB=q; %! d1 = eigs(A, speye(n)(q,q), k, 4.1, opts); %! assert (abs(d1), eigs(A,k,4.1), 1e-11); -%!testif HAVE_ARPACK +%!test %! assert (abs(eigs(A,k,4.1)), abs(eigs(A,speye(n),k,4.1)), 1e-11); -%!testif HAVE_ARPACK +%!test %! assert (sort(imag(eigs(A,k,4.1))), sort(imag(eigs(A,speye(n),k,4.1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! fn = @(x) A * x; %! opts.issym = 0; opts.isreal = 1; %! d1 = eigs (fn, n, k, 'lm', opts); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! fn = @(x) A \ x; %! opts.issym = 0; opts.isreal = 1; %! d1 = eigs (fn, n, k, 'sm', opts); %! assert (abs(d1), d0(1:k), 1e-11); -%!testif HAVE_ARPACK +%!test %! fn = @(x) (A - 4.1 * eye(n)) \ x; %! opts.issym = 0; opts.isreal = 1; %! d1 = eigs (fn, n, k, 4.1, opts); %! assert (abs(d1), eigs(A,k,4.1), 1e-11); -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'lm'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*speye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'sm'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*speye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'lr'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*speye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'sr'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*speye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'li'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*speye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'si'); %! d1 = diag(d1); %! for i=1:k @@ -1021,119 +1018,119 @@ %! [~, idx] = sort (abs(d0)); %! d0 = d0(idx); %! rand("state", 42); % initialize generator to make eigs behavior reproducible -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A,k+1); %! assert (abs(d1), abs(d0(end:-1:(end-k))),1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'lm'); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'sm'); %! assert (abs(d1), abs(d0(1:k)), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'lr'); %! [~, idx] = sort (real(abs(d0))); %! d2 = d0(idx); %! assert (real(d1), real(d2(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'sr'); %! [~, idx] = sort (real(abs(d0))); %! d2 = d0(idx); %! assert (real(d1), real(d2(1:k)), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'li'); %! [~, idx] = sort (imag(abs(d0))); %! d2 = d0(idx); %! assert (sort(imag(d1)), sort(imag(d2(end:-1:(end-k+1)))), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'si'); %! [~, idx] = sort (imag(abs(d0))); %! d2 = d0(idx); %! assert (sort(imag(d1)), sort(imag(d2(1:k))), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 4.1); %! [~,idx0] = sort (abs(d0 - 4.1)); %! [~,idx1] = sort (abs(d1 - 4.1)); %! assert (abs(d1(idx1)), abs(d0(idx0(1:k))), 1e-11); %! assert (sort(imag(d1(idx1))), sort(imag(d0(idx0(1:k)))), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs(A, speye(n), k, 'lm'); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! opts.cholB=true; %! d1 = eigs(A, speye(n), k, 'lm', opts); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! opts.cholB=true; %! q = [2:n,1]; %! opts.permB=q; %! d1 = eigs(A, speye(n)(q,q), k, 'lm', opts); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! opts.cholB=true; %! d1 = eigs(A, speye(n), k, 4.1, opts); %! assert (abs(abs(d1)), abs(eigs(A,k,4.1)), 1e-11); %! assert (sort(imag(abs(d1))), sort(imag(eigs(A,k,4.1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! opts.cholB=true; %! q = [2:n,1]; %! opts.permB=q; %! d1 = eigs(A, speye(n)(q,q), k, 4.1, opts); %! assert (abs(abs(d1)), abs(eigs(A,k,4.1)), 1e-11); %! assert (sort(imag(abs(d1))), sort(imag(eigs(A,k,4.1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! assert (abs(eigs(A,k,4.1)), abs(eigs(A,speye(n),k,4.1)), 1e-11); -%!testif HAVE_ARPACK +%!test %! assert (sort(imag(eigs(A,k,4.1))), sort(imag(eigs(A,speye(n),k,4.1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! fn = @(x) A * x; %! opts.issym = 0; opts.isreal = 0; %! d1 = eigs (fn, n, k, 'lm', opts); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! fn = @(x) A \ x; %! opts.issym = 0; opts.isreal = 0; %! d1 = eigs (fn, n, k, 'sm', opts); %! assert (abs(d1), d0(1:k), 1e-11); -%!testif HAVE_ARPACK +%!test %! fn = @(x) (A - 4.1 * eye(n)) \ x; %! opts.issym = 0; opts.isreal = 0; %! d1 = eigs (fn, n, k, 4.1, opts); %! assert (abs(d1), eigs(A,k,4.1), 1e-11); -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'lm'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*speye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'sm'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*speye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'lr'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*speye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'sr'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*speye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'li'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*speye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'si'); %! d1 = diag(d1); %! for i=1:k @@ -1156,102 +1153,102 @@ %! [~, idx] = sort (abs(d0)); %! d0 = d0(idx); %! rand("state", 42); % initialize generator to make eigs behavior reproducible -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k); %! assert (d1, d0(end:-1:(end-k+1)), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A,k+1); %! assert (d1, d0(end:-1:(end-k)),1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'lm'); %! assert (d1, d0(end:-1:(end-k+1)), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'sm'); %! assert (d1, d0(k:-1:1), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'la'); %! assert (d1, d2(end:-1:(end-k+1)), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'sa'); %! assert (d1, d2(1:k), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'be'); %! assert (d1, d2([1:floor(k/2), (end - ceil(k/2) + 1):end]), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k+1, 'be'); %! assert (d1, d2([1:floor((k+1)/2), (end - ceil((k+1)/2) + 1):end]), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 4.1); %! [~,idx0] = sort (abs(d0 - 4.1)); %! [~,idx1] = sort (abs(d1 - 4.1)); %! assert (d1(idx1), d0(idx0(1:k)), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs(A, eye(n), k, 'lm'); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! assert (eigs(A,k,4.1), eigs(A,eye(n),k,4.1), 1e-11); -%!testif HAVE_ARPACK +%!test %! opts.cholB=true; %! d1 = eigs(A, eye(n), k, 'lm', opts); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! opts.cholB=true; %! q = [2:n,1]; %! opts.permB=q; %! d1 = eigs(A, eye(n)(q,q), k, 'lm', opts); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! opts.cholB=true; %! d1 = eigs(A, eye(n), k, 4.1, opts); %! assert (abs(d1), eigs(A,k,4.1), 1e-11); -%!testif HAVE_ARPACK +%!test %! opts.cholB=true; %! q = [2:n,1]; %! opts.permB=q; %! d1 = eigs(A, eye(n)(q,q), k, 4.1, opts); %! assert (abs(d1), eigs(A,k,4.1), 1e-11); -%!testif HAVE_ARPACK +%!test %! assert (eigs(A,k,4.1), eigs(A,eye(n),k,4.1), 1e-11); -%!testif HAVE_ARPACK +%!test %! fn = @(x) A * x; %! opts.issym = 1; opts.isreal = 1; %! d1 = eigs (fn, n, k, 'lm', opts); %! assert (d1, d0(end:-1:(end-k+1)), 1e-11); -%!testif HAVE_ARPACK +%!test %! fn = @(x) A \ x; %! opts.issym = 1; opts.isreal = 1; %! d1 = eigs (fn, n, k, 'sm', opts); %! assert (d1, d0(k:-1:1), 1e-11); -%!testif HAVE_ARPACK +%!test %! fn = @(x) (A - 4.1 * eye(n)) \ x; %! opts.issym = 1; opts.isreal = 1; %! d1 = eigs (fn, n, k, 4.1, opts); %! assert (d1, eigs(A,k,4.1), 1e-11); -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'lm'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*eye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'sm'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*eye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'la'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*eye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'sa'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*eye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'be'); %! d1 = diag(d1); %! for i=1:k @@ -1271,117 +1268,117 @@ %! [~, idx] = sort (abs(d0)); %! d0 = d0(idx); %! rand("state", 42); % initialize generator to make eigs behavior reproducible -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A,k+1); %! assert (abs(d1), abs(d0(end:-1:(end-k))),1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'lm'); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'sm'); %! assert (abs(d1), abs(d0(1:k)), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'lr'); %! [~, idx] = sort (real(d0)); %! d2 = d0(idx); %! assert (real(d1), real(d2(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'sr'); %! [~, idx] = sort (real(abs(d0))); %! d2 = d0(idx); %! assert (real(d1), real(d2(1:k)), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'li'); %! [~, idx] = sort (imag(abs(d0))); %! d2 = d0(idx); %! assert (sort(imag(d1)), sort(imag(d2(end:-1:(end-k+1)))), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'si'); %! [~, idx] = sort (imag(abs(d0))); %! d2 = d0(idx); %! assert (sort(imag(d1)), sort(imag(d2(1:k))), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 4.1); %! [~,idx0] = sort (abs(d0 - 4.1)); %! [~,idx1] = sort (abs(d1 - 4.1)); %! assert (abs(d1(idx1)), abs(d0(idx0(1:k))), 1e-11); %! assert (sort(imag(d1(idx1))), sort(imag(d0(idx0(1:k)))), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs(A, eye(n), k, 'lm'); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! opts.cholB=true; %! d1 = eigs(A, eye(n), k, 'lm', opts); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! opts.cholB=true; %! q = [2:n,1]; %! opts.permB=q; %! d1 = eigs(A, eye(n)(q,q), k, 'lm', opts); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! opts.cholB=true; %! d1 = eigs(A, eye(n), k, 4.1, opts); %! assert (abs(d1), eigs(A,k,4.1), 1e-11); -%!testif HAVE_ARPACK +%!test %! opts.cholB=true; %! q = [2:n,1]; %! opts.permB=q; %! d1 = eigs(A, eye(n)(q,q), k, 4.1, opts); %! assert (abs(d1), eigs(A,k,4.1), 1e-11); -%!testif HAVE_ARPACK +%!test %! assert (abs(eigs(A,k,4.1)), abs(eigs(A,eye(n),k,4.1)), 1e-11); -%!testif HAVE_ARPACK +%!test %! assert (sort(imag(eigs(A,k,4.1))), sort(imag(eigs(A,eye(n),k,4.1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! fn = @(x) A * x; %! opts.issym = 0; opts.isreal = 1; %! d1 = eigs (fn, n, k, 'lm', opts); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! fn = @(x) A \ x; %! opts.issym = 0; opts.isreal = 1; %! d1 = eigs (fn, n, k, 'sm', opts); %! assert (abs(d1), d0(1:k), 1e-11); -%!testif HAVE_ARPACK +%!test %! fn = @(x) (A - 4.1 * eye(n)) \ x; %! opts.issym = 0; opts.isreal = 1; %! d1 = eigs (fn, n, k, 4.1, opts); %! assert (abs(d1), eigs(A,k,4.1), 1e-11); -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'lm'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*eye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'sm'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*eye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'lr'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*eye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'sr'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*eye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'li'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*eye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'si'); %! d1 = diag(d1); %! for i=1:k @@ -1401,119 +1398,119 @@ %! [~, idx] = sort (abs(d0)); %! d0 = d0(idx); %! rand("state", 42); % initialize generator to make eigs behavior reproducible -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A,k+1); %! assert (abs(d1), abs(d0(end:-1:(end-k))),1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'lm'); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'sm'); %! assert (abs(d1), abs(d0(1:k)), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'lr'); %! [~, idx] = sort (real(abs(d0))); %! d2 = d0(idx); %! assert (real(d1), real(d2(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'sr'); %! [~, idx] = sort (real(abs(d0))); %! d2 = d0(idx); %! assert (real(d1), real(d2(1:k)), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'li'); %! [~, idx] = sort (imag(abs(d0))); %! d2 = d0(idx); %! assert (sort(imag(d1)), sort(imag(d2(end:-1:(end-k+1)))), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 'si'); %! [~, idx] = sort (imag(abs(d0))); %! d2 = d0(idx); %! assert (sort(imag(d1)), sort(imag(d2(1:k))), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs (A, k, 4.1); %! [~,idx0] = sort (abs(d0 - 4.1)); %! [~,idx1] = sort (abs(d1 - 4.1)); %! assert (abs(d1(idx1)), abs(d0(idx0(1:k))), 1e-11); %! assert (sort(imag(d1(idx1))), sort(imag(d0(idx0(1:k)))), 1e-11); -%!testif HAVE_ARPACK +%!test %! d1 = eigs(A, eye(n), k, 'lm'); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! opts.cholB=true; %! d1 = eigs(A, eye(n), k, 'lm', opts); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! opts.cholB=true; %! q = [2:n,1]; %! opts.permB=q; %! d1 = eigs(A, eye(n)(q,q), k, 'lm', opts); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! opts.cholB=true; %! d1 = eigs(A, eye(n), k, 4.1, opts); %! assert (abs(abs(d1)), abs(eigs(A,k,4.1)), 1e-11); %! assert (sort(imag(abs(d1))), sort(imag(eigs(A,k,4.1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! opts.cholB=true; %! q = [2:n,1]; %! opts.permB=q; %! d1 = eigs(A, eye(n)(q,q), k, 4.1, opts); %! assert (abs(abs(d1)), abs(eigs(A,k,4.1)), 1e-11); %! assert (sort(imag(abs(d1))), sort(imag(eigs(A,k,4.1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! assert (abs(eigs(A,k,4.1)), abs(eigs(A,eye(n),k,4.1)), 1e-11); -%!testif HAVE_ARPACK +%!test %! assert (sort(imag(eigs(A,k,4.1))), sort(imag(eigs(A,eye(n),k,4.1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! fn = @(x) A * x; %! opts.issym = 0; opts.isreal = 0; %! d1 = eigs (fn, n, k, 'lm', opts); %! assert (abs(d1), abs(d0(end:-1:(end-k+1))), 1e-11); -%!testif HAVE_ARPACK +%!test %! fn = @(x) A \ x; %! opts.issym = 0; opts.isreal = 0; %! d1 = eigs (fn, n, k, 'sm', opts); %! assert (abs(d1), d0(1:k), 1e-11); -%!testif HAVE_ARPACK +%!test %! fn = @(x) (A - 4.1 * eye(n)) \ x; %! opts.issym = 0; opts.isreal = 0; %! d1 = eigs (fn, n, k, 4.1, opts); %! assert (abs(d1), eigs(A,k,4.1), 1e-11); -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'lm'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*eye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'sm'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*eye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'lr'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*eye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'sr'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*eye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'li'); %! d1 = diag(d1); %! for i=1:k %! assert(max(abs((A - d1(i)*eye(n))*v1(:,i))),0.,1e-11) %! endfor -%!testif HAVE_ARPACK +%!test %! [v1,d1] = eigs(A, k, 'si'); %! d1 = diag(d1); %! for i=1:k diff -r 9f5d2ef078e8 -r 35c55d1241c7 src/oct-conf.h.in --- a/src/oct-conf.h.in Fri Jan 28 14:04:33 2011 -0500 +++ b/src/oct-conf.h.in Fri Jan 28 14:05:09 2011 -0500 @@ -60,18 +60,6 @@ #define OCTAVE_CONF_AR %OCTAVE_CONF_AR% #endif -#ifndef OCTAVE_CONF_ARPACK_CPPFLAGS -#define OCTAVE_CONF_ARPACK_CPPFLAGS %OCTAVE_CONF_ARPACK_CPPFLAGS% -#endif - -#ifndef OCTAVE_CONF_ARPACK_LDFLAGS -#define OCTAVE_CONF_ARPACK_LDFLAGS %OCTAVE_CONF_ARPACK_LDFLAGS% -#endif - -#ifndef OCTAVE_CONF_ARPACK_LIBS -#define OCTAVE_CONF_ARPACK_LIBS %OCTAVE_CONF_ARPACK_LIBS% -#endif - #ifndef OCTAVE_CONF_BLAS_LIBS #define OCTAVE_CONF_BLAS_LIBS %OCTAVE_CONF_BLAS_LIBS% #endif diff -r 9f5d2ef078e8 -r 35c55d1241c7 src/toplev.cc --- a/src/toplev.cc Fri Jan 28 14:04:33 2011 -0500 +++ b/src/toplev.cc Fri Jan 28 14:05:09 2011 -0500 @@ -1206,9 +1206,6 @@ { false, "AMD_LIBS", OCTAVE_CONF_AMD_LIBS }, { false, "AR", OCTAVE_CONF_AR }, { false, "ARFLAGS", OCTAVE_CONF_ARFLAGS }, - { false, "ARPACK_CPPFLAGS", OCTAVE_CONF_ARPACK_CPPFLAGS }, - { false, "ARPACK_LDFLAGS", OCTAVE_CONF_ARPACK_LDFLAGS }, - { false, "ARPACK_LIBS", OCTAVE_CONF_ARPACK_LIBS }, { false, "BLAS_LIBS", OCTAVE_CONF_BLAS_LIBS }, { false, "CARBON_LIBS", OCTAVE_CONF_CARBON_LIBS }, { false, "CAMD_CPPFLAGS", OCTAVE_CONF_CAMD_CPPFLAGS },