Re: Compiling in 32 vs 64 platform problem
- From: Herman D. Knoble <SkipKnobleLESS@xxxxxxxxxxxxxxx>
- Date: Wed, 26 Apr 2006 08:47:17 -0400
Peter: If you have a subscript out of range, or an undefined variable
(which Salford and Lahey can diagnose at run-time), this might account
for the differences.
Back in the old days, a professor once asked me the question:
"When I switch compilers I get different answers. Which set of answers
are correct?" The answer of course is: most likely neither set is correct.
(Compiler bugs could be involved, but this is unlikely).
If only precision is involved, than the computations that you are using
are sensitive to relatively small perturbations of constants. If this
is the case, the numerical computation methods for your model could be
called into question.
Skip Knoble
On Tue, 25 Apr 2006 17:45:50 -0400, Peter <xf.10.kaminari@xxxxxxxxxxxxxxx> wrote:
-|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.
-|
-|Most variables in the program are declared as real <name of variable>
-|with a few declared as real*8. There are dozens of different common
-|blocks through the program.
-|
-|So far I have thought that the problem may be related to:
-|
-|a) the size of a real in a 32 bit machine is perhaps different than in
-|the 64 bit machine and what I am looking at is some sort of rounding
-|off problem.
-|
-|b) Common blocks. I have heard that sometimes there may be alignment
-|problems.
-|
-|In either case I am not sure how to solve the problem. I was wondering
-|if anyone could offer some insights into the problem and how to solve
-|it. Thanks in advance.
-|
-|Peter
.
- Prev by Date: Re: Real and complex arrays
- Next by Date: Re: New style DO syntax?
- Previous by thread: Re: Compiling in 32 vs 64 platform problem
- Next by thread: Re: Compiling in 32 vs 64 platform problem
- Index(es):
Relevant Pages
|
Loading