From: szgyula@skysrv.pha.jhu.edu (Gyula Szokoly)
Subject: Re: exp() function in fortran -- why is it so slow?
Date: 18 Apr 1994 21:22:55 GMT [thread overview]
Message-ID: <2outnfINN8vu@jhunix.hcf.jhu.edu> (raw)
In-Reply-To: 2ok857INN2t4@jhunix.hcf.jhu.edu
In article <2ok857INN2t4@jhunix.hcf.jhu.edu>,
I <szgyula@tarkus.pha.jhu.edu> wrote:
> I hit the following problem: I'm trying to run a code on a 3000/600AXP
>machine running OSF 1.3. Accidentaly I've tried to run the same code on
>a 3000/300 ?? running OpenVMS 1.5. I was really surprised. The code
>run about 3-4 times FASTER on the OpenVMS machine. I've tried to track
>down the problem and I figured out that I'm calling the exp() function
>(in FORTRAN) a lot.
Thanks To Bill G. from Dec, the solution is easy. I overlooked some
linker flags. My (well, my user's) fortran code calls exp() with
large negative numbers. I used by a misstake the single precision
library on the OpenVMS machine, which returns 0 for x<-85, on the
OSF machine the double precision library call returns zero for x<-700.
Many of my numbers fell between these two limits so the OSF machine
did calculate a lot, the OpenVMS machine just returned zero.
Just for the record. I got my expected speed compiling as:
f77 -o mycode mycode.for -non_shared -math_library fast
Thanks again, and sorry for the confusion.
Gyula Szokoly
P.S.: I'm a C person so this was a big mental challange to me.
--
Gyula P. Szokoly (szgyula@skysrv.pha.jhu.edu) -------------------------------\
| When I am weaker than you, I ask you for freedom because that is according|
|to your principles; when I am stronger than you, I take away your freedom|
|because that is according to my principles. -- Frank Herbert|
next prev parent reply other threads:[~1994-04-18 21:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-04-14 20:13 exp() function in fortran -- why is it so slow? Gyula Szokoly
1994-04-18 21:22 ` Gyula Szokoly [this message]
1994-04-19 13:18 ` Sebastian Meyer
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox