From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,534302f766ee3d8e X-Google-Attributes: gid111c93,public From: jdonsbach@altavista.com Subject: Re: DEC compilers available for Linux? Date: 2000/10/17 Message-ID: <8sijkt$fdk$1@nnrp1.deja.com>#1/1 X-Deja-AN: 682628714 References: <8q5i9f$rtv$1@nnrp1.deja.com> <39CE793C.4DB0B64B@aquarien.com> X-Http-Proxy: 1.0 proxy.compaq.com, 1.0 x61.deja.com:80 (Squid/1.1.22) for client 161.114.71.65 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Tue Oct 17 22:25:41 2000 GMT X-MyDeja-Info: XMYDJUIDjdonsbach Newsgroups: comp.os.linux.alpha X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0) Most Alpha's (pre-EV6) work similarly in that floating point exceptions are asynchronous. You need to compile with "/fpe:3" or "/syncronous_exceptions" (Visual FORTRAN compiler options). This will tell the compiler to put a TRAPB instruction after every floating point instruction to flush the pipelines before the next instruction is executed. This kills performance and you shouldn't do it in a "production" program unless you have a very good reason for doing so and understand why you are doing it. Jeff D In article , Rob Komar wrote: > Don Baker wrote: > > Yes, Compaq sells Fortran compilers, but do they sell a good debugger > > to go with them? The last I heard, Compaq Visual Fortran version 6 in > > Windows still cannot find the source code for a divide-by-zero, or log > > or exponent of a negative number runtime error. It's extremely > > aggravating when one is developing numerical method programs for > > nonlinear PDEs. When it was DEC Visual Fortran, DEC used to blame > > Windows for that. Does anyone know if they also have the same problem > > in Linux? > > > Don Baker > > We do. The problem is that some FPU (floating-point unit) operations take > a long time. To save some time, other kinds of instructions that don't > depend on the outcome of the FP operation are often processed by the CPU > while the FPU is working. If a FPU error occurs, the program counter > can have moved on by many instructions by the time the signal from the > hardware interrupt from the FPU is recognized by the program. To get > around this on X86 machines, an FWAIT instruction needs to be inserted > after each floating-point operation to make the CPU wait for the FPU to > finish before going on to the next instruction. As far as I know, the > gcc compilers don't do this. Bill Metzenthen wrote some external code > to do this (see http://www.suburbia.net/~billm), but it works on the > assembler output from gcc, so it requires a few extra steps to produce > an executable (ie. it's a bit of a pain). > > I've never used Compaq Visual Fortran, but it's possible that it can > do this. I'd look in the documentation for a description of a switch > that adds FWAIT instructions to the code (assuming your using an X86 > machine and not an Alpha). I'd also compile the code with no optimization > at all to keep instruction re-ordering to a minimum. > > Cheers, > Rob Komar > Sent via Deja.com http://www.deja.com/ Before you buy.