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: Rob Komar Subject: Re: DEC compilers available for Linux? Date: 2000/09/24 Message-ID: #1/1 X-Deja-AN: 673681892 Sender: Robert Komar References: <8q5i9f$rtv$1@nnrp1.deja.com> <39CE793C.4DB0B64B@aquarien.com> X-Complaints-To: news@bctel.net X-Trace: news.bc.tac.net 969841052 207.194.19.104 (Sun, 24 Sep 2000 17:17:32 PDT) Organization: Hoo Hah! User-Agent: tin/1.4.3-20000502 ("Marian") (UNIX) (Linux/2.2.17 (i686)) NNTP-Posting-Date: Sun, 24 Sep 2000 17:17:32 PDT Newsgroups: comp.os.linux.alpha 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