* Re: compiling kernel 2.4.3 [not found] <Pine.LNX.4.30.0104231234270.30556-100000@orion.chem.vt.edu> @ 2001-04-23 17:59 ` Uncle George 2001-04-23 18:11 ` T. Daniel Crawford 0 siblings, 1 reply; 13+ messages in thread From: Uncle George @ 2001-04-23 17:59 UTC (permalink / raw) To: T. Daniel Crawford, axp-list What I have very little of is "influence". All ( most ) denormal processing is done via software inside the kernel, as the FPU cant handle the operations at all. An expensive (timewise) deal, but u get to continue with the algorithmic operations. The original problem was with a divide by a denorm. This appears to be fixed for the 2.4.3 kern the next problem was the conversion of a single precision denorm into a double This should always work, but comes out as zero. I had a fix, but didn't reach the rite folks After that was the conversion of a large float/double into an integer/long. It doesn't appear to up to ieee754 standards, but have no manual ( nor want to get it for $$$$ ) /gat If u got the numbers which look like fortran #'s ( :-} ) and can produce these nums( terms of the equation ) in hexadecimal, then one can play in "C" to see where the issue is. I no longer have a DU/true64 box to play with to see where the number diverge though :-/ "T. Daniel Crawford" wrote: > On Mon, 23 Apr 2001, Uncle George wrote: > > > What would be the latest stable 2.4.x for mass consumption. I would like to > > correct the FP denormal problems in the alpha/linux box's. > > /gat > > > > OR where is ac12 > > > > Hi, George, > > I'm a participant in the axp-list and I know you've got some experience > with dealing with FPE's under Alpha/Linux. The timing of your message > above was just right as I've been fretting over some problems associated > with denormalized number exceptions on my alpha systems. I've found > that, for very large calculations (I do numerically intensive stuff), > I get occasional and inconsistent FPE with the message: > > forrtl (65): floating invalid > > I was able to track one of the problems to some code that looks like: > > f(m+i) = f(i)-f(m+i)*f(m3+i)*aka > > The numbers here are, in some instances, very, very, very small. E.g., > where the FPE occurs: > > f(m+i) = 4.841908917496239e-313 > f(m3+i) = -0.0001012220986496004 > aka = 0.2 > f(i) = 1.522672654296015e-13 > > The term f(m+i) looks like it might be denorm, but I'm new to this sort > of thing. I also found that the error doesn't occur at all under Tru64 > with the same hardware. > > My questions for you: > > (1) What is the nature of this problem under Alpha Linux? > > (2) What is the status of efforts to correct it, if any? > > (3) Finally, do you have any snippets of problematic code that I might be > able to use to trace the problem further? My codes are all far too large > to be useful for debugging. > > Thanks for your time! > > -Daniel > > -- > T. Daniel Crawford Department of Chemistry > crawdad@vt.edu Virginia Tech > www.chem.vt.edu/chem-dept/crawford Voice: 540-231-7760 FAX: 540-231-3255 > -------------------- > PGP Public Key at: http://www.chem.vt.edu/chem-dept/crawford/publickey.txt ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: compiling kernel 2.4.3 2001-04-23 17:59 ` compiling kernel 2.4.3 Uncle George @ 2001-04-23 18:11 ` T. Daniel Crawford 2001-04-23 18:52 ` Uncle George 0 siblings, 1 reply; 13+ messages in thread From: T. Daniel Crawford @ 2001-04-23 18:11 UTC (permalink / raw) To: axp-list What about special compiler flags to handle these cases? I've seen in the archives reference to -mieee, but this is not documented in the Compaq ccc or fort man pages. I tried it with the Fortran compilation but the same error occurs. -Daniel On Mon, 23 Apr 2001, Uncle George wrote: > What I have very little of is "influence". > > All ( most ) denormal processing is done via software inside the kernel, as the > FPU cant handle the operations at all. An expensive (timewise) deal, but u get > to continue with the algorithmic operations. > > The original problem was with a divide by a denorm. This appears to be fixed for > the 2.4.3 kern > > the next problem was the conversion of a single precision denorm into a double > This should always work, but comes out as zero. I had a fix, but didn't reach > the rite folks > > After that was the conversion of a large float/double into an integer/long. It > doesn't appear to up to ieee754 standards, but have no manual ( nor want to get > it for $$$$ ) > > /gat > > If u got the numbers which look like fortran #'s ( :-} ) and can produce these > nums( terms of the equation ) in hexadecimal, then one can play in "C" to see > where the issue is. I no longer have a DU/true64 box to play with to see where > the number diverge though :-/ > -- T. Daniel Crawford Department of Chemistry crawdad@vt.edu Virginia Tech www.chem.vt.edu/chem-dept/crawford Voice: 540-231-7760 FAX: 540-231-3255 -------------------- PGP Public Key at: http://www.chem.vt.edu/chem-dept/crawford/publickey.txt ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: compiling kernel 2.4.3 2001-04-23 18:11 ` T. Daniel Crawford @ 2001-04-23 18:52 ` Uncle George 2001-05-01 3:23 ` FP Exceptions T. Daniel Crawford 0 siblings, 1 reply; 13+ messages in thread From: Uncle George @ 2001-04-23 18:52 UTC (permalink / raw) To: axp-list FP operations are pipelined, and are at various stages of execution. Without the -mieee ( gcc - "C" compile ) switch the FPU processes instructions till a trap occures, then Kaos happens The kernel does not know where exactly the failure occured. With -mieee the compiler places limits on the operations that can occure in the pipeline, and if a limit is exceeded, the compiler will place a pause ( trapb ) instruction till the FPU has been drained & ALL possible TRAPS have been processed. So long as things are in a proper sequence, the kernel kan attempt to fix the error. Because it know how to backtrace/backstep The problems I am having is with -mieee & a trap & not having the right number returned as a part of the fix-up. The numerical number will also happen with any compiler, as it is a kernel bug /gat "T. Daniel Crawford" wrote: > What about special compiler flags to handle these cases? I've seen in the > archives reference to -mieee, but this is not documented in the Compaq ccc > or fort man pages. I tried it with the Fortran compilation but the same > error occurs. > > -Daniel > > On Mon, 23 Apr 2001, Uncle George wrote: > > > What I have very little of is "influence". > > > > All ( most ) denormal processing is done via software inside the kernel, as the > > FPU cant handle the operations at all. An expensive (timewise) deal, but u get > > to continue with the algorithmic operations. > > > > The original problem was with a divide by a denorm. This appears to be fixed for > > the 2.4.3 kern > > > > the next problem was the conversion of a single precision denorm into a double > > This should always work, but comes out as zero. I had a fix, but didn't reach > > the rite folks > > > > After that was the conversion of a large float/double into an integer/long. It > > doesn't appear to up to ieee754 standards, but have no manual ( nor want to get > > it for $$$$ ) > > > > /gat > > > > If u got the numbers which look like fortran #'s ( :-} ) and can produce these > > nums( terms of the equation ) in hexadecimal, then one can play in "C" to see > > where the issue is. I no longer have a DU/true64 box to play with to see where > > the number diverge though :-/ > > > > -- > T. Daniel Crawford Department of Chemistry > crawdad@vt.edu Virginia Tech > www.chem.vt.edu/chem-dept/crawford Voice: 540-231-7760 FAX: 540-231-3255 > -------------------- > PGP Public Key at: http://www.chem.vt.edu/chem-dept/crawford/publickey.txt > > _______________________________________________ > Axp-list mailing list > Axp-list@redhat.com > https://listman.redhat.com/mailman/listinfo/axp-list ^ permalink raw reply [flat|nested] 13+ messages in thread
* FP Exceptions 2001-04-23 18:52 ` Uncle George @ 2001-05-01 3:23 ` T. Daniel Crawford 2001-05-01 5:30 ` Greg Lindahl 2001-05-01 10:56 ` Uncle George 0 siblings, 2 replies; 13+ messages in thread From: T. Daniel Crawford @ 2001-05-01 3:23 UTC (permalink / raw) To: axp-list Thanks to Uncle George for a good explanation of what's happens when floating-point exceptions occur; I believe I'm beginning to understand some of the basic issues involved in denorm handling. The problem I'm running into is when denorms are generated within optimized libraries like CXML (specifically the BLAS routines). I've tried to compile Kazushige Goto's BLAS codes with -fpe3 to try to eliminate these FPE problems, but to no avail. (His DGEMM functions use some hand-coded assembler, however, so my -fpe3 flags may make no difference there.) So, I'm still up against a wall. In addition, what I still don't understand is the difference in FPE handling between Tru64 and Linux. My denorm problems are not occuring under Tru64, even with the code compiled without the -fpe3 flag. For those few of us here on the axp-list who are new to this subject, can anyone explain this? If knowledgeable people are looking for assistance in tracking down these problems, I would be more than willing to help. Furthermore, I fear that even if I can get rid of the exceptions through -fpe3 or something similar, the performance hit will be so great that I'll have to give up Linux in favor of Tru64 after all. -Daniel -- T. Daniel Crawford Department of Chemistry crawdad@vt.edu Virginia Tech www.chem.vt.edu/chem-dept/crawford Voice: 540-231-7760 FAX: 540-231-3255 -------------------- PGP Public Key at: http://www.chem.vt.edu/chem-dept/crawford/publickey.txt On Mon, 23 Apr 2001, Uncle George wrote: > FP operations are pipelined, and are at various stages of execution. Without the > -mieee ( gcc - "C" compile ) switch the FPU processes instructions till a trap > occures, then Kaos happens The kernel does not know where exactly the failure > occured. > > With -mieee the compiler places limits on the operations that can occure in the > pipeline, and if a limit is exceeded, the compiler will place a pause ( trapb ) > instruction till the FPU has been drained & ALL possible TRAPS have been processed. > So long as things are in a proper sequence, the kernel kan attempt to fix the error. > Because it know how to backtrace/backstep > > The problems I am having is with -mieee & a trap & not having the right number > returned as a part of the fix-up. The numerical number will also happen with any > compiler, as it is a kernel bug > /gat > ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: FP Exceptions 2001-05-01 3:23 ` FP Exceptions T. Daniel Crawford @ 2001-05-01 5:30 ` Greg Lindahl 2001-05-01 10:56 ` Uncle George 1 sibling, 0 replies; 13+ messages in thread From: Greg Lindahl @ 2001-05-01 5:30 UTC (permalink / raw) To: axp-list On Mon, Apr 30, 2001 at 11:23:50PM -0400, T. Daniel Crawford wrote: > The problem I'm running into is when denorms are generated within optimized > libraries like CXML (specifically the BLAS routines). One problem with the compaq libraries is that they all apparently generate denorms, which is a pain when you call exp() and want zero and get back a denorm. I was under the impression that Goto's routines should return zero instead of denorms. If not, you can ask him about it. > I've tried to > compile Kazushige Goto's BLAS codes with -fpe3 to try to eliminate these > FPE problems, but to no avail. Because they're assembler, they won't respect that flag. At best you'll get undefined behavior. > In addition, what I still don't understand is the difference in FPE handling > between Tru64 and Linux. My denorm problems are not occuring under Tru64, If you can generate an example, and prove that the library is the guilty party, Compaq would probably see it as a bug. However such bugs have sometimes turned out to be kernel bugs in the past, so both avenues have to be explored... -- g ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: FP Exceptions 2001-05-01 3:23 ` FP Exceptions T. Daniel Crawford 2001-05-01 5:30 ` Greg Lindahl @ 2001-05-01 10:56 ` Uncle George 2001-05-01 11:52 ` T. Daniel Crawford 1 sibling, 1 reply; 13+ messages in thread From: Uncle George @ 2001-05-01 10:56 UTC (permalink / raw) To: axp-list for linux 2.4.3 in arch/alpha/math-emu/math ( approx line 215 ) have a try with this change. This should fix a conversion of a single FP denorm, into a double. /gat \ > case FOP_FNC_CVTxS: > /* It is irritating that DEC encoded CVTST with > SRC == T_floating. It is also interesting that > the bit used to tell the two apart is /U... */ > if (insn & 0x2000) { > FP_CONV(S,D,1,1,SR,DB); > goto pack_s; > } else { > /* CVTST need do nothing else but copy the > bits and repack. */ > /* Not exactly, > * Conversion is from single -> double > * so vb needs to be in a 32 bit > * float form, and UNPACK'ed as such! */ > vb = alpha_read_fp_reg_s(fb); > FP_UNPACK_SP(SB, &vb); > DR_c = SB_c; > DR_s = SB_s; > DR_e = SB_e; > DR_f = SB_f << ( 52 - 23 ); > > goto pack_d; > } > > > > > The problem I'm running into is when denorms are generated within optimized > libraries like CXML (specifically the BLAS routines). I've tried to > c ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: FP Exceptions 2001-05-01 10:56 ` Uncle George @ 2001-05-01 11:52 ` T. Daniel Crawford 2001-05-01 12:23 ` Uncle George 0 siblings, 1 reply; 13+ messages in thread From: T. Daniel Crawford @ 2001-05-01 11:52 UTC (permalink / raw) To: axp-list On Tue, 1 May 2001, Uncle George wrote: > for linux 2.4.3 in arch/alpha/math-emu/math ( approx line 215 ) have a try with this > change. This should fix a conversion of a single FP denorm, into a double. > /gat When compiling 2.4.3 on your alpha, did run into compilation problems related to conflicting declarations of pmd_alloc() and pte_alloc()? -Daniel -- T. Daniel Crawford Department of Chemistry crawdad@vt.edu Virginia Tech www.chem.vt.edu/chem-dept/crawford Voice: 540-231-7760 FAX: 540-231-3255 -------------------- PGP Public Key at: http://www.chem.vt.edu/chem-dept/crawford/publickey.txt ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: FP Exceptions 2001-05-01 11:52 ` T. Daniel Crawford @ 2001-05-01 12:23 ` Uncle George 2001-05-01 12:26 ` T. Daniel Crawford 0 siblings, 1 reply; 13+ messages in thread From: Uncle George @ 2001-05-01 12:23 UTC (permalink / raw) To: axp-list yup, u are not alone. I would just edit the 2.4.x kernel that u have. It seems like the kernel is in flux for the alpha series :-{ /gat BTW my problem with the 2.4.x kernel was with the failure of pppoe ( dsl ) to work :-/ "T. Daniel Crawford" wrote: > On Tue, 1 May 2001, Uncle George wrote: > > > for linux 2.4.3 in arch/alpha/math-emu/math ( approx line 215 ) have a try with this > > change. This should fix a conversion of a single FP denorm, into a double. > > /gat > > When compiling 2.4.3 on your alpha, did run into compilation problems > related to conflicting declarations of pmd_alloc() and pte_alloc()? > > -Daniel > > -- > T. Daniel Crawford Department of Chemistry > crawdad@vt.edu Virginia Tech > www.chem.vt.edu/chem-dept/crawford Voice: 540-231-7760 FAX: 540-231-3255 > -------------------- > PGP Public Key at: http://www.chem.vt.edu/chem-dept/crawford/publickey.txt > > _______________________________________________ > Axp-list mailing list > Axp-list@redhat.com > https://listman.redhat.com/mailman/listinfo/axp-list ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: FP Exceptions 2001-05-01 12:23 ` Uncle George @ 2001-05-01 12:26 ` T. Daniel Crawford 2001-05-01 13:03 ` Uncle George 2001-05-02 12:10 ` Uncle George 0 siblings, 2 replies; 13+ messages in thread From: T. Daniel Crawford @ 2001-05-01 12:26 UTC (permalink / raw) To: axp-list On Tue, 1 May 2001, Uncle George wrote: > yup, u are not alone. I would just edit the 2.4.x kernel that u have. It seems like the > kernel is in flux for the alpha series :-{ > /gat > > BTW my problem with the 2.4.x kernel was with the failure of pppoe ( dsl ) to work :-/ > Yup, I added your patch to my 2.4.2 kernel and it compiles. After I get back from my class this morning I'll give it a shot. Your DSL connection depends on lots of FP math? Also, should I get lots of warnings like: math.c: In function `alpha_fp_emul': math.c:204: warning: right shift count is negative math.c:204: warning: left shift count >= width of type math.c:220: warning: left shift count is negative math.c:245: warning: statement with no effect math.c:265: warning: right shift count >= width of type math.c:265: warning: right shift count >= width of type math.c:269: warning: right shift count >= width of type math.c:269: warning: right shift count >= width of type math.c:277: warning: statement with no effect math.c:277: warning: statement with no effect math.c:277: warning: statement with no effect math.c:284: warning: statement with no effect math.c:284: warning: statement with no effect math.c:284: warning: statement with no effect math.c:99: warning: `SR_c' might be used uninitialized in this function math.c:99: warning: `SR_s' might be used uninitialized in this function math.c:99: warning: `SR_e' might be used uninitialized in this function math.c:99: warning: `SR_f' might be used uninitialized in this function math.c:100: warning: `DR_c' might be used uninitialized in this function math.c:100: warning: `DR_s' might be used uninitialized in this function math.c:100: warning: `DR_e' might be used uninitialized in this function math.c:100: warning: `DR_f' might be used uninitialized in this function when I compile math.c? -Daniel -- T. Daniel Crawford Department of Chemistry crawdad@vt.edu Virginia Tech www.chem.vt.edu/chem-dept/crawford Voice: 540-231-7760 FAX: 540-231-3255 -------------------- PGP Public Key at: http://www.chem.vt.edu/chem-dept/crawford/publickey.txt ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: FP Exceptions 2001-05-01 12:26 ` T. Daniel Crawford @ 2001-05-01 13:03 ` Uncle George 2001-05-02 12:10 ` Uncle George 1 sibling, 0 replies; 13+ messages in thread From: Uncle George @ 2001-05-01 13:03 UTC (permalink / raw) To: axp-list "T. Daniel Crawford" wrote: > On Tue, 1 May 2001, Uncle George wrote: > Your DSL connection depends on lots of FP math? its encrypted :} ( just kiddin ) > > > Also, should I get lots of warnings like: > > math.c: In function `alpha_fp_emul': > math.c:204: warning: right shift count is negative > m probably ( 99% confident ) not :-/ later to see why math.c is peeved. /gat ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: FP Exceptions 2001-05-01 12:26 ` T. Daniel Crawford 2001-05-01 13:03 ` Uncle George @ 2001-05-02 12:10 ` Uncle George 1 sibling, 0 replies; 13+ messages in thread From: Uncle George @ 2001-05-02 12:10 UTC (permalink / raw) To: axp-list, T. Daniel Crawford It appears to be a problem to be a problem with the linux 2.4.2 kernels makefile scripts . the "CFLAGS +=" in arch/alpha/math-emu/Makefile is not being picked up so that the -w flag is appended to the other CFLAGS options :-/ The -w flag inhibits the publishing of the warning messages. Otherwise removing the -w in a 2.2.17 build, also gives u these warmings. /gat "T. Daniel Crawford" wrote: > On Tue, 1 May 2001, Uncle George wrote: > > > > > Also, should I get lots of warnings like: > > math.c: In function `alpha_fp_emul': > math.c:204: warning: right shift count is negative > math.c:204: warning: left shift count >= width of type > math.c:220: warning: left shift count is negative > math.c:245: warning: statement with no effect > math.c:265: warning: right shift count >= width of type > math.c:265: warning: right shift count >= width of type > math.c:269: warning: right shift count >= width of type > math.c:269: warning: right shift count >= width of type > math.c:277: warning: statement with no effect > math.c:277: warning: statement with no effect > math.c:277: warning: statement with no effect > math.c:284: warning: statement with no effect > math.c:284: warning: statement with no effect > math.c:284: warning: statement with no effect > math.c:99: warning: `SR_c' might be used uninitialized in this function > math.c:99: warning: `SR_s' might be used uninitialized in this function > math.c:99: warning: `SR_e' might be used uninitialized in this function > math.c:99: warning: `SR_f' might be used uninitialized in this function > math.c:100: warning: `DR_c' might be used uninitialized in this function > math.c:100: warning: `DR_s' might be used uninitialized in this function > math.c:100: warning: `DR_e' might be used uninitialized in this function > math.c:100: warning: `DR_f' might be used uninitialized in this function > > when I compile math.c? > > -Daniel > > -- > T. Daniel Crawford Department of Chemistry > crawdad@vt.edu Virginia Tech > www.chem.vt.edu/chem-dept/crawford Voice: 540-231-7760 FAX: 540-231-3255 > -------------------- > PGP Public Key at: http://www.chem.vt.edu/chem-dept/crawford/publickey.txt > > _______________________________________________ > Axp-list mailing list > Axp-list@redhat.com > https://listman.redhat.com/mailman/listinfo/axp-list ^ permalink raw reply [flat|nested] 13+ messages in thread
* fp exceptions @ 1999-06-20 20:37 glenn murphy 1999-06-20 21:17 ` Wes Bauske 0 siblings, 1 reply; 13+ messages in thread From: glenn murphy @ 1999-06-20 20:37 UTC (permalink / raw) To: axp-list I'm sorry if any of my questions are FAQs. I'm just learning to program, and I get a lot of floating point exceptions at runtime with code that runs fine on x86 systems. I'm using a 21064 (cabriolet) with RedHat 5.2. Is this something specific to the 21064 that I need a compiler option for? Is this a problem with egcs 1.0.3 that comes with RHL 5.2? If I upgrade egcs, do I need to upgrade all the libs as well? Any help would be greatly appreciated. Glenn gpmurphy@mcs.net ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: fp exceptions 1999-06-20 20:37 fp exceptions glenn murphy @ 1999-06-20 21:17 ` Wes Bauske 0 siblings, 0 replies; 13+ messages in thread From: Wes Bauske @ 1999-06-20 21:17 UTC (permalink / raw) To: axp-list glenn murphy wrote: > > I'm sorry if any of my questions are FAQs. I'm just learning to program, > and I get a lot of floating point exceptions at runtime with code that > runs fine on x86 systems. I'm using a 21064 (cabriolet) with RedHat 5.2. > Is this something specific to the 21064 that I need a compiler option for? > Is this a problem with egcs 1.0.3 that comes with RHL 5.2? If I upgrade > egcs, do I need to upgrade all the libs as well? Any help would be > greatly appreciated. > Well, there are a couple things to do. First, run the program under gdb and see why you get the FP exception. It is quite likely that you are accessing something you shouldn't be. The Intels don't show the problem because they force the bad numbers to zero or FLOATMAX, and happily continue on with the calculation. Now, sometimes this fixup is quite reasonable to do and so you let it go but Alphas are a bit more picky in that they expect all FP values to be normalized. So, it you think the results of your gdb run/examination are acceptable (meaning you don't want to fix the code to eliminate the problem) then you might try -mieee to force the Alphas to slow down and handle the oddball numbers in SW rather than HW. This still might not work if your FP exception is in a library routine though, like exp(). Wes ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2001-05-02 12:10 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <Pine.LNX.4.30.0104231234270.30556-100000@orion.chem.vt.edu>
2001-04-23 17:59 ` compiling kernel 2.4.3 Uncle George
2001-04-23 18:11 ` T. Daniel Crawford
2001-04-23 18:52 ` Uncle George
2001-05-01 3:23 ` FP Exceptions T. Daniel Crawford
2001-05-01 5:30 ` Greg Lindahl
2001-05-01 10:56 ` Uncle George
2001-05-01 11:52 ` T. Daniel Crawford
2001-05-01 12:23 ` Uncle George
2001-05-01 12:26 ` T. Daniel Crawford
2001-05-01 13:03 ` Uncle George
2001-05-02 12:10 ` Uncle George
1999-06-20 20:37 fp exceptions glenn murphy
1999-06-20 21:17 ` Wes Bauske
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox