<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Now that some of you are finishing up the "initial profiling"
assignment (due Wednesday night) you can start working on the
re-write of dusty.</p>
<p>Remember -- you are rewriting in modern fortran (at least .f95 or
newer with free-form formatted source lines) and C/C++. <br>
</p>
<p>One of the hard parts of this project is getting identical
results between the old code and your new code. If you look at
the old dusty code it is broken up into loop sections. I
recommend working through each one of these individually. In
other words complete the rewrite of loop 10 and then compare the
results of the dusty.f AV array with your array. Work through
each loop in this manner.</p>
<p>Once you hit loop 12 you will have to implement a new version of
idcheck. That is where things get particularly nasty and you hit
some OLD fortran constructs that are extremely frowned upon these
days. For example...</p>
<p> goto ( 200, 300, 400, 500 ) int(mod(i+j+k,4)+1) <br>
</p>
<p>is particularly troubling. You may have to look this one up!
It's called a computed goto statement. You will definitely have
to rewrite this in your new fortran.</p>
<p>Anyway, as you work through the code stop and verify results
after each "loop section". Using that strategy I was able to get
everything rewritten and give the same results. Once we have the
codes rewritten in modern forms and giving the same results, we
can start working on optimizing them.<br>
</p>
<p>Remember -- correct results first -- then optimization. If you
optimize first bad things will happen and you will most likely
have to start over (seen it at least a dozen times in this class
with this piece of code). At this point, just focus on the
re-write and getting correct results.<br>
</p>
<div class="moz-signature">-- <br>
<b><i>Andrew J. Pounds, Ph.D. </i></b> (<a class="moz-txt-link-abbreviated" href="mailto:pounds_aj@mercer.edu">pounds_aj@mercer.edu</a>)<br>
<i>Professor of Chemistry and Computer Science</i><br>
<i>Director of the Computational Science Program</i><br>
<i>Mercer University, Macon, GA 31207 (478) 301-5627</i></div>
</body>
</html>