Re: Compiling in 32 vs 64 platform problem



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

.



Relevant Pages

  • Re: modularity... (was: Re: Looking for real world examples to explain the difference between proced
    ... easy to introduce that new protocol into the software. ... Long before OO the R-T/E people discovered that state machines ... my planned alterations to the compiler core should be able ... not structuring the compiler internals as a big ...
    (comp.object)
  • Re: What does 32 bit application mean?
    ... Does this means that the compiler is ... Thus it corresponds to the register ... > assembler for 32 bit architecture. ... > [On all the modern machines I know, the register size and the address ...
    (comp.compilers)
  • Re: Atmel AVR assembler
    ... so I decided to write my own assembler. ... >> extensive testing on various machines and operating environments. ... where I may not be able to legally restore the compiler toolset. ... supporting tools where the code was developed using Lattice C around ...
    (comp.arch.embedded)
  • Re: New system - dual-core processor??
    ... I made some tests with crafty only with different kind of machines, ... The time recorded is the one displayed by crafty in its analysis tree when showing Bxh6 as the new best move. ... Under Linux, the compiler used by default was gcc 4.0.3 ... Under windows, I used the executables available on the net, but I strongly suspect that they were compiled using the intel compiler. ...
    (rec.games.chess.computer)
  • Re: <ctype.h> toLower()
    ... > That depends on how the compiler arranges things. ... But you just said that string literals are constant so how can you assign ... In this context a pointer to an array of *constant* characters is passed. ... On Non-Windows machines this is different. ...
    (alt.comp.lang.learn.c-cpp)

Loading