Re: Compiling in 32 vs 64 platform problem
- From: "robin" <robin_v@xxxxxxxxxxx>
- Date: Sun, 30 Apr 2006 01:46:39 GMT
"Peter" <xf.10.kaminari@xxxxxxxxxxxxxxx> wrote in message
news:pq3t429vo6o2k840015357l7sta37ihmok@xxxxxxxxxx
Hello,
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:
64 bit results:
7.5 1 0.664139E-01 1
0.238612E+00
0.531925E-02
0.154969E-01
0.382009E-01
32 bit results:
7.5 1 0.581779E-01 1
0.239058E+00
0.543676E-02
0.155693E-01
0.383326E-01
I have compiled the same code on many different 32 bit machines (also
with the same compiler) and the results usually do not differ by that
much. Thus, I am concerned that something else is happening here but I
am not sure what.
Your results are almost completely different.
That suggests that your program has bugs.
These could be
1. uninitialized variables
2. Subscript errors.
3. Others (see below*).
You need to compile in debug mode.
Why not try the Salford Fortran 95 compiler,
which offers checks for these kinds of errors.
==============
* You say you are using F77 and COMMON.
Both these are error-prone.
You don't say, but are you using IMPLICIT NONE ?
If not, you're best advised to put in declarations for
all variables and to use IMPLICIT NONE.
By not using IMPLICIT NONE, typos can easily
slip though, such as using O instead of 0 and vice versa,
I instead of 1 and vice versa, and so on.
.
- Prev by Date: Re: Fortran 2008 (was Re: New style DO syntax?)
- Next by Date: Re: Converting fixed-to-free format
- Previous by thread: Re: Compiling in 32 vs 64 platform problem
- Next by thread: Real and complex arrays
- Index(es):
Relevant Pages
|