problem with ifc...

problem with ifc...

hi

I am using efc on a Itanium and ifc on a AMD athlon XP1900.

i test my fortran 90 program on a compaq dekstation and i find the same result as on the itanium with efc compiler6.0.
But when i test the program on the athlon with ifc compiler 6.0, the result is different in simple or in double precision.
So my question is the following :
Do you known if there is a problem with the athlon XP1900 computer with the ifc compiler.

On the other i have tested the program on a macintosh and i obtain the same resuls as on the itanium or the compaq computer.

thank you for your future answer

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

We do not test the Intel compilers on AMD processor-based machines. I do not know the characteristics of AMD processors and their handling of floating-point data. On Intel IA-32 processor-based machines, floating-point data is computed in 80-bit arithmetic and then either truncated or rounded to the target data type (32 or 64-bit). This higher precision computation can cause differences if a program is sensitive to the least significant bits. The compiler does have switches that control the rounding or truncation, and the precision control (-pc32, pc64, pc80). There are also switches which limit optimizations that can cause slight variations in precision, such as -mp, -mp1, etc. For more information, see the "Floating-point Arithmetic Precision" section of the Fortran User's Guide.

Martyn

In my experience, I would be very surprised if there were a major difference in floating point results between binaries compiled by ifc on an Intel CPU and an AMD CPU. I imagine it is conceivably possible but we have never seen any distinction.

It is rather common for the Intel x86 architecuture results to be somewhat different than many other workstations which
implement "regular" IEEE double precision arithmetic.

Is the 'Compaq Deskstation' an x86 machine or an Alpha machine? What compiler on the Compaq? I will assume it is an Intel Pentium CPU.

Try compiling both codes with -mp -pc64 -fp_port -axK
and then sequentially removing various combinations the first three options and replacing -mp1 with -mp.

Use exactly the same statically linked binary on the Pentium and on the AMD.

If you get something different with dynamic linking than static linking it may mean that the operating system libraries you are linking to are different on the machines and that is causing the difference.

I have been comparing the performance of g77 and ifort on an
AMD Athlon MP2800+. I note that ifort gives generally slightly
faster code, but is incredibly slow on I/O ! To test this further
I wrote the following little FORTRAN code:

PROGRAM IOTST
IMPLICIT REAL*8(A-H,O-Z)
INTEGER*4 TIME
REAL*4 ETIME, TARRAY(2)
PARAMETER(N=10000)
DIMENSION A(N,N)
CPU1 = ETIME(TARRAY)
WALL1 = TIME()
WRITE(1,*) A
CPU2 = ETIME(TARRAY)
WALL2 = TIME()
CPUT = CPU2-CPU1
WALLT = WALL2-WALL1
WRITE(6,*) 'CPU: ',CPUT, 'Wall: ',WALLT
END

and then I do

compute-0-1.local 66>g77 -O3 -ffast-math -fautomatic -fno-f2c
-fno-globals -Wno-globals io.f
compute-0-1.local 67>time a.out
CPU: 16.5900002Wall: 17.
13.820u 4.030s 0:18.81 94.8% 0+0k 0+0io 137pf+0w
compute-0-1.local 68>ifort -O3 -ip -w -tpp6 io.f
compute-0-1.local 69>time a.out
CPU: 279.440000305176 Wall: 326.000000000000
61.430u 218.030s 5:26.16 85.6% 0+0k 0+0io 178pf+0w

There is clearly a quite dramatic difference in timings ! What is the origin of this and can it be fixed ? How can I investigate this further ?

Best regards,
Trond Saue

Leave a Comment

Please sign in to add a comment. Not a member? Join today