Mail Archives: pgcc/1998/07/09/21:02:35
Try -ffast-math
then
-fno-fast-math
and also try linking with and without "-lieee"
"fast math" tries to keep everything in the math co-processor
"-lieee" links in the IEEE math routines.
-jeffrey hundstad
PS I know these options make a speed difference I'm just guessing
about the accuracy. As far as I know the "fast-math" stuff is actually
80-bit math where IEEE is only 48-bit.
On 9 Jul, David Reiss wrote:
> Hi. I just discovered pgcc/pg++ and thought it would be great to try on
> my scientific programs which usually take hours to run. I tried
> compiling one program of mine (which uses lots of math routines and some
> C++ classes, etc) in pg++. It compiled fine using -O6 and ran about 4x
> faster than the g++ with -O2! But the numerical output is slightly
> different, basically about 10% off. (Sorry I can't give more detauls w/o
> explaining what the program does, which would take another 2 pages of
> typing...suffice it to say its a bunch of operations on floats and float
> arrays with many do loops and reading input data files. It uses a lot of
> routines from the Numerical Recipes text.)
>
> Just to check I tested the output vs. that from g++ on a Sun Ultra. My
> g++ output is exactly the same as the Sun Ultra...so my guess is there's
> something interesting going on with pg++ that I don't understand.
>
> PS. the other flags I use other than -O2 (g++) or -O6 (pg++) are:
> -fhandle-exceptions -w
> and I use the -m486 option with g++ on my Pentium machine.
>
> Does anyone have any thoughts?
> I dont subscribe to this list, so please email me!
> thanks for any help...it would be great to get this working!
>
> -David
> reiss AT astro DOT washington DOT edu
- Raw text -