Optimization options
Tim Prince
tprince@myrealbox.com
Mon Feb 12 10:04:00 GMT 2007
Ignacio Fernández Galván wrote:
> --- Tim Prince <tprince@myrealbox.com> wrote:
>
>
>>> I'm compiling a program (Gaussian 98) which gives problems
>>>
>> (probably
>>
>>> numerical inaccuracies) with -O1.
>>>
>> Are you talking about inconsistent precision? You leave most of your
>>
>> details to be guessed at.
>> If this happens on an IA-compatible 32-bit target, does -mfpmath=sse
>> (or, if your targer it really old, -ffloat-store) help?
>> Are suggested build parameters supplied with the application?
>>
>
> Well, I didn't give more details because that's not the problem I'm
> trying to solve now. It's an athlonXP and at the moment I'm compiling
> without platform-specific flags.
>
> The thing is that compiling with -O1 or with all the options implied by
> -O1 (added manually) give different results:
>
> -O1 -> test fails
> -fdefer-pop -fdelayed-branch ... -> test works
>
> So there must be something else -O1 does. What is it?
>
>
-O1 with -mfpmath=387 (default) removes -ffloat-store, so then you have
mixed precision. If running in 32-bit mode with gfortran, you even have,
in effect, real*10 intermediate results. I would have thought you would
be proud enough of your Athlon to turn on its SSE options.
More information about the Fortran
mailing list