[CSC 435] Starting the Dusty Rewrite in C
Andrew J. Pounds
pounds_aj at mercer.edu
Sat Jan 20 09:28:11 EST 2024
While some of you are making good progress on re-writing dusty in
Fortran, rewriting dusty in C is significantly more challenging. Here
are some pointers (no pun intended) to get you started.
If you want to start our your code in a segmented form (functions in a
different files) that is fine -- but if you are really rusty on C
coding, then it may be better to keep the first version in anvil as one
big code file.
Personally, I would stay away from things from the C++ STL. I will show
you some of my C++ HPC code later, but generally if you don't really
understand what is going on under the hood of these entities, then there
is no way you will get the same results as the original dusty.
When I rewrote dusty in C the first time I seem to remember writing the
functions first and then working down the main progam loop by loop --
testing and comparing the values between dusty77 and my new C program
after each loop. I recommend that you start this process soon as it is
not something that can normally be done the night before it is due.
If memory serves, I think there are ten different arrays that have to be
maintained in the main program of dusty. If you need a refresher on
using calloc/malloc to create arrays off of the heap in C, please let me
know.
--
*/Andrew J. Pounds, Ph.D./*
/Professor of Chemistry and Computer Science/
/Director of the Computational Science Program/
/Mercer University, Macon, GA 31207 (478) 301-5627/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/csc435/attachments/20240120/43d7a217/attachment.html>
More information about the csc435
mailing list