|
Dave and Chet, you were
right on. Thanks!
Python/FiPy is giving the
more accurate double precision answer. I'll need to change all the numeric
constants in the FORTRAN to "d0" to get a real comparision, but as the 2 models
stand I have wide difference in the run times on a small test case.
Running for an elapsed 'real' time of 10e-5 seconds, my transformation
front moves nominally 20-nanometers. FORTRAN runtime is 20 seconds,
and FiPy is 3 mins, 35 seconds. My real case will need to go ~10
micrometers, so run time is going to need to be reduced.
Any tips out there on
logical steps to improving efficiency would be appreciated. I'll get
version 1.1 and start the work understanding sweeping, etc.
Thanks,
Buddy
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of E David Huckaby Sent: Thursday, June 08, 2006 4:48 PM To: Multiple recipients of list Subject: RE: FiPy Precision Have you tried putting "d0" after your numeric constants in
FORTRAN,
i.e.
compare
easy = 5.11*5.234*4.987
vs.
easy = 5.11d0*5.234d0*4.987d0
Dave
>>> [EMAIL PROTECTED] 6/8/2006 4:22 PM >>> Hi,
I've added a very simply calculation to both the FORTRAN and
Numeric calcs, and called it 'easy'. I've defined easy as --- easy =
5.11*5.234*4.987
the files are attached, and the output is below. The
discrepancy always seems to show up at the 8th or 9th significant digit for
simple multiplication, or for Numeric functions.
FORTRAN
M**p =
5.170837517496476E-002
easy = 133.381011962891 atan term = -1.01175767177248 PYTHON
M**p = 0.0517083688947
easy 133.38100538 atan term = -1.01175769857 Any diagnosis is greatly appreciated.
If anyone out there cares to run these 2 and verify the output on
their machine, that would perhaps rule out/in the problem being my
pc.
Buddy
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Wheeler Sent: Thursday, June 08, 2006 12:36 PM To: Multiple recipients of list Subject: Re: FiPy Precision compares FORTRAN with Numeric for some very simple array manipulation (as
Dan Lewis suggested).
On Jun 8, 2006, at 10:48 AM, Damm, Edward F. (E. Buddy) wrote:
Daniel Wheeler |
- Improving Speed Damm, Edward F. (E. Buddy)
- Re: Improving Speed Daniel Wheeler
