<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<font face="serif">Guys -- as most (if not all) of you are still
struggling to get consistent results between your Fortran77,
Fortran90, and C codes, please feel free to take a look at my
code. You can clone the repository from github<br>
<br>
git clone <a class="moz-txt-link-freetext" href="https://github.com/threadmaster/condusty.git">https://github.com/threadmaster/condusty.git</a><br>
<br>
and run the makefile to build the timing library and all three of
the codes. They are dimensioned at 50 and run in less than 10
seconds on zeus.<br>
<br>
When I worked on converting dusty to c I had to be VERY (ok -
EXTREMELY) cognizant of the fact that in places dusty was doing
indirect addressing of arrays. While that's generally a bad idea
for performance, it is a nightmare to pick apart when you care
converting to C (index starts at zero) from Fortran (index starts
at 1). There were also places where mod was used on the indices
and the indices themselves were used in the calculations. Ugh.<br>
<br>
I also had to carefully follow the rules on <br>
(1) operator precedence,<br>
(2) how mixed mode arithmetic is done, and<br>
(3) what certain functions need for arguments and their return
values (hint abs in C retuns an int)<br>
(4) Fortran's automatic typing of variables if they are not
declared within the scope of their use<br>
<br>
For dimensions of 10, 50, and 100 the final trace and idcheck
agree to machine precision across all three of my programs.<br>
<br>
Anyway -- use the code as you see fit -- but try not to just cut
an paste the whole thing into your code. I expect you all to have
working code by Tuesday -- at which point we will talk about a
revised due date for the paper.<br>
<br>
<br>
</font>
<pre class="moz-signature" cols="72">--
Andrew J. Pounds, Ph.D. (<a class="moz-txt-link-abbreviated" href="mailto:pounds_aj@mercer.edu">pounds_aj@mercer.edu</a>)
Professor of Chemistry and Computer Science
Mercer University, Macon, GA 31207 (478) 301-5627
<a class="moz-txt-link-freetext" href="http://faculty.mercer.edu/pounds_aj">http://faculty.mercer.edu/pounds_aj</a>
</pre>
</body>
</html>