Page 269 - see page 269.<br><br>Nice!<br><br><div class="gmail_quote">On Nov 20, 2007 2:42 PM, Michael Will &lt;<a href="mailto:mwill@penguincomputing.com">mwill@penguincomputing.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">





<div>


<p><font size="2">Yeah K+R is fun. Look up &#39;recursion&#39; in the index...<br>
<br>
Sent from my GoodLink synchronized handheld (<a href="http://www.good.com" target="_blank">www.good.com</a>)<div class="Ih2E3d"><br>
<br>
<br>
&nbsp;-----Original Message-----<br>
From: &nbsp; Nathan Moore [<a href="mailto:ntmoore@gmail.com" target="_blank">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; <a href="mailto:beowulf@beowulf.org" target="_blank">beowulf@beowulf.org</a><br>
Subject:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Re: [Beowulf] Teaching Scientific Computation (looking for theperfect text)<br>
<br></div><div><div></div><div class="Wj3C7c">
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&#39;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;<a href="mailto:peter.st.john@gmail.com" target="_blank">peter.st.john@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Nathan,<br>
&gt; I&#39;m sure you&#39;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&#39;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&#39;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&#39;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&#39;s a physics<br>
&gt; course, not a programming course.<br>
&gt; 5. Choose C because there is no real choice, but I don&#39;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;<a href="mailto:ntmoore@gmail.com" target="_blank">ntmoore@gmail.com</a>&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&#39;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&#39;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&#39;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" target="_blank">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" target="_blank">http://developer.nvidia.com/object/cuda.html</a> ),<br>
&gt; the<br>
&gt; &gt; vendors seem to assume that you&#39;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&#39;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&#39;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, <a href="mailto:Beowulf@beowulf.org" target="_blank">Beowulf@beowulf.org</a><br>
&gt; &gt; To change your subscription (digest mode or unsubscribe) visit<br>
&gt; &gt; <a href="http://www.beowulf.org/mailman/listinfo/beowulf" target="_blank">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>
</div></div></font>
</p>

</div>
</blockquote></div><br><br clear="all"><br>-- <br>- - - - - - - &nbsp; - - - - - - - &nbsp; - - - - - - - <br>Nathan Moore<br>Assistant Professor, Physics<br>Winona State University<br>AIM: nmoorewsu <br>- - - - - - - &nbsp; - - - - - - - &nbsp; - - - - - - -


!DSPAM:47435011198981465223968!