From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fcda7,71c35a0e73c110d5 X-Google-Attributes: gidfcda7,public X-Google-Thread: 10872d,71c35a0e73c110d5 X-Google-Attributes: gid10872d,public X-Google-Thread: 115614,71c35a0e73c110d5 X-Google-Attributes: gid115614,public X-Google-Thread: 11035d,71c35a0e73c110d5 X-Google-Attributes: gid11035d,public X-Google-Thread: 1164f8,71c35a0e73c110d5 X-Google-Attributes: gid1164f8,public X-Google-Thread: fa528,71c35a0e73c110d5 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2003-08-02 15:12:47 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!freenix!proxad.net!newsfeed.stueberl.de!newspeer1-gui.server.ntli.net!ntli.net!newsfep1-win.server.ntli.net.POSTED!53ab2750!not-for-mail Message-ID: <3F2C375C.F3C56116@ntlworld.com> From: "Dr. David Kirkby" X-Mailer: Mozilla 4.8 [en] (X11; U; SunOS 5.9 sun4u) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.sys.hp.hpux,comp.unix.tru64,comp.sys.dec,comp.unix.solaris,comp.sys.sgi.admin,comp.unix.aix Subject: Re: Free UNIX for non-commerical use. References: <3F233C74.4F4C3BAB@ntlworld.com> <3F2368E5.ED5037A0@hotmail.com> <3F23A005.83B7C2DA@hotmail.com> <3f23a698$0$15040$cc9e4d1f@news.dial.pipex.com> <3F251918.B861101C@ntlworld.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Date: Sat, 02 Aug 2003 23:12:44 +0100 NNTP-Posting-Host: 62.253.85.27 X-Complaints-To: abuse@ntlworld.com X-Trace: newsfep1-win.server.ntli.net 1059862366 62.253.85.27 (Sat, 02 Aug 2003 23:12:46 BST) NNTP-Posting-Date: Sat, 02 Aug 2003 23:12:46 BST Organization: ntlworld News Service Xref: archiver1.google.com comp.sys.hp.hpux:30069 comp.unix.tru64:10498 comp.sys.dec:16567 comp.unix.solaris:164573 comp.sys.sgi.admin:18877 comp.unix.aix:54273 Uli Link wrote: > How can one be sure that such peak optimized code works correct in all > circumstances, since it cannot be debugged or tested in full. At highest > level nearly all modules give a warning of the optimizer. > No problem if mpg123 crashes one day with a special mp3, but most apps are a > little more critical. Automated testing can do a lot to help this. In an application I wrote, http://atlc.sourceforge.net/ a number of programs are used to automatically generate bitmaps. The md5 checksums of those bitmaps are then compared to what's expected. Once the bitmaps are generated, another floating point intensive program performs a numerically intensive finite difference computation on these bitmaps, generating some answers as text and some more bitmaps. The numerical answers are checked against those expected. The md5 checksums of the bitmaps are checked against those expected. When I say against 'what is expected' I'm comparing the results on a number of platforms, running a number of different operating systems using a number of different compilers at a number of different optimisation levels. What I have found is that the bitmaps generated by the floating point code do vary a little between platforms, but only by a single pixel and then only by a single gray level. In other words, this appears to be different rounding errors on the different platforms and is so insignificant. Of course, the above statergy is not foolproof, but is has helped me find problems when building multi-threaded code on SPARCs running Redhat Linux. Without some automated test method, that becomes next to impossible. To make it easy to test on a number of platforms, I wrote a script http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/atlc/sources/teston that copies the source to a remote computer, then runs configure; make; make check on them. However, it is easy to not think to write a specific test - only after you found a bug and realised my tests don't check for that problem. So I add a test to the testsuite. There's not a lot more one can do I guess, unless of course you have the time/budget to apply more formal methods, like you would if writing code for a missile guidance system. -- Dr. David Kirkby, Senior Research Fellow, Department of Medical Physics, University College London, 11-20 Capper St, London, WC1E 6JA. Tel: 020 7679 6408 Fax: 020 7679 6269 Internal telephone: ext 46408 e-mail davek@medphys.ucl.ac.uk