This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: GSL 0.9 and Tru64 Unix
- To: Olaf Lenz <olenz at TechFak dot Uni-Bielefeld dot DE>
- Subject: Re: GSL 0.9 and Tru64 Unix
- From: Brian Gough <bjg at network-theory dot co dot uk>
- Date: Fri, 6 Jul 2001 21:11:56 +0100 (BST)
- Cc: gsl-discuss at sources dot redhat dot com
- References: <20010706175234.D23159@metropolitan.TechFak.Uni-Bielefeld.DE>
Olaf Lenz writes:
> Hello!
>
> I'm working with the GSL on Tru64 Unix on a Compaq Alpha Workstation.
> The compilation and installation of GSL 0.9 works smooth and fine, so
> I suppose it can be added on the list of "Supported platforms".
Ok, will do.
> The only problem I have is that some tests in the Eigensystem part
> fail in make check. The output of running 'make check' in the 'eigen'
> directory of the sources is attached to this mail.
>
> This may or may not be a platform specific problem, right now I can't
> verify it. Any suggestions?
Thanks for the bug report. The code works ok with gcc/x86 but I have
not tested it beyond that. Can you send me the results of the
following program, compiled with
gcc tmp.c -lgsl -lgslcblas -lm
this will give a dump of the raw eigenvalues/eigenvectors
#include <stdlib.h>
#include <stdio.h>
#include <gsl/gsl_test.h>
#include <gsl/gsl_math.h>
#include <gsl/gsl_blas.h>
#include <gsl/gsl_ieee_utils.h>
#include <gsl/gsl_complex_math.h>
#include <gsl/gsl_eigen.h>
gsl_matrix_complex *
create_random_herm_matrix(int size)
{
int i, j;
unsigned long k = 1;
gsl_matrix_complex * m = gsl_matrix_complex_alloc(size, size);
for(i=0; i<size; i++) {
for(j=i; j<size; j++) {
gsl_complex z;
k = (69069 * k + 1) & 0xffffffffUL;
GSL_REAL(z) = k / 4294967296.0;
k = (69069 * k + 1) & 0xffffffffUL;
GSL_IMAG(z) = (i == j) ? 0 : k / 4294967296.0;
gsl_matrix_complex_set(m, i, j, z);
gsl_matrix_complex_set(m, j, i, gsl_complex_conjugate(z));
}
}
return m;
}
#define N 10
int main()
{
gsl_matrix_complex *m = create_random_herm_matrix (N);
gsl_matrix_complex * A = gsl_matrix_complex_alloc(N, N);
gsl_matrix_complex * evec = gsl_matrix_complex_alloc(N, N);
gsl_vector * eval = gsl_vector_alloc(N);
gsl_vector * eval2 = gsl_vector_alloc(N);
gsl_eigen_herm_workspace * w1 = gsl_eigen_herm_alloc (N);
gsl_eigen_hermv_workspace * w2 = gsl_eigen_hermv_alloc (N);
printf("m = [\n");
gsl_matrix_complex_fprintf(stdout, m, "%.18e");
printf("]\n");
gsl_matrix_complex_memcpy(A, m);
gsl_eigen_herm(A, eval2, w1);
printf("eval2 = [\n");
gsl_vector_fprintf(stdout, eval2, "%.18e");
printf("]\n");
gsl_matrix_complex_memcpy(A, m);
gsl_eigen_hermv(A, eval, evec, w2);
printf("eval = [\n");
gsl_vector_fprintf(stdout, eval, "%.18e");
printf("]\n");
printf("evec = [\n");
gsl_matrix_complex_fprintf(stdout, evec, "%.18e");
printf("]\n");
}