Ooh! Flamebait!
Nathan Moore wrote:
I regularly teach a college course in a physics department that deals
with scientific computation. After students take the course, I expect
that they'll be able to write simple "c-tran" style programs for data
analysis, write basic MD or MC simulations, and be fairly fluent in
Mathematica.
In the past, I figured that with the breadth of topics included in the
course, Fortran, specifically the basic, simple, and reliable F77
dialect (w/ some F90 conveniences) was the language to teach. In my own
head, my rationale was:
- Most students can grasp the basics of fortran in half a day's reading,
so I can spend more class time on science and math (probably because
there are no pointers - I think that C is much harder for students and
sometimes "seems" less like mathematical syntax than f77)
- "Classical Fortran" is a great text and is readable for self-study (I
know of no such text for C/C++)
- several free compilers exist (g95 seems ok so far)
- Netlib, lapack, and numerical recipes cover the math library adequately
- F77 is compiled (Perl/python are too slow for an MD/MC sim and I
figure that students should know at least on compiled language and one
scripting language to be competent)
- MPI is a relatively basic addition to the language (again, no
pointers, allocation, or addressing)
After reflection though, I've started to wonder about the wisdom of my
choice. Specifically (like RGB), I love the GSL library, and extending
GSL to fortran in an intro class is non-trivial. Additionally, most
vendors supply "fast" hardware libraries in C (I may be ignorant, but if
a student wants to call an AMD ACML fast-math function(
http://developer.amd.com/acml.jsp), or write a linear algebra function
to run on a graphics card(http://developer.nvidia.com/object/cuda.html
<http://developer.nvidia.com/object/cuda.html>), the vendors seem to
assume that you'll write the code in C).
Also, and more relevant, I assume that most employers word-associate
"Fortran is to backwards as C is to competence".
So, I'm thinking about reworking the class to favor C, and fearing 3
weeks of pointer and addressing hell. For those of you who teach
scientific computation (and also those of you who hire undergrads), I'd
be grateful for your thoughts. One specific question I have is what
text covers scientific programming and touches on MPI using the C language.
With the advent of F90 and F95, the ability to call a C/C++ library
routine became significantly simpler. That said, it's not ever
"exactly" simple to port someone else's libs from one language to
another, but it's not really that hard, either.
In the atmospheric sciences community, well, call us backward, but most
of our applications are still coded in the arcane language of our
fathe... er, in Fortran. Mostly for the reasons you originally cite.
and, no, they haven't changed.
As for an employer looking for a C-competent programmer over a
Fortran-competent programmer, well, they'd not get a great deal if they
want someone to work with a suite of models in the "wrong" language.
They should be looking for someone who's able to deal with the language
of interest... and perhaps to pick up a new language if the new model of
the day warrants it.
--
Gerry Creager -- [EMAIL PROTECTED]
Texas Mesonet -- AATLT, Texas A&M University
Cell: 979.229.5301 Office: 979.458.4020 FAX: 979.862.3983
Office: 1700 Research Parkway Ste 160, TAMU, College Station, TX 77843
_______________________________________________
Beowulf mailing list, Beowulf@beowulf.org
To change your subscription (digest mode or unsubscribe) visit
http://www.beowulf.org/mailman/listinfo/beowulf