compile choices changing results
Julie Stern
jvstern@milkyway.gsfc.nasa.gov
Thu Feb 2 16:16:00 GMT 2006
So, do my answers below point to the gcc compiler switches
-O3 -fomit-frame-pointer -funroll-loops
and should this really produces different results in the
number crunching?
On Thu, 2 Feb 2006, Neil Ferguson wrote:
> Hello -
>
> We need more information:
>
> - what version of which OS are you using?
Linux and I was told gcc and cc are the same in linux. But,
I do anticipate running on other operating systems where they won't
be the same. So, the LINUX v. is RehHat Linux 7.3
> - what version of GCC?
2.95.3
> - what hardware/CPU architecture are you running on?
Gateway intel pentium III, i686
> - is 'cc' actually an alias or symlink for 'gcc', or is it another compiler
> altogether? Even if 'cc' points to a different version of GCC, that can be
> significant.
Yes, there was a symbolic link to gcc.
>
> Semi-educated guess - are you compiling for x86?
i686
>
> Neil.
>
> Julie Stern wrote:
> > Hello,
> > I'm running some code which came with a makefile
> > containing -O3 -fomit-frame-pointer -funroll-loops
> > and the program results were drastically different from
> > running with just cc. (yes, right now its an unfair
> > comparison, cc vs. gcc -O3 -fomit-frame-pointer -funroll-loops),
> > but I didn't expect the results to be different.
> > Can anyone explain what the compiler options actually
> > do in this case? I can read the man pages, but don't
> > understand what it exactly does. Can anyone explain
> > why my results would be different (2nd and 3rd decimal place
> > different in numbers that are in scientitific notation and
> > are e06 and e37, so the differences are huge)? Anybody
> > have opinions on cc vs. gcc that can help me decide which
> > to use?
> >
> > Thanks so much for help and advice.
> >
> > --Julie
>
More information about the Gcc-help
mailing list