delorie.com/archives/browse.cgi | search |
X-pop3-spooler: | POP3MAIL 2.1.0 b 4 980420 -bs- |
Message-ID: | <35A52723.883F3139@astro.washington.edu> |
Date: | Thu, 09 Jul 1998 20:25:07 +0000 |
From: | David Reiss <reiss AT astro DOT washington DOT edu> |
X-Mailer: | Mozilla 4.04 [en] (X11; I; Linux 2.0.34 i586) |
MIME-Version: | 1.0 |
To: | beastium-list AT Desk DOT nl |
Subject: | differences in output between c++ and pg++ compiled programs? |
Sender: | Marc Lehmann <pcg AT goof DOT com> |
Status: | RO |
X-Status: | A |
Lines: | 25 |
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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |