<div>Oh yeah, automatic translation of FORTRAN to C is not human maintainable. When WorldCom did that (with consultants) I pointed out that the generated C was really FORTRAN and would be easier to maintain with FORTRAN programmers, for example:
<div>550 WRITE(6, 555, X)</div>
<div>not_printf(fp6, label555, X)</div>
<div>That is, instead of putting the format string in an arguement to printf, it created a line label (after the number of the format statement in the fortran) etc.</div>
<div>I meant translate the fortran to C **for the compiler**, not for humans to read. Just as I don't want to read the assembler produced by the compiler (but I could if I wanted to), the fortran programmer does not have to read the C generated intermediately by say SysV f77. Just f77 used the C compiler to generate the assembler, etc.
<div>I'd be optimistic for the process of translating F to C, followed by compiling the C, to be as effecient as the process of compiling C into assembler, followed by assmbling into executable. But I surely believe all y'all scientific supercomputing gentlefolk that compilers optimized for FORTRAN are more efficient and that numerically efficient code is still delveloped this way for big crunching. I'm surprised because I thought C compilers had just gone too far, but I believe it. If JPL develops in FORTRAN than FORTRAN lives.
<div><span class="gmail_quote">On 3/15/07, <b class="gmail_sendername">Robert G. Brown</b> <<a href="mailto:firstname.lastname@example.org">email@example.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">On Thu, 15 Mar 2007, Leif Nixon wrote:<br><br>> "Peter St. John" <<a href="mailto:firstname.lastname@example.org">
email@example.com</a>> writes:<br>><br>>> I had thought that after some point (say, f77) the practical thing was to<br>>> translate fortran to C and use the C compiler, just because compiler writers
<br>>> love C, adopted it hugely, and write great compilers. Apparently I was<br>>> mistaken.<br>><br>> Compilers are designed to compile code written by humans.<br>> Autogenerated code typically does not optimize well.
<br><br>Or be human-readable. f2c code was just about as evil as any zomby<br>woof or eskimo boy could be. I used to try to use it to START porting<br>fortran sources to C, but rapidly concluded that it was actually easier
<br>and saner to just rewrite the algorithms in native C by hand. It was a<br>really educational experience for those that would assert that fortran<br>is "just like" C on the back end, though -- "just like" is well defined
<br>by the required compatibility libraries and stuff that has to be done to<br>convert data structures. They were not, not, not pretty...<br><br> rgb<br><br>--<br>Robert G. Brown <a href="http://www.phy.duke.edu/~rgb/">
http://www.phy.duke.edu/~rgb/</a><br>Duke University Dept. of Physics, Box 90305<br>Durham, N.C. 27708-0305<br>Phone: 1-919-660-2567 Fax: 919-660-2525 <a href="mailto:email:firstname.lastname@example.org">email:email@example.com</a>
<br><br><br>_______________________________________________<br>Beowulf mailing list, <a href="mailto:Beowulf@beowulf.org">Beowulf@beowulf.org</a><br>To change your subscription (digest mode or unsubscribe) visit <a href="http://www.beowulf.org/mailman/listinfo/beowulf">