From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 5270 invoked from network); 4 Mar 1999 13:22:22 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 4 Mar 1999 13:22:22 -0000 Received: from bacchus.pc1.uni-duesseldorf.de (root@bacchus.pc1.uni-duesseldorf.de [134.99.152.11]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id IAA13618 for ; Thu, 4 Mar 1999 08:18:14 -0500 Received: from bacchus.pc1.uni-duesseldorf.de (jochen@localhost [127.0.0.1]) by bacchus.pc1.uni-duesseldorf.de (8.8.7/8.8.7) with SMTP id OAA03399; Thu, 4 Mar 1999 14:10:35 +0100 From: Jochen Kuepper Organization: Heinrich-Heine-Universitaet To: Lorenzo Bernardi , Lorenzo Bernardi , axp-list@redhat.com Subject: Re: Numerical simulations on alphalinux: C or fortran? Date: Thu, 4 Mar 1999 14:00:29 +0100 X-Mailer: KMail [version 1.0.17] Content-Type: text/plain References: MIME-Version: 1.0 Message-Id: <99030414103501.00433@bacchus.pc1.uni-duesseldorf.de> Content-Transfer-Encoding: quoted-printable On Don, 04 M=E4r 1999 Lorenzo Bernardi wrote: > I bought a alphalinux workstation to make numerical simulations. The >kind of numerical simulation I'm doing is monte carlo and it evolves >mainly calculating EXP and COS with real*8. The language I use is >fortran77. For now on the alphalinux I compile on a DU workstation and u= se >the compiled binaries.=20 > > My question is will I gain in term of speed to transfer my code from >fortran to C? I will then use egcc compiler plus the new libcpml. >It seems that C compiler are evolving faster thna fortran compiler and >thus they can be better for fp operation than fortran compiler. Or maybe >the enhancement are different. > >Any experience with simulation on alpha machine is greatly appreciated. >(Other compiler brand or optimization tricks and so on) Well, in my experience C looses against FORTRAN most of the time, but the= y are close, usually. If you have some complex stuff, you can write nice and fa= st C++ programs, though, esp. if you use inline functions efficiently. Often the= se are faster than corresponding FORTRAN, since nowadays people usually don't w= rite spaghetti code any more - even if they use FORTRAN77 :-) But in the end, I would say, speed mostly depends on good algorithms and efficient implemetations, not on the programming language. Greetings, Jochen ----------------------------------------------------------------------- Jochen K=FCpper Heinrich-Heine-Universit=E4t D=FCsseldorf jochen@uni-duesseldorf.de Institut f=FCr Physikalische Chemie I Universit=E4tsstr. 1, Geb 26.43 Raum 02.29 phone ++49-211-8113681 40225 D=FCsseldorf fax ++49-211-8115195 Germany http://www-public.rz.uni-duesseldorf.de/~jochen -----------------------------------------------------------------------