www.delorie.com/archives/browse.cgi   search  
Mail Archives: pgcc/1998/07/09/21:02:35

X-pop3-spooler: POP3MAIL 2.1.0 b 4 980420 -bs-
Message-Id: <199807092050.PAA09739@mail.mankato.msus.edu>
Date: Thu, 9 Jul 1998 15:50:11 -0500 (CDT)
From: Jeffrey Hundstad <jeffrey DOT hundstad AT mankato DOT msus DOT edu>
Subject: Re: differences in output between c++ and pg++ compiled programs?
To: reiss AT astro DOT washington DOT edu
cc: beastium-list AT Desk DOT nl
In-Reply-To: <35A52723.883F3139@astro.washington.edu>
MIME-Version: 1.0
Sender: Marc Lehmann <pcg AT goof DOT com>
Status: RO
X-Status: A
Lines: 47

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019