[Beowulf] A start in Parallel Programming?

Peter St. John peter.st.john at gmail.com
Thu Mar 15 12:14:06 PDT 2007


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:
550 WRITE(6, 555, X)
555 FORMAT(...)

Became
not_printf(fp6, label555, X)
label555: (...)

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.

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.

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.

Peter



On 3/15/07, Robert G. Brown <rgb at phy.duke.edu> wrote:
>
> On Thu, 15 Mar 2007, Leif Nixon wrote:
>
> > "Peter St. John" <peter.st.john at gmail.com> writes:
> >
> >> I had thought that after some point (say, f77) the practical thing was
> to
> >> translate fortran to C and use the C compiler, just because compiler
> writers
> >> love C, adopted it hugely, and write great compilers. Apparently I was
> >> mistaken.
> >
> > Compilers are designed to compile code written by humans.
> > Autogenerated code typically does not optimize well.
>
> Or be human-readable.  f2c code was just about as evil as any zomby
> woof or eskimo boy could be.  I used to try to use it to START porting
> fortran sources to C, but rapidly concluded that it was actually easier
> and saner to just rewrite the algorithms in native C by hand.  It was a
> really educational experience for those that would assert that fortran
> is "just like" C on the back end, though -- "just like" is well defined
> by the required compatibility libraries and stuff that has to be done to
> convert data structures.  They were not, not, not pretty...
>
>    rgb
>
> --
> Robert G. Brown                        http://www.phy.duke.edu/~rgb/
> Duke University Dept. of Physics, Box 90305
> Durham, N.C. 27708-0305
> Phone: 1-919-660-2567  Fax: 919-660-2525     email:rgb at phy.duke.edu
>
>
> _______________________________________________
> Beowulf mailing list, Beowulf at beowulf.org
> To change your subscription (digest mode or unsubscribe) visit
> http://www.beowulf.org/mailman/listinfo/beowulf
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.beowulf.org/pipermail/beowulf/attachments/20070315/0a1bba30/attachment.html>


More information about the Beowulf mailing list