Re: Compiling in 32 vs 64 platform problem
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 25 Apr 2006 22:05:21 +0000 (UTC)
Peter <xf.10.kaminari@xxxxxxxxxxxxxxx> wrote:
I have a several thousand-lines code in f77 that I want to port to 64
bit architecture machines. I use Intel Fortran compiler version 8.1.
with the following command line:
ifort -c -O2
followed by linking of the different object files.
The program is self-contained in the sense that it does not require
any external libraries (except the portability library specified by
the -Vaxlib switch at linking time). Compilation and linking seem to
go smoothly but the results obtained from the program differ from
those that I get on 32 bit architecture machines. Comparing the result
files on both systems one can see difference in values that start on
the second decimal place between the 32 bit results and the 64 bit
results. For example:
(snip)
0.238612E+00(snip)
0.239058E+00
A 64 bit machine usually means 64 bit addressing. It is not so
hard to do 64 bit arithmetic on 32 bit machines. That might also
mean 64 bit INTEGER to index into large arrays.
Fortran specifies that default INTEGER and REAL have the same
size, so your compiler might be generating 8 byte REAL and 16 byte
REAL*8.
It could be that some operations are done with more precision
and so get different results. In some cases those differences
could lead to the difference shown.
Some programs with COMMON and/or EQUIVALENCE rely on INTEGER
and REAL being the same size. If they aren't you could get
very strange results, with unexpected equivalence between
variables. Most likely this would give results very different
from the right results, but it might give only small changes.
-- glen
.
- Prev by Date: Re: New style DO syntax?
- Next by Date: Re: New style DO syntax?
- Previous by thread: Intel Visual Fortran
- Next by thread: Re: Compiling in 32 vs 64 platform problem
- Index(es):
Relevant Pages
|
|