🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sci.math.num-analysis
Article #1107

Fortran (was Re: "Minimize any function, as long as it is named FUNC")

#1107
From: furio ercolessi
Date: Sun, 10 Jan 1993 21:10
68 lines
3997 bytes
In article <63296@mimsy.umd.edu>, ingber@umiacs.umd.edu (Lester Ingber) writes:
|>In article <1io311INNagr@morrow.stanford.edu> jon@oas.stanford.edu (Jon Claerbout) writes:
|>>>
|>>>I attempt to explain below in more detail what the problem is.
|>>>It is quite entangled and technical,
|>>
|>>That is why some people use C and C++ for numerical work.

In my first post I placed a warning:

"If you program in C, don't read this post.  :-)"

Unfortunately, I forgot to put it again in the second one ....

Anyway, seeing no reason to start the N-th net-debate on "C vs Fortran",
I'll briefly summarize why I am doing this project in Fortran in spite
of its obvious and well-known limitations:

* The computational physicists and chemists community, to which I
  belong, overwhelmingly uses Fortran for their work.  Right or wrong,
  this is the state of affairs.  So, if I write in C and pass my code to a colleague,
  chances are that we'll get into troubles.  This is clearly an inertial
  phenomenon, induced by the massive amount of Fortran code we
  have there lying around and which is, of course, recycled for new
  projects.

* Also note, people in this business are often not much computer 
  oriented. I myself admit that ***char gives me some headaches.

* I know C but not enough to write C code with the same speed I write
  Fortran code.  Of course, I can decide to switch and climb the
  C learning curve and then I am back on track.  But I do not feel 
  that it is worth the time investment, since Fortran fulfills my needs
  almost completely.  And if I switch, I would have to work on two
  languages simultaneously, possibly for ten or more years, due to
  maintainance of existing codes.  I will never have time to convert
  many tens of thousand of lines, as well as make sure that many
  gigabytes of data stored as unformatted Fortran files will be read
  as well by the new C codes.

* If Fortran 90 weren't there, i would probably switch to C.  Since 
  it is there, and it solves the known Fortran 77 limitations, I prefer
  to wait for the optimizing compilers that are probably just one year
  apart or so, and live with Fortran 77 for one more year.

* Up to two years ago, switching to C was *NOT POSSIBLE* because 
  of the slowness of the generated code on the main production machines.
  Production machines were, for us, Crays and IBM 3090s.  C code
  was 20-30% slower than Fortran code, which was unacceptable.
  Now, with production being moved to RISC boxes, and C compiler
  writers putting #pragmas to help the optimizers to do their job,
  things are perhaps changing.

* C code can be called from Fortran without troubles on most machines.
  I knew about VSFR and have the code already, and will try it out soon.
  Thanks for putting this code in the public domain.
  The different source language is not a barrier at all: I do not see any 
  reason to ask for a Fortran version, and to say the truth it seems to
  me a rather stupid request.
  I think the two worlds can peacefully coexist.

So: peace!   :-) 
furio
--
Furio Ercolessi
Materials Research Laboratory           |   Intl School for Advanced Studies
Univ. of Illinois at Urbana-Champaign   |   Trieste, Italy
furio@uiuc.edu                          |   furio@sissa.it
Technical Details
Message-ID: <C0npHD.830@news.cso.uiuc.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uimrl7.mrl.uiuc.edu!ercolessi
References: <C0K4Hx.110@news.cso.uiuc.edu> <C0M1DK.5JE@news.cso.uiuc.edu> <1io311INNagr@morrow.stanford.edu> <63296@mimsy.umd.edu>

Show Full Headers
Complete Article Headers
Newsgroups: sci.math.num-analysis
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uimrl7.mrl.uiuc.edu!ercolessi
From: ercolessi@uimrl3.mrl.uiuc.edu (furio ercolessi)
Subject: Fortran (was Re: "Minimize any function, as long as it is named FUNC")
References: <C0K4Hx.110@news.cso.uiuc.edu> <C0M1DK.5JE@news.cso.uiuc.edu> <1io311INNagr@morrow.stanford.edu> <63296@mimsy.umd.edu>
Message-ID: <C0npHD.830@news.cso.uiuc.edu>
Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
Reply-To: ercolessi@uimrl3.mrl.uiuc.edu (furio ercolessi)
Organization: MRL - UIUC
Date: Sun, 10 Jan 1993 21:10:24 GMT
Lines: 68