Gentoo Archives: gentoo-amd64

From: Frank Peters <frank.peters@×××××××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Possible Math Problem - Request For Verification
Date: Sat, 25 Jun 2011 17:45:03
Message-Id: 20110625134111.5c6b08dd.frank.peters@comcast.net
1 Hello,
2
3 Believe it or not, at the very beginning, Linux/GNU had some math problems.
4 In particular, it would do somewhat poorly on various floating point tests
5 that are available on-line. Because I do mathematical work on my machine,
6 I used to regularly evaluate my software using these tests.
7
8 However, for the past several years Linux/GNU has gotten nearly perfect
9 scores on these same tests and it seemed that glibc and/or gcc had finally
10 gotten the math code right. As a result of this, I stopped my regular
11 evaluations of the software.
12
13 Just recently I decided to run these tests again. I expected to see the
14 same nearly perfect scores but, to my surprise, a failure occurred in the
15 area of complex number operations. This may not be a very serious failure,
16 but it was not present during prior tests and thus it should not be present
17 now.
18
19 Possibly a fault has crept in somewhere either in glibc or gcc. Because
20 I had stopped my regular testing I can't relate the failure to any specific
21 version change of either package.
22
23 I need to request a verification from any Gentoo users. All that needs to
24 be done is run a straightforward software test.
25
26 The software is called UCBTEST and is described at http://www.netlib.org/fp/
27
28 The source code, however, is ancient Unix (1995) code and must be patched.
29 I have created a patched tarball that can run on recent Linux. This file
30 is attached as ucbtest.tar.bz2
31
32 If one is accustomed to modern GUI software, this code is a mess, but it is
33 rather straightforward to implement. Here are the steps:
34
35 1) Create a directory somewhere, e.g. /tmp/fp-test
36
37 2) Unpack the tarball into this directory.
38
39 3) Change into the /tmp/fp-test directory
40
41 4) Modify the ucbREADME/linux.sh file as follows:
42
43 Line 10 -- specify a full path for the results directory -- all test results
44 will be stored here -- e.g. /tmp/fp-test-results
45
46 Line 11 -- specify the full path to the Unix time program -- ucbtest won't run
47 without time -- for Gentoo just "emerge time" and the path will be "/usr/bin/time"
48
49 Line 17 -- specify the full path to the test directory -- same as in step #1
50
51 Line 36 -- enter your CFLAGS here
52
53 That's it as far as configuration. Now, from the top directory of the source
54 just execute:
55
56 ucbREADME/linux.sh
57
58 The code will take several minutes to compile, execute, and complete. While
59 the test is running it will spit out its progress to stdout. Upon completion
60 a brief summary is given:
61
62 UCBFAIL indicates problems!
63 /tmp/fp-test-results/ccos_DP.output: ucbtest UCBFAIL in COS(X) at line 444 for generic
64 /tmp/fp-test-results/clib_DP.output: ucbtest UCBFAIL in cabsd at line 701 for double
65 /tmp/fp-test-results/clib_DP.output: ucbtest UCBFAIL in powd at line 701 for double
66 /tmp/fp-test-results/clib_DP.output:UCBFAIL clib_DP.output , 25 out of 25 tests completed
67 /tmp/fp-test-results/csin_DP.output: ucbtest UCBFAIL in SIN(X) at line 444 for generic
68
69 only 11 out of 14 show UCBPASS!
70
71
72 There are expected failures in the trigonometric tests since trigonometric
73 performance is not specified in IEEE754/854. The failure in powd (double power
74 function) is also expected. But everything else should have passed.
75
76 In my case, the new failure occurs in the cabsd test, which is the absolute
77 value for complex numbers. I have never seen this error previously and
78 it may possibly indicate some problem with either glibc or gcc.
79
80 The results directory is also a mess (someone should really clean this code up).
81 In the results directory (see step #4) all detailed test results are contained
82 in the *.output files.
83
84 Anyway, if anyone wants to try this test, the steps have been outlined.
85 In spite of the messiness, the procedure is really quite simple, and the
86 ucbtest is a very good test of floating point performance.
87
88 Frank Peters

Attachments

File name MIME type
ucbtest.tar.bz2 application/x-bzip2

Replies

Subject Author
Re: [gentoo-amd64] Possible Math Problem - Request For Verification Marc Joliet <marcec@×××.de>
Re: [gentoo-amd64] Possible Math Problem - Request For Verification [Solved] Frank Peters <frank.peters@×××××××.net>
Re: [gentoo-amd64] Possible Math Problem - Request For Verification Volker Armin Hemmann <volkerarmin@××××××××××.com>
Re: [gentoo-amd64] Possible Math Problem - Request For Verification Volker Armin Hemmann <volkerarmin@××××××××××.com>