From: "Andrew Stone" <ston1957@bellsouth.net>
To: <gcc-help@gcc.gnu.org>
Subject: FORTRAN Inconsistencies...
Date: Fri, 12 Jul 2002 15:59:00 -0000 [thread overview]
Message-ID: <000f01c229f7$ada15e90$e96d2143@stone> (raw)
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
next reply other threads:[~2002-07-12 22:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-12 15:59 Andrew Stone [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000f01c229f7$ada15e90$e96d2143@stone' \
--to=ston1957@bellsouth.net \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).