From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,4656f7b2dbe75a7 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-04-19 06:18:29 PST Newsgroups: comp.unix.osf.osf1 Path: gmd.de!nntp.gmd.de!xlink.net!howland.reston.ans.net!usenet.ins.cwru.edu!nigel.msen.com!zib-berlin.de!zrz.TU-Berlin.DE!math.fu-berlin.de!omega.physik.fu-berlin.de!meyer From: meyer@omega.physik.fu-berlin.de (Sebastian Meyer) Subject: Re: exp() function in fortran -- why is it so slow? Message-ID: <8YYNBHPG@math.fu-berlin.de> Sender: news@math.fu-berlin.de (Math Department) Nntp-Posting-Host: omega.physik.fu-berlin.de Organization: Free University of Berlin, Germany References: <2ok857INN2t4@jhunix.hcf.jhu.edu> <2outnfINN8vu@jhunix.hcf.jhu.edu> Date: Tue, 19 Apr 1994 13:18:29 GMT szgyula@skysrv.pha.jhu.edu (Gyula Szokoly) writes: >In article <2ok857INN2t[...]>, 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 > [...] > Just for the record. I got my expected speed compiling as: >f77 -o mycode mycode.for -non_shared -math_library fast This was definitively right for V1.2. I suspect that -math_library fast has any meaning with V1.3. Here is my test: > f77 -o mcnp_ns -non_shared *.o -lX11 -ldnet_stub > f77 -o mcnp_nsf -non_shared -math_library fast *.o -lX11 -ldnet_stub > ll mcnp* -rwxr-xr-x 1 meyer mcnp 2972888 Apr 19 14:58 mcnp_ns -rwxr-xr-x 1 meyer mcnp 2972888 Apr 19 14:59 mcnp_nsf > cmp -l mcnp_ns* 5 76 201 So the output files differ in just ONE byte, what explains the missing difference in speed. :-( I'd be grateful for any tricks to speed up my program. It's only five times faster on a 3000/300M than on our DECstation 2100, what is not what we expected. sebastian -- __o Sebastian Meyer Tel: 030/838-5181| FU Berlin, Physik _ \<,_ meyer@sirius.physik.fu-berlin.de | Arnimallee 14 [Raum 1.3.35] (_)/ (_) meyer@muffin.physik.uni-bremen.de | D-14195 Berlin ~~~~~~~~~~ "To err is human, to really foul things up requires a computer"