Compaq Visual Fortran on WINDOWS Problem

From: Eric Mcintosh (Eric.Mcintosh_at_cern.ch)
Date: 05/25/04


Date: Tue, 25 May 2004 12:48:58 +0200

I am using the ex-Compaq Visual Fortran 6.1A compiler on

Windows 2000 and Windows XP systems at CERN.
(This has been our default compiler for Windows for many years.)

After laborious research I identified the following problem
and produced the test program.

      program mynum
      implicit none
      double precision extaux,con
      integer mycon(2),myextaux(2)
      equivalence (extaux,myextaux(1))
      equivalence (con,mycon(1))
      con=-3.756403155274550d-09
      write (*,'(a20,f47.33)') ' CON ',con
      write (*,'(a20,2z8)') ' HEX ',mycon(2),mycon(1)
      open(20,file='extaux',form='formatted')
      read (20,*) extaux
      write (*,'(a20,f47.33)') ' EXTAUX ',extaux
      write (*,'(a20,2z8)') ' HEX ',myextaux(2),myextaux(1)
      end

 The data file fort.20 contains

  6.578151765187548e-10 -4.769934558813349e-09 9.080361228508333e-09
  1.761146505216348e-08 -3.756403155274550e-09 0.000000000000000e+00

 The correct ouput is
                CON -0.000000003756403155274549586578007
                HEX BE3022357D9B0650
           extaux31 -0.000000003756403155274549586578007
                HEX BE3022357D9B0650

but on Windows 2000 I get
                CON -0.000000003756403155274549586578007
                HEX BE3022357D9B0650
           extaux31 -0.000000003756403155274550413758619
                HEX BE3022357D9B0651

On Linux, where I have several Fortran compilers available, and especially
NAG f95 5.0, I have no problem whatsoever.

On Windows XP with my Compaq Fortran, no problem either. On Windows 2000
however, the 5th number read in is 1 bit too big. I have switched
compilers on Windows to use Lahey-Fujitsu lf95 6.1 and now all is well
again.

I have been told "it only happens with old compilers"! The same person
reported

the same error with an old Intel compiler on Windows XP!!!

I have just run 15,000 rather important jobs on Windows using 600
input files. 505 of my 600 files are treated wrongly on Windows 2000 with
from
1 to 7 errors in each file, always one bit too big.
NOTA BENE. It is essential to read the 6 numbers as given for the 5th number
to be wrong.
Just reading the last three numbers or the number itself is OK.

It seems to me I have a strange problem that is both compiler and OS
dependent. Any information
about this would be extremely welcome. I am studying chaotic behaviour and
this seemingly tiny
error grows exponentially in my model.

               Regards and thanks for any information. Eric.

   Eric McIntosh, IT/PS, G07510, CERN, CH-1211 GENEVA 23.

                          +41 22 767 49 34 (Office with answering machine).
                          +41 22 767 71 55 (FAX office, weekdays only).
                          +41 76 487 40 50 (Portable, often on silent)



Relevant Pages

  • Re: LAPACK
    ... >>what do I have to do for installing LAPACK on a pc with windows XP??? ... You need a Fortran compiler, unless you want to use CLAPACK. ... The speed of LAPACK is very dependent on the quality of your BLAS. ...
    (sci.math.num-analysis)
  • Re: Compiler query
    ... Windows 2000 is probably the worst Windows when it comes ... to the DOS Box. ... which compiles Fortran 77 as a subset of Fortran 90, ... -|I started off searching for a Fortran compiler to use - as the moment ...
    (comp.lang.fortran)
  • Re: "Visual" Fortran?
    ... > If you what a cheap/free FORTRAN compiler for Windows, ... > to beat the Watcom Compiler: ... > FORTRAN is likely to be a very poor choice. ... > Visual Basic 6.0 to do teh GUI from end, ...
    (comp.lang.fortran)
  • Re: who can help me? about OpenMP
    ... I know nothing about how Intel has implemented their compiler on ... Your best source of info on that is the Intel Fortran ... Fortran Compiler for Windows & Visual Fortran ...
    (comp.parallel)
  • Re: C++ programming migration from DOS to Windows
    ... compiler, so the current compiler is quite competitive WRT to ... There are a couple of ports of gcc to Windows. ... Comeau is more or less unique: the best language conformance you can ... IDEs: Microsoft and Borland have both produced decent IDEs in the past, ...
    (comp.lang.cpp)