[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -O (optimization): different results?



On Wed, 30 Jun 1999 16:49:21 EDT, Daniel Friedman wrote: 
>I have ns-allinone-2.1b5 (not '5a) [on a Linux machine].  I wanted to
>reduce the time required for some simulations, so I did 'make clean',
>then changed
>CCOPT = -g -Wall
>in the Makefile to
>CCOPT = -O -Wall
>so that gcc would compile ns with optimizations.  I then did 'make', and
>re-ran my simulation.  Unfortunately, this yielded results which were
>vastly different than those obtained with the unoptimized compilation.
>
>Any thoughts as to why this should be so?

Given that ns runs on many different platforms with the same output
(according to the validation tests), this result is VERY suprising.
To me it suggests either an environmental problem or a compiler bug.

You should find the validation tests helpful in narrowing down a small
problem in a given module.

   -John Heidemann