@giraffe , in any subsequent threads you start anywhere in the cyberspace, especially at this Discourse, please state this clearly and boldly upfront. That way the readers will know better how to make best use of their time.
Generally it appears StackOverflow will be a good place to make your inquires: that forum strives for discipline with both questions as well as replies. That’s a very useful thing to have in the threads you start.
As to discipline, please try to refrain from vague statements such as, “based on the original post what improvements can be made.”
The code you have shown in various threads require far too many changes and improvements in both your C and Fortran snippets even toward your immediate goal, “just have to get the program to run on a 64 bit machine.”
So what you and/your employer have stuck to in terms of workarounds only with Fortran only to throw it all away to migrate to another language soon is itself too onerous for any meaningful engagement online.
Please understand this and use that to respect others’ time.