PPC Linux Bugs, and a perplexing problem
F J Franklin
MEP95JFF@sheffield.ac.uk
Fri Aug 25 03:34:00 GMT 2000
Discovered GSL only this week, and must say I'm *very* impressed! However...
> Until we have set up a separate bug reporting address, please report
> bugs to the GSL discussion list gsl-discuss@sourceware.cygnus.com
Compiled & checked happily enough on my (x86) desktop, but not on my (G3)
laptop. (This is the first time I've ever submitted a bug report, so please
forgive me if I have got the format all wrong.)
Has anyone succeeded in compiling & checking GSL-0.6 for PPC Linux?
Frank
Francis James Franklin
fjf@alinameridon.com
Diodorus the professor of logic died of shame because he could not at once
solve a problem put to him in jest by Stilpo.
--- Pliny the Elder
=============================== Bugs ===============================
(1) `make' Error
(2) `make check' Errors
(3) Puzzling PPC Problem
GSL 0.6
LinuxPPC 2000 on Apple iBook SE
kernel: linux-2.2.17pre13-ben1
compiler: gcc-2.95.2
libc & libm: glibc-2.1.3
(1) `make' Error
============
Neither of the following options is (or can be) set in config.h
/* #undef HAVE_M68KLINUX_IEEE_INTERFACE */
/* #define HAVE_LINUX_IEEE_INTERFACE 1 */
FYI:
In /usr/include/fpu_control.h:
_FPU_SINGLE,_FPU_DOUBLE,_FPU_EXTENDED *Not* defined
_FPU_RC_NEAREST,_FPU_RC_DOWN,_FPU_RC_UP,_FPU_RC_ZERO Defined
_FPU_MASK_IM,_FPU_MASK_ZM,_FPU_MASK_OM,_FPU_MASK_UM Defined
_FPU_MASK_DM *Not* defined
_FPU_MASK_PM *Not* defined
However, defined in /usr/include/fpu_control.h is (cf. _FPU_MASK_PM ?)
/* masking of interrupts */
#define _FPU_MASK_XM 0x08 /* inexact */
(2) `make check' Errors
===================
(a) BLAS
====
Segmentation fault!
Source: In `int test_gbmv(void)' in `gsl-0.6/blas/test_blas_raw.c'
gsl_blas_raw_dcopy(4, vector_4_d, 1, tmp_d, 1);
gsl_blas_raw_dgbmv(CblasNoTrans, 4, 4, 1, 2, 2.0, matrix_gen_4_d, 4, vector_4_d, 1, 3.0, tmp_d, 1);
s = ( tmp_d[0] != -10.0 || tmp_d[1] != -5.0 || tmp_d[2] != 7.0 || tmp_d[3] != 9.0 );
gsl_test(s, "gsl_blas_raw_dgbmv A");
status += s;
gsl_blas_raw_dcopy(4, vector_4_d, 1, tmp_d, 1);
gsl_blas_raw_dgbmv(CblasNoTrans, 4, 4, 1, 2, 2.0, matrix_gen_4_d, 4, vector_4_z, 2, 3.0, tmp_d, 1);
s = ( tmp_d[0] != -10.0 || tmp_d[1] != -5.0 || tmp_d[2] != 7.0 || tmp_d[3] != 9.0 );
gsl_test(s, "gsl_blas_raw_dgbmv B");
status += s;
Commenting these out `removes' the problem... (more on this later; see below)
(b) MONTE [This is listed in KNOWN-PROBLEMS, I see...]
=====
Testing double gaussian
FAIL: vegas(f2), dim=9, err=0.0003, chisq=0.6418 (0.499681001846611517 observed vs 1 expected)
FAIL: vegas_test
*** Rather suspicious factor of 2 here! (to state the obvious)
(c) SPECFUNC
========
FAIL: gsl_sf_hyperg_1F1_int_impl(100, 400, 100.0, &r)
test_hyperg.c 73
expected: 907123037681.855
obtained: 907123037681.8558 0.04068719885713332 4.4853e-14
fracdiff: 4.709902361666654e-16
value not within tolerance of expected value
907123037681.855835 0.0406871988571333165
FAIL: gsl_sf_hyperg_U_int_impl(-90, 1, 10, &r)
test_hyperg.c 323
expected: -1.898767714922189e+139
obtained: -1.898767714922192e+139 1.543096725201747e+126 8.12683e-14
fracdiff: 6.962999882451004e-16
value not within tolerance of expected value
-1.8987677149221916e+139 1.54309672520174719e+126
FAIL: gsl_sf_hyperg_U_int_impl(-90, 10, 10, &r)
test_hyperg.c 324
expected: -5.682999988842067e+143
obtained: -5.682999988842072e+143 4.618478923559706e+130 8.12683e-14
fracdiff: 4.573953621928294e-16
value not within tolerance of expected value
-5.68299998884207181e+143 4.61847892355970615e+130
FAIL: gsl_sf_hyperg_U_impl(1, 1.2, 2.0, &r)
test_hyperg.c 360
expected: 0.3835044780075603
obtained: 0.3835044780075599 9.696010384367307e-16 2.52827e-15
fracdiff: 5.066147605858526e-16
value not within tolerance of expected value
0.383504478007559879 9.69601038436730741e-16
FAIL: gsl_sf_hyperg_U_impl(-50.5, 100.1, 40, &r)
test_hyperg.c 387
expected: 5.937463786613894e+91
obtained: 5.937463786613886e+91 8.703956648586891e+79 1.46594e-12
fracdiff: 6.703793421875711e-16
value not within tolerance of expected value
5.93746378661388571e+91 8.70395664858689101e+79
FAIL: gsl_sf_hyperg_2F1_conj_impl(25, 25, 1, -0.5, &r)
test_hyperg.c 424
expected: 5.16969440956632e-06
obtained: 5.169694409691514e-06 5.713800742253134e-17 1.10525e-11
fracdiff: 1.210837176728465e-11
value/expected not consistent within reported error
5.16969440969151365e-06 5.71380074225313361e-17
FAIL: gsl_sf_hyperg_2F1_conj_renorm_impl(9, 9, -1.5, -0.99, &r)
test_hyperg.c 454
expected: 0.1083402022947613
obtained: 0.1083402022947615 4.247728659543883e-13 3.92073e-12
fracdiff: 1.152850812762138e-15
value not within tolerance of expected value
0.108340202294761503 4.24772865954388333e-13
FAIL: Hypergeometric Functions
FAIL: gsl_sf_laguerre_n_impl(90, 2.0, 100.0, &r)
test_sf.c 873
expected: -2.092904225954693e+20
obtained: -2.09290422595469e+20 50333025.30505015 2.40494e-13
fracdiff: 7.82835630833816e-16
value not within tolerance of expected value
-2.09290422595468952e+20 50333025.3050501496
FAIL: Laguerre Polynomials
FAIL: gsl_sf_synchrotron_2_impl(0.01, &r)
test_sf.c 1083
3
obtained: 0.1083402022947615 4.247728659543883e-13 3.92073e-12
fracdiff: 1.152850812762138e-15
value not within tolerance of expected value
expected: 0.2309807734222628
obtained: 0.2309807734222623 1.877351636458429e-16 8.12774e-16
fracdiff: 9.613120678191913e-16
value/expected not consistent within reported error
0.230980773422262337 1.87735163645842852e-16
FAIL: Synchrotron Functions
(3) Puzzling PPC Problem
====================
GSL-0.6 compiles and checks for x86-Linux, but not for iBook Linux. As far as
I can tell, the code itself is not at fault, but I have isolated the problem
in the following extract-example program. The output is given below; note how
args 12 & 13 get messed up.
Can anybody tell me what, if anything, may be wrong with the following code?
(The program behaves as expected when compiled on my x86, so the problem is
probably PPC-specific.)
Interestingly, the problem vanishes if every instance of `double' is replaced
by `float'...
=============================== test.c ===============================
#include <stdio.h>
typedef enum CBLAS_TRANSPOSE
{ CblasNoTrans = 111,
CblasTrans = 112,
CblasConjTrans = 113
} CBLAS_TRANSPOSE_t;
const double vector_4_d[] = { -2.0, -1.0, 0.0, 3.0 };
const double matrix_gen_4_d[] =
{
1.0, 0.0, -2.0, 1.0,
0.5, 3.0, 5.0, 1.0,
2.0, -2.0, -1.0, 0.5,
1.0, -1.0, 0.5, 0.0
};
void dgbmv (CBLAS_TRANSPOSE_t TransA,
size_t M, size_t N, size_t KL, size_t KU,
double alpha,
const double A[], int lda,
const double X[], size_t incX,
double beta,
double Y[], size_t incY)
{
fprintf (stderr,"dgbmv: TransA = %d\n", (int) TransA);
fprintf (stderr,"dgbmv: M = %d\n", (int) M);
fprintf (stderr,"dgbmv: N = %d\n", (int) N);
fprintf (stderr,"dgbmv: KL = %d\n", (int) KL);
fprintf (stderr,"dgbmv: KU = %d\n", (int) KU);
fprintf (stderr,"dgbmv: alpha = %lf\n",alpha);
fprintf (stderr,"dgbmv: A = %p\n", A);
fprintf (stderr,"dgbmv: lda = %d\n", lda);
fprintf (stderr,"dgbmv: X = %p\n", X);
fprintf (stderr,"dgbmv: incX = %d\n", (int) incX);
fprintf (stderr,"dgbmv: beta = %lf\n",beta);
fprintf (stderr,"dgbmv: Y = %p\n", Y);
fprintf (stderr,"dgbmv: incY = %d\n", (int) incY);
}
int main()
{
double tmp_d[32];
fprintf (stderr,"dgbmv: tmp_d = %p\n",tmp_d);
fprintf (stderr,"dgbmv: vector_4_d = %p\n",vector_4_d);
fprintf (stderr,"dgbmv: matrix_gen_4_d = %p\n",matrix_gen_4_d);
dgbmv(CblasNoTrans,4,4,1,2,2.0,matrix_gen_4_d,4,vector_4_d,1,3.0,tmp_d,1);
}
=============================== PPC output ===============================
dgbmv: tmp_d = 0x7ffffb18
dgbmv: vector_4_d = 0x10000730
dgbmv: matrix_gen_4_d = 0x10000750
dgbmv: TransA = 111
dgbmv: M = 4
dgbmv: N = 4
dgbmv: KL = 1
dgbmv: KU = 2
dgbmv: alpha = 2.000000
dgbmv: A = 0x10000750
dgbmv: lda = 4
dgbmv: X = 0x10000730
dgbmv: incX = 1
dgbmv: beta = 3.000000
dgbmv: Y = 0x1
dgbmv: incY = 805388944
=============================== x86 output ===============================
dgbmv: tmp_d = 0xbffffad8
dgbmv: vector_4_d = 0x8048668
dgbmv: matrix_gen_4_d = 0x8048688
dgbmv: TransA = 111
dgbmv: M = 4
dgbmv: N = 4
dgbmv: KL = 1
dgbmv: KU = 2
dgbmv: alpha = 2.000000
dgbmv: A = 0x8048688
dgbmv: lda = 4
dgbmv: X = 0x8048668
dgbmv: incX = 1
dgbmv: beta = 3.000000
dgbmv: Y = 0xbffffad8
dgbmv: incY = 1
More information about the Gsl-discuss
mailing list