* FORTRAN Inconsistencies...
@ 2002-07-12 15:59 Andrew Stone
2002-07-13 8:25 ` Toon Moene
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Stone @ 2002-07-12 15:59 UTC (permalink / raw)
To: gcc-help
Hello all,
First off, I apologize if this is not the correct forum for this.
I am working on a FORTRAN port from the Salford compiler
to the g77 compiler for too many reasons to list. Everything
is good so far, have wrapped the FORTRAN with C++, that is being
called by JAVA via JSP.
Here's the odd thing, when I run the process i get, say 54354 as a net
result (543.54)- I don't pass any floats, only integers are used in the
entire process, but I run the same process again (with the exact same input
parameters) and I may get 54354, or 54355, or 54353. There is never a
variance
of more than three.
I've traced the inputs and outputs all the way through (from the JSP through
the JAVA
object, through the C++ into the FORTRAN) and back out. The inputs never
change
at any stage, and neither do the outputs. So, I am getting these differences
apparently
based on the same inputs.
First thing that came to mind was rounding, maybe something was missing.
But there are
two reasons I don't think it is. 1) I have run this same process with a
simple java program
(outside the APACHE web environment) and I don't get these inconsistencies
2) This code has
been used for over a decade, I would think someone would have caught this by
now (but you never know).
It's my example of testing outside the JSP/APACHE/TOMCAT environment that is
confusing me.
Essentially the same code calling the same exact same shared object acts
differently? I was told
that my simple test could be acting the same way but because of the
differences in memory usage
under APACHE/TOMCAT as opposed to running a command line app, it just might
not be so evident.
So...is there a compiler option that organizes the memory usage differently
that may be of help with
this?
Here's my FORTRAN building exerpt:
g77 -ff77 -fPIC -finit-local-zero -fno-automatic -fugly-logint -c
$source_f -o $object_f
Here's my linking exerpt:
gcc -ff77 -fPIC -finit-local-zero -fno-automatic -fugly-logint -shared -mim
pure-text
-o libjniCheck.so -I/usr/java/include -I/usr/java/include/solaris
cbdNative.cpp objects/*.o -lg2c -lm -lc -lgcc
That's it...any clues or hints where to go instead of here would be greatly
appreciated.
thanks,
andy
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: FORTRAN Inconsistencies...
2002-07-12 15:59 FORTRAN Inconsistencies Andrew Stone
@ 2002-07-13 8:25 ` Toon Moene
2002-07-13 18:04 ` Andrew Stone
2002-07-15 6:16 ` Andrew Stone
0 siblings, 2 replies; 5+ messages in thread
From: Toon Moene @ 2002-07-13 8:25 UTC (permalink / raw)
To: Andrew Stone; +Cc: gcc-help
Andrew Stone wrote:
> Here's my FORTRAN building exerpt:
>
> g77 -ff77 -fPIC -finit-local-zero -fno-automatic -fugly-logint -c
> $source_f -o $object_f
Please compile (in addition to those flags) with -ffloat-store, to see
if the extra precision of the ix86 floating point registers plays a
role.
Thanks in advance,
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: FORTRAN Inconsistencies...
2002-07-13 8:25 ` Toon Moene
@ 2002-07-13 18:04 ` Andrew Stone
2002-07-15 6:16 ` Andrew Stone
1 sibling, 0 replies; 5+ messages in thread
From: Andrew Stone @ 2002-07-13 18:04 UTC (permalink / raw)
To: Toon Moene; +Cc: gcc-help
I will definitely give this a shot first thing Monday morning.
thanks,
andy
----- Original Message -----
From: "Toon Moene" <toon@moene.indiv.nluug.nl>
To: "Andrew Stone" <ston1957@bellsouth.net>
Cc: <gcc-help@gcc.gnu.org>
Sent: Saturday, July 13, 2002 11:18 AM
Subject: Re: FORTRAN Inconsistencies...
> Andrew Stone wrote:
>
> > Here's my FORTRAN building exerpt:
> >
> > g77 -ff77 -fPIC -finit-local-zero -fno-automatic -fugly-logint -c
> > $source_f -o $object_f
>
> Please compile (in addition to those flags) with -ffloat-store, to see
> if the extra precision of the ix86 floating point registers plays a
> role.
>
> Thanks in advance,
>
> --
> Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
> Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
> Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
> Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: FORTRAN Inconsistencies...
2002-07-13 8:25 ` Toon Moene
2002-07-13 18:04 ` Andrew Stone
@ 2002-07-15 6:16 ` Andrew Stone
2002-07-15 9:11 ` Andrew Stone
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Stone @ 2002-07-15 6:16 UTC (permalink / raw)
To: Toon Moene; +Cc: gcc-help
Added the -ffloat-store flag, but no change to current action.
Am now trying some other flags, thanks for the advice.
-andy
-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org]On
Behalf Of Toon Moene
Sent: Saturday, July 13, 2002 11:19 AM
To: Andrew Stone
Cc: gcc-help@gcc.gnu.org
Subject: Re: FORTRAN Inconsistencies...
Andrew Stone wrote:
> Here's my FORTRAN building exerpt:
>
> g77 -ff77 -fPIC -finit-local-zero -fno-automatic -fugly-logint -c
> $source_f -o $object_f
Please compile (in addition to those flags) with -ffloat-store, to see
if the extra precision of the ix86 floating point registers plays a
role.
Thanks in advance,
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: FORTRAN Inconsistencies...
2002-07-15 6:16 ` Andrew Stone
@ 2002-07-15 9:11 ` Andrew Stone
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Stone @ 2002-07-15 9:11 UTC (permalink / raw)
To: Toon Moene; +Cc: gcc-help
Problem solved. Was issue outside of FORTRAN code environment.
Thanks for your help Toon, it was greatly appreciated.
-andy
-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org]On
Behalf Of Andrew Stone
Sent: Monday, July 15, 2002 9:16 AM
To: Toon Moene
Cc: gcc-help@gcc.gnu.org
Subject: RE: FORTRAN Inconsistencies...
Added the -ffloat-store flag, but no change to current action.
Am now trying some other flags, thanks for the advice.
-andy
-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org]On
Behalf Of Toon Moene
Sent: Saturday, July 13, 2002 11:19 AM
To: Andrew Stone
Cc: gcc-help@gcc.gnu.org
Subject: Re: FORTRAN Inconsistencies...
Andrew Stone wrote:
> Here's my FORTRAN building exerpt:
>
> g77 -ff77 -fPIC -finit-local-zero -fno-automatic -fugly-logint -c
> $source_f -o $object_f
Please compile (in addition to those flags) with -ffloat-store, to see
if the extra precision of the ix86 floating point registers plays a
role.
Thanks in advance,
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-07-15 16:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-12 15:59 FORTRAN Inconsistencies Andrew Stone
2002-07-13 8:25 ` Toon Moene
2002-07-13 18:04 ` Andrew Stone
2002-07-15 6:16 ` Andrew Stone
2002-07-15 9:11 ` Andrew Stone
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).