This is the mail archive of the gsl-discuss@sourceware.cygnus.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Bug: Compiling broken on Linux/PPC


Support for PPC Linux and the relevant parts of the error log would be
very useful.  A separate file for fp-ppclinux.c is optimal.

The FAILs will be due to different rounding errors on that
architecture.  The fp-*.c files don't affect the test results, they
only come into operation if the GSL_IEEE_MODE environment variable has
been set.

We send things to the list if they are short. Otherwise deposit the
file somewhere and send the url.

John Fisher writes:
 > Hi folks.  This is my first post here.
 > 
 > GSL 0.6 does not build on my PowerPC machine running Linux (LinuxPPC
 > 2000, though I imagine this problem would occur on all PPC
 > distributions).  GCC 2.95.2 and glibc-2.1.3-4a.
 > 
 > The bug is in ieee-utils/fp-linux.c .  The configure script doesn't
 > distinguish between Linux/PPC and Linux/x86; in assuming the latter it
 > uses the macros '_FPU_SINGLE', '_FPU_DOUBLE', '_FPU_EXTENDED',
 > '_FPU_MASK_DM' and '_FPU_MASK_PM' which are in the x86
 > /usr/include/fpu_control.h but not in the PowerPC counterpart.
 > 
 > I have a patch for the configure script to check for ppc machines, and a
 > patch to ieee-utils/fp-linux.c to use the new information and preprocess
 > out the unavailable macros.  With the changes applied there were no
 > errors in building.
 > 
 > I have a log of 'make -k check', where seven subtests subsequently
 > fail.  All seven failures are due to errors in precision which may have
 > been caused by the changes to fp-linux.c; I don't know how to verify
 > this, or of a workaround, given that the necessary macros are not part
 > of the PPC fpu_control.h.  Here's one error, which is pretty much
 > representative of them all (both in magnitude and location -- 3 others
 > are also in the gsl_sf_hyperg_* family):
 > 
 > 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
 > 
 > I don't know if this is an acceptable result.  Assuming it is, I'm not
 > sure if the second patch is particularly elegant.  If it's preferred, I
 > could make a new file -- say ieee-utils/fp-ppclinux.c -- to be used
 > instead of the patch on fp-linux.c.  If the accuracy is not acceptable,
 > I can look into it more -- I'd love to see this all working on my ppc
 > box!
 > 
 > Oh, what's protocol for this list?  Should I just submit patches and
 > such here?
 > 
 > John
 > 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]