This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: problems with gsl_linalg_SV_decomp
- From: Brian Gough <bjg at network-theory dot co dot uk>
- To: David Clifford <clifford at galton dot uchicago dot edu>
- Cc: gsl-discuss at sources dot redhat dot com
- Date: Fri, 26 Apr 2002 22:00:10 +0100 (BST)
- Subject: Re: problems with gsl_linalg_SV_decomp
- References: <15560.21614.168919.828309@debian><Pine.LNX.4.44.0204251818280.13921-500000@rawls.uchicago.edu>
David Clifford writes:
>
> I compiled the program using a make file with the lines
>
> svd: svd.c
> g++ -g -o svd svd.c -lgsl -lgslcblas
>
> I am running the program on red hat linux release 7.2 (enigma)
Hi,
The gcc 2.96-98 compiler on redhat 7.2 has known problems with
optimisation. These should show up as "make check" failures on
installation. If you use another version of gcc it should work ok
(see below). If you installed from precompiled rpms let us know.
See http://sources.redhat.com/ml/gsl-discuss/2002-q2/msg00108.html
for more information
regards
Brian Gough
bjg|debian> g++ -Wall -g svd.c -lgsl -lgslcblas -lm
# gsl was compiled with gcc-2.7.2.3
bjg|debian> ./a.out
our matrix is
2.000000 2.000000 0.000000
0.000000 0.000000 0.000000
0.000000 0.000000 5.000000
defining variables for svd...
getting the svd of the matrix...
finished singular value decomposition
U is
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
1.000000 0.000000 0.000000
V is
0.000000 0.707107 -0.707107
0.000000 0.707107 0.707107
1.000000 0.000000 0.000000
s is
5.000000 2.828427 0.000000