<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>Re: [Beowulf] Teaching Scientific Computation (looking for theperfect text)</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Yeah K+R is fun. Look up 'recursion' in the index...<BR>
<BR>
Sent from my GoodLink synchronized handheld (www.good.com)<BR>
<BR>
<BR>
&nbsp;-----Original Message-----<BR>
From: &nbsp; Nathan Moore [<A HREF="mailto:ntmoore@gmail.com">mailto:ntmoore@gmail.com</A>]<BR>
Sent:&nbsp;&nbsp; Tuesday, November 20, 2007 12:41 PM Pacific Standard Time<BR>
To:&nbsp;&nbsp;&nbsp;&nbsp; Peter St. John; beowulf@beowulf.org<BR>
Subject:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Re: [Beowulf] Teaching Scientific Computation (looking for theperfect text)<BR>
<BR>
Thanks for the message Peter.&nbsp; I agree with you about the lucidity of K&amp;R,<BR>
although I think the Landau-Lifshitz series of texts eclipses it in overall<BR>
greatness.<BR>
<BR>
Regarding demographics, I'm thinking mainly about the device driver/embedded<BR>
systems/EE track, in which a fortran interface seems to be unheard of.&nbsp; The<BR>
only field I know of in which Fortran is common and vital is numerical<BR>
weather modeling.&nbsp; Maybe others on the list can disabuse me of this notion.<BR>
<BR>
Also, the truck full of gravel analogy is great, thanks!<BR>
<BR>
On Nov 20, 2007 1:30 PM, Peter St. John &lt;peter.st.john@gmail.com&gt; wrote:<BR>
<BR>
&gt; Nathan,<BR>
&gt; I'm sure you'll get lots of very experienced responses but if I may:<BR>
&gt; 1. Book. K&amp;RC is the best book ever, on any subject.<BR>
&gt; 2. Demographics. It looked to me that engineers were typically<BR>
&gt; learning and using C (C++, C with Classes, sometimes Java) more than<BR>
&gt; Fortran. I would have expected similar among physicists, but I<BR>
&gt; understand that a lot of Fortan is still extant and vital. Also there<BR>
&gt; is some convergence, ultimately it won't matter much.<BR>
&gt; 3. Pedagogy. When computational efficiency is important, the<BR>
&gt; distinctions bettween sending data, and sending references to data, is<BR>
&gt; real important. I think it can be made vivid, early; what's the<BR>
&gt; difference between my handing you a card with the shipping address of<BR>
&gt; the warehouse that has the gravel you need for your construction<BR>
&gt; business, and handing you one thousand wheelbarrows full of gravel?<BR>
&gt; Either way can be right in the circumstances, but the difference is<BR>
&gt; obviously very relevant and should be taught even if you use a<BR>
&gt; language that hides the distinctions.<BR>
&gt; 4. You might let them choose, but that might make more sense with<BR>
&gt; graduate students, than undergrads, and you may not like grading<BR>
&gt; papers in multiple languages. So you might ask about departmental<BR>
&gt; guidelines, what languages they will be exprected to learn anyway. I'd<BR>
&gt; advocate presenting some of the shorter but fundamental algorithms in<BR>
&gt; two languages, if you have time, but time is scarce and it's a physics<BR>
&gt; course, not a programming course.<BR>
&gt; 5. Choose C because there is no real choice, but I don't have time to<BR>
&gt; explain that in the margin of my email :-)<BR>
&gt; Peter<BR>
&gt;<BR>
&gt;<BR>
&gt; On Nov 20, 2007 1:33 PM, Nathan Moore &lt;ntmoore@gmail.com&gt; wrote:<BR>
&gt; &gt; I regularly teach a college course in a physics department that deals<BR>
&gt; with<BR>
&gt; &gt; scientific computation.&nbsp; After students take the course, I expect that<BR>
&gt; &gt; they'll be able to write simple &quot;c-tran&quot; style programs for data<BR>
&gt; analysis,<BR>
&gt; &gt; write basic MD or MC simulations, and be fairly fluent in Mathematica.<BR>
&gt; &gt;<BR>
&gt; &gt; In the past, I figured that with the breadth of topics included in the<BR>
&gt; &gt; course, Fortran, specifically the basic, simple, and reliable F77<BR>
&gt; dialect<BR>
&gt; &gt; (w/ some F90 conveniences) was the language to teach.&nbsp; In my own head,<BR>
&gt; my<BR>
&gt; &gt; rationale was:<BR>
&gt; &gt; - Most students can grasp the basics of fortran in half a day's reading,<BR>
&gt; so<BR>
&gt; &gt; I can spend more class time on science and math (probably because there<BR>
&gt; are<BR>
&gt; &gt; no pointers - I think that C is much harder for students and sometimes<BR>
&gt; &gt; &quot;seems&quot; less like mathematical syntax than f77)<BR>
&gt; &gt; - &quot;Classical Fortran&quot; is a great text and is readable for self-study (I<BR>
&gt; know<BR>
&gt; &gt; of no such text for C/C++)<BR>
&gt; &gt; - several free compilers exist (g95 seems ok so far)<BR>
&gt; &gt; - Netlib, lapack, and numerical recipes cover the math library<BR>
&gt; adequately<BR>
&gt; &gt; - F77 is compiled (Perl/python are too slow for an MD/MC sim and I<BR>
&gt; figure<BR>
&gt; &gt; that students should know at least on compiled language and one<BR>
&gt; scripting<BR>
&gt; &gt; language to be competent)<BR>
&gt; &gt; - MPI is a relatively basic addition to the language (again, no<BR>
&gt; pointers,<BR>
&gt; &gt; allocation, or addressing)<BR>
&gt; &gt;<BR>
&gt; &gt; After reflection though, I've started to wonder about the wisdom of my<BR>
&gt; &gt; choice.&nbsp; Specifically (like RGB), I love the GSL library, and extending<BR>
&gt; GSL<BR>
&gt; &gt; to fortran in an intro class is non-trivial.&nbsp; Additionally, most vendors<BR>
&gt; &gt; supply &quot;fast&quot; hardware libraries in C (I may be ignorant, but if a<BR>
&gt; student<BR>
&gt; &gt; wants to call an AMD ACML fast-math function(<BR>
&gt; &gt; <A HREF="http://developer.amd.com/acml.jsp">http://developer.amd.com/acml.jsp</A>), or write a linear algebra function<BR>
&gt; to<BR>
&gt; &gt; run on a graphics card(<A HREF="http://developer.nvidia.com/object/cuda.html">http://developer.nvidia.com/object/cuda.html</A> ),<BR>
&gt; the<BR>
&gt; &gt; vendors seem to assume that you'll write the code in C).<BR>
&gt; &gt;<BR>
&gt; &gt; Also, and more relevant, I assume that most employers word-associate<BR>
&gt; &gt; &quot;Fortran is to backwards as C is to competence&quot;.<BR>
&gt; &gt;<BR>
&gt; &gt; So, I'm thinking about reworking the class to favor C, and fearing 3<BR>
&gt; weeks<BR>
&gt; &gt; of pointer and addressing hell.&nbsp; For those of you who teach scientific<BR>
&gt; &gt; computation (and also those of you who hire undergrads), I'd be grateful<BR>
&gt; for<BR>
&gt; &gt; your thoughts.&nbsp; One specific question I have is what text covers<BR>
&gt; scientific<BR>
&gt; &gt; programming and touches on MPI using the C language.<BR>
&gt; &gt;<BR>
&gt; &gt; regards,<BR>
&gt; &gt;<BR>
&gt; &gt; Nathan Moore<BR>
&gt; &gt;<BR>
&gt; &gt;<BR>
&gt; &gt; --<BR>
&gt; &gt; - - - - - - -&nbsp;&nbsp; - - - - - - -&nbsp;&nbsp; - - - - - - -<BR>
&gt; &gt; Nathan Moore<BR>
&gt; &gt; Assistant Professor, Physics<BR>
&gt; &gt; Winona State University<BR>
&gt; &gt; AIM: nmoorewsu<BR>
&gt; &gt; - - - - - - -&nbsp;&nbsp; - - - - - - -&nbsp;&nbsp; - - - - - - -<BR>
&gt; &gt; _______________________________________________<BR>
&gt; &gt; Beowulf mailing list, Beowulf@beowulf.org<BR>
&gt; &gt; To change your subscription (digest mode or unsubscribe) visit<BR>
&gt; &gt; <A HREF="http://www.beowulf.org/mailman/listinfo/beowulf">http://www.beowulf.org/mailman/listinfo/beowulf</A><BR>
&gt; &gt;<BR>
&gt; &gt;<BR>
&gt;<BR>
<BR>
<BR>
<BR>
--<BR>
- - - - - - -&nbsp;&nbsp; - - - - - - -&nbsp;&nbsp; - - - - - - -<BR>
Nathan Moore<BR>
Assistant Professor, Physics<BR>
Winona State University<BR>
AIM: nmoorewsu<BR>
- - - - - - -&nbsp;&nbsp; - - - - - - -&nbsp;&nbsp; - - - - - - -<BR>
</FONT>
</P>


!DSPAM:474346f6190061804284693!

</BODY>
</HTML>