|
From: | RUSS BRENNAN |
Subject: | RE: make check: src/DLD-FUNCTIONS/eigs.cc .............................. ** On entry to DLASCL parameter number 4 had an illegal value |
Date: | Tue, 31 Aug 2010 09:29:20 -0500 |
Ok, first let me note that compiling with --without-qrupdate bypasses this error, as expected. Here is the output of test qr.cc verbose. Note that there are a few errors, as well as the seg fault near the end. If I go through the final test line by line, this is the command that seg faults: [Q,R] = qrupdate(Q,R,single(uc),single(vc)) The singles() calls alone are ok so it must be qrupdate that does it. I am using qrupdate v1.1.1, built from source using the following Makeconf: ================================================================ # set this to your compiler's executable name (e.g. gfortran, g77) FC=gfortran # requested flags FFLAGS=-O0 -funroll-loops # set if you need shared library FPICFLAGS=-fPIC # BLAS library (only required for tests) BLAS=-L${MKLPATH} ${MKLPATH}/libmkl_solver.a -Wl,--start-group -lmkl_gf -lmkl_intel_thread -lmkl_core -Wl,--end-group -liomp5 -lpthread # LAPACK library (only required for tests) LAPACK=-lmkl_lapack # Library version VERSION=1.1 MAJOR=1 # The default library dir LIBDIR=lib # Destination installation offset DESTDIR= # set default prefix to /usr/local ifeq ($(strip $(PREFIX)),) PREFIX=/usr/local endif ================================================ I haven't tried other versions, is there a recommended version? Here's the test qr.cc verbose log. Thanks again for the assistance! octave:1> test qr.cc verbose >>>>> /home/adminuser/sources/OctaveDepsgcc4/octave-3.2.3/src/DLD-FUNCTIONS/qr.cc ***** test a = [0, 2, 1; 2, 1, 2]; [q, r] = qr (a); [qe, re] = qr (a, 0); assert (q * r, a, sqrt (eps)); assert (qe * re, a, sqrt (eps)); ***** test a = [0, 2, 1; 2, 1, 2]; [q, r, p] = qr (a); # not giving right dimensions. FIXME [qe, re, pe] = qr (a, 0); assert (q * r, a * p, sqrt (eps)); assert (qe * re, a(:, pe), sqrt (eps)); ***** test a = [0, 2; 2, 1; 1, 2]; [q, r] = qr (a); [qe, re] = qr (a, 0); assert (q * r, a, sqrt (eps)); assert (qe * re, a, sqrt (eps)); ***** test a = [0, 2; 2, 1; 1, 2]; [q, r, p] = qr (a); [qe, re, pe] = qr (a, 0); assert (q * r, a * p, sqrt (eps)); assert (qe * re, a(:, pe), sqrt (eps)); ***** error <Invalid call to qr.*> qr (); ***** error <Invalid call to qr.*> qr ([1, 2; 3, 4], 0, 2); ***** function retval = testqr (q, r, a, p) tol = 100*eps (class(q)); retval = 0; if (nargin == 3) n1 = norm (q*r-a); n2 = norm (q'*q-eye(columns(q))); retval = (n1 < tol && n2 < tol); else n1 = norm (q'*q-eye(columns(q))); retval = (n1 < tol); if (isvector (p)) n2 = norm (q*r-a(:,p)); retval = (retval && n2 < tol); else n2 = norm (q*r - a*p); retval = (retval && n2 < tol); endif endif ***** test t = ones (24, 1); j = 1; if false # eliminate big matrix tests a = rand(5000,20); [q,r]=qr(a,0); t(j++) = testqr(q,r,a); [q,r]=qr(a',0); t(j++) = testqr(q,r,a'); [q,r,p]=qr(a,0); t(j++) = testqr(q,r,a,p); [q,r,p]=qr(a',0); t(j++) = testqr(q,r,a',p); a = a+1i*eps; [q,r]=qr(a,0); t(j++) = testqr(q,r,a); [q,r]=qr(a',0); t(j++) = testqr(q,r,a'); [q,r,p]=qr(a,0); t(j++) = testqr(q,r,a,p); [q,r,p]=qr(a',0); t(j++) = testqr(q,r,a',p); endif a = [ ones(1,15); sqrt(eps)*eye(15) ]; [q,r]=qr(a); t(j++) = testqr(q,r,a); [q,r]=qr(a'); t(j++) = testqr(q,r,a'); [q,r,p]=qr(a); t(j++) = testqr(q,r,a,p); [q,r,p]=qr(a'); t(j++) = testqr(q,r,a',p); a = a+1i*eps; [q,r]=qr(a); t(j++) = testqr(q,r,a); [q,r]=qr(a'); t(j++) = testqr(q,r,a'); [q,r,p]=qr(a); t(j++) = testqr(q,r,a,p); [q,r,p]=qr(a'); t(j++) = testqr(q,r,a',p); a = [ ones(1,15); sqrt(eps)*eye(15) ]; [q,r]=qr(a,0); t(j++) = testqr(q,r,a); [q,r]=qr(a',0); t(j++) = testqr(q,r,a'); [q,r,p]=qr(a,0); t(j++) = testqr(q,r,a,p); [q,r,p]=qr(a',0); t(j++) = testqr(q,r,a',p); a = a+1i*eps; [q,r]=qr(a,0); t(j++) = testqr(q,r,a); [q,r]=qr(a',0); t(j++) = testqr(q,r,a'); [q,r,p]=qr(a,0); t(j++) = testqr(q,r,a,p); [q,r,p]=qr(a',0); t(j++) = testqr(q,r,a',p); a = [ 611 196 -192 407 -8 -52 -49 29 196 899 113 -192 -71 -43 -8 -44 -192 113 899 196 61 49 8 52 407 -192 196 611 8 44 59 -23 -8 -71 61 8 411 -599 208 208 -52 -43 49 44 -599 411 208 208 -49 -8 8 59 208 208 99 -911 29 -44 52 -23 208 208 -911 99 ]; [q,r] = qr(a); assert(all (t) && norm(q*r-a) < 5000*eps); ***** test a = single ([0, 2, 1; 2, 1, 2]); [q, r] = qr (a); [qe, re] = qr (a, 0); assert (q * r, a, sqrt (eps ('single'))); assert (qe * re, a, sqrt (eps ('single'))); ***** test a = single([0, 2, 1; 2, 1, 2]); [q, r, p] = qr (a); # not giving right dimensions. FIXME [qe, re, pe] = qr (a, 0); assert (q * r, a * p, sqrt (eps('single'))); assert (qe * re, a(:, pe), sqrt (eps('single'))); ***** test a = single([0, 2; 2, 1; 1, 2]); [q, r] = qr (a); [qe, re] = qr (a, 0); assert (q * r, a, sqrt (eps('single'))); assert (qe * re, a, sqrt (eps('single'))); ***** test a = single([0, 2; 2, 1; 1, 2]); [q, r, p] = qr (a); [qe, re, pe] = qr (a, 0); assert (q * r, a * p, sqrt (eps('single'))); assert (qe * re, a(:, pe), sqrt (eps('single'))); ***** error <Invalid call to qr.*> qr (); ***** error <Invalid call to qr.*> qr ([1, 2; 3, 4], 0, 2); ***** test t = ones (24, 1); j = 1; if false # eliminate big matrix tests a = rand(5000,20); [q,r]=qr(a,0); t(j++) = testqr(q,r,a); [q,r]=qr(a',0); t(j++) = testqr(q,r,a'); [q,r,p]=qr(a,0); t(j++) = testqr(q,r,a,p); [q,r,p]=qr(a',0); t(j++) = testqr(q,r,a',p); a = a+1i*eps('single'); [q,r]=qr(a,0); t(j++) = testqr(q,r,a); [q,r]=qr(a',0); t(j++) = testqr(q,r,a'); [q,r,p]=qr(a,0); t(j++) = testqr(q,r,a,p); [q,r,p]=qr(a',0); t(j++) = testqr(q,r,a',p); endif a = [ ones(1,15); sqrt(eps('single'))*eye(15) ]; [q,r]=qr(a); t(j++) = testqr(q,r,a); [q,r]=qr(a'); t(j++) = testqr(q,r,a'); [q,r,p]=qr(a); t(j++) = testqr(q,r,a,p); [q,r,p]=qr(a'); t(j++) = testqr(q,r,a',p); a = a+1i*eps('single'); [q,r]=qr(a); t(j++) = testqr(q,r,a); [q,r]=qr(a'); t(j++) = testqr(q,r,a'); [q,r,p]=qr(a); t(j++) = testqr(q,r,a,p); [q,r,p]=qr(a'); t(j++) = testqr(q,r,a',p); a = [ ones(1,15); sqrt(eps('single'))*eye(15) ]; [q,r]=qr(a,0); t(j++) = testqr(q,r,a); [q,r]=qr(a',0); t(j++) = testqr(q,r,a'); [q,r,p]=qr(a,0); t(j++) = testqr(q,r,a,p); [q,r,p]=qr(a',0); t(j++) = testqr(q,r,a',p); a = a+1i*eps('single'); [q,r]=qr(a,0); t(j++) = testqr(q,r,a); [q,r]=qr(a',0); t(j++) = testqr(q,r,a'); [q,r,p]=qr(a,0); t(j++) = testqr(q,r,a,p); [q,r,p]=qr(a',0); t(j++) = testqr(q,r,a',p); a = [ 611 196 -192 407 -8 -52 -49 29 196 899 113 -192 -71 -43 -8 -44 -192 113 899 196 61 49 8 52 407 -192 196 611 8 44 59 -23 -8 -71 61 8 411 -599 208 208 -52 -43 49 44 -599 411 208 208 -49 -8 8 59 208 208 99 -911 29 -44 52 -23 208 208 -911 99 ]; [q,r] = qr(a); assert(all (t) && norm(q*r-a) < 5000*eps('single')); ***** testif HAVE_CXSPARSE n = 20; d= 0.2; a = sprandn(n,n,d)+speye(n,n); r = qr(a); assert(r'*r,a'*a,1e-10) ***** testif HAVE_CXSPARSE n = 20; d= 0.2; a = sprandn(n,n,d)+speye(n,n); q = symamd(a); a = a(q,q); r = qr(a); assert(r'*r,a'*a,1e-10) ***** testif HAVE_CXSPARSE n = 20; d= 0.2; a = sprandn(n,n,d)+speye(n,n); [c,r] = qr(a,ones(n,1)); assert (r\c,full(a)\ones(n,1),10e-10) ***** testif HAVE_CXSPARSE n = 20; d= 0.2; a = sprandn(n,n,d)+speye(n,n); b = randn(n,2); [c,r] = qr(a,b); assert (r\c,full(a)\b,10e-10) ***** #testif HAVE_CXSPARSE n = 20; d= 0.2; a = sprandn(n,n+1,d)+speye(n,n+1); b = randn(n,2); [c,r] = qr(a,b); assert (r\c,full(a)\b,10e-10) ***** testif HAVE_CXSPARSE n = 20; d= 0.2; a = 1i*sprandn(n,n,d)+speye(n,n); r = qr(a); assert(r'*r,a'*a,1e-10) ***** testif HAVE_CXSPARSE n = 20; d= 0.2; a = 1i*sprandn(n,n,d)+speye(n,n); q = symamd(a); a = a(q,q); r = qr(a); assert(r'*r,a'*a,1e-10) ***** testif HAVE_CXSPARSE n = 20; d= 0.2; a = 1i*sprandn(n,n,d)+speye(n,n); [c,r] = qr(a,ones(n,1)); assert (r\c,full(a)\ones(n,1),10e-10) ***** testif HAVE_CXSPARSE n = 20; d= 0.2; a = 1i*sprandn(n,n,d)+speye(n,n); b = randn(n,2); [c,r] = qr(a,b); assert (r\c,full(a)\b,10e-10) ***** #testif HAVE_CXSPARSE n = 20; d= 0.2; a = 1i*sprandn(n,n+1,d)+speye(n,n+1); b = randn(n,2); [c,r] = qr(a,b); assert (r\c,full(a)\b,10e-10) ***** error qr(sprandn(10,10,0.2),ones(10,1)); ***** shared A, u, v, Ac, uc, vc A = [0.091364 0.613038 0.999083; 0.594638 0.425302 0.603537; 0.383594 0.291238 0.085574; 0.265712 0.268003 0.238409; 0.669966 0.743851 0.445057 ]; u = [0.85082; 0.76426; 0.42883; 0.53010; 0.80683 ]; v = [0.98810; 0.24295; 0.43167 ]; Ac = [0.620405 + 0.956953i 0.480013 + 0.048806i 0.402627 + 0.338171i; 0.589077 + 0.658457i 0.013205 + 0.279323i 0.229284 + 0.721929i; 0.092758 + 0.345687i 0.928679 + 0.241052i 0.764536 + 0.832406i; 0.912098 + 0.721024i 0.049018 + 0.269452i 0.730029 + 0.796517i; 0.112849 + 0.603871i 0.486352 + 0.142337i 0.355646 + 0.151496i ]; uc = [0.20351 + 0.05401i; 0.13141 + 0.43708i; 0.29808 + 0.08789i; 0.69821 + 0.38844i; 0.74871 + 0.25821i ]; vc = [0.85839 + 0.29468i; 0.20820 + 0.93090i; 0.86184 + 0.34689i ]; ***** test [Q,R] = qr(A); [Q,R] = qrupdate(Q,R,u,v); assert(norm(vec(Q'*Q - eye(5)),Inf) < 1e1*eps) assert(norm(vec(triu(R)-R),Inf) == 0) assert(norm(vec(Q*R - A - u*v'),Inf) < norm(A)*1e1*eps) ***** test [Q,R] = qr(Ac); [Q,R] = qrupdate(Q,R,uc,vc); assert(norm(vec(Q'*Q - eye(5)),Inf) < 1e1*eps) assert(norm(vec(triu(R)-R),Inf) == 0) assert(norm(vec(Q*R - Ac - uc*vc'),Inf) < norm(Ac)*1e1*eps) ***** test [Q,R] = qr(single(A)); [Q,R] = qrupdate(Q,R,single(u),single(v)); assert(norm(vec(Q'*Q - eye(5,'single')),Inf) < 1e1*eps('single')) assert(norm(vec(triu(R)-R),Inf) == 0) assert(norm(vec(Q*R - single(A) - single(u)*single(v)'),Inf) < norm(single(A))*1e1*eps('single')) ***** test [Q,R] = qr(single(Ac)); [Q,R] = qrupdate(Q,R,single(uc),single(vc)); assert(norm(vec(Q'*Q - eye(5,'single')),Inf) < 1e1*eps('single')) assert(norm(vec(triu(R)-R),Inf) == 0) assert(norm(vec(Q*R - single(Ac) - single(uc)*single(vc)'),Inf) < norm(single(Ac))*1e1*eps('single')) panic: Segmentation fault -- stopping myself... Segmentation fault > Date: Thu, 26 Aug 2010 21:31:23 +0200 > Subject: Re: make check: src/DLD-FUNCTIONS/eigs.cc .............................. ** On entry to DLASCL parameter number 4 had an illegal value > From: address@hidden > To: address@hidden > CC: address@hidden > > On Thu, Aug 26, 2010 at 6:30 PM, RUSS BRENNAN <address@hidden> wrote: > > I'm using the mkl libraries that come with intel compiler 11.1... I also > > have MKL 10.2 installed but I am not using those. I had to use -ff2c to > > get the compile to work, probably due to whatever gcc problems you were > > mentioning. > > > > I have set up ARPACK as follows: > > ARmake.inc: > > home = /path/to/ARPACK > > DIRS = $(UTILdir) $(SRCdir) > > ARPACKLIB = $(home)/libarpack.a > > LAPACKLIB = $MKLPATH/libmkl_lapack.a > > BLASLIB = $MKLPATH/libmkl_ia32.a > > FC=gfortran > > FFLAGS = -O0 > > MAKE = /usr/bin/make > > > > I guess the problem was that I hadn't converted to a shared lib. I did so > > using > > > > ar -x mylib.a > > gcc -shared *.o -o mylib.so > > > > And now the eigs.cc test passes! > > > > qr.cc is now failing, so I'm off to figre that one out... > > src/DLD-FUNCTIONS/qr.cc ................................panic: > > Segmentation fault -- stopping myself... > > > > How can I determine why these are failing? Is there a logfile somewhere? > > Thanks! > > > > Russell > > > > you can do: > > ./run-octave > octave:1> test qr.cc verbose > > > -- > RNDr. Jaroslav Hajek, PhD > computing expert & GNU Octave developer > Aeronautical Research and Test Institute (VZLU) > Prague, Czech Republic > url: www.highegg.matfyz.cz |
[Prev in Thread] | Current Thread | [Next in Thread] |