public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* 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

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).