Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sdd.hp.com!ucsd!ucbvax!UCSD.EDU!sdempsey From: sdempsey@UCSD.EDU (Steve Dempsey) Newsgroups: comp.sys.sgi Subject: strange floating point exception interrupt behavior Message-ID: <9007260022.AA03729@chem.chem.ucsd.edu> Date: 26 Jul 90 00:22:26 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 40 The following discussion pertains to a 4D/25TG running 3.2.1 and a 4D/340VGX running 3.3. Recently I have been doing a performance analysis of a number cruncher program that runs much more slowly on IRISes than one would expect. I fired up gr_osview and ran the program, expecting to see lots of system calls or swapping, and an indication of where the cpu time was being wasted. What I saw was something quite strange! The cpu was spending 99% of its time in user mode, just like any decent number cruncher should. The shock came from the interrupt rate, which went from a background level of 200-400 per second up to ~20K per second (35K on the 340VGX!) Ultimately, I discovered that the extra interrupts were occuring whenever floating point operations resulted in underflow. This behavior can be demonstrated by compiling and running this code: #include main() { double x, y, z; int i; y = MINDOUBLE; z = 0.5; i = 10000000; while(i--) x = y * z; } Both C and Fortran versions of this code produce the same results. I tried similar tests, forcing overflows and divide-by-zero, but no extra interrupts were found for these floating exceptions. Can anybody explain what's so special about underflows, and why do I get interrupts even though the floating point exception interrupts are not enabled? -------------------------------------------------------------------------------- Steve Dempsey (619) 534-0208 Dept. of Chemistry Computer Facility, 0314 INTERNET: sdempsey@ucsd.edu University of California, San Diego BITNET: sdempsey@ucsd La Jolla, CA 92093-0314 UUCP: ucsd!sdempsey