4 ms·
In grad school I worked on three separate Fortran code bases written as early as the 80s with tens of thousands of lines, no source control or version history,
by Brentward 3y ago
In grad school I worked on three separate Fortran code bases written as early as the 80s with tens of thousands of lines, no source control or version history, no build systems or even build scripts, and no tests. I think a lot of old scientific software is in the same condition, with some mix of "if ain't broke don't fix it" and the code being very hard to refactor.
This quote from the linked PRIMA page pretty much sums up my experience porting the above code too: "I hope I am the last one in the world to decode a maze of 244 GOTOs in 7939 lines of Fortran 77 code — I did this for three years and I do not want anyone else to do it again"
- zaikunzhang 3y agoDid you succeed in porting the code? It would not be easy according to my experience with PRIMA. I would be happy to learn if you have a GitHub repo of it. Thanks.
- ufocia 3y agoI could be wrong, but it sounded like Brentward1 was quoting/paraphrasing someone else.
- zaikunzhang 3y agoYes, Brentward1 was indee quoting me (author of PRIMA) in his second paragraph. However, I was asking about the code he tried to port during his graduate study mentioned in his first one.
- Brentward 3y agoYes, at least the parts that my research group used regularly. I ported them to Rust, though, not modern Fortran. They're also pretty specific to computational chemistry, rather than general packages like PRIMA, but I'll link them here in case you're curious anyway. I was also still learning Rust and followed the original Fortran API and naming scheme where possible, so this code could use a refactor too! But at least there are no gotos. https://github.com/ntBre/anpass https://github.com/ntBre/anpass - ordinary least squares fitting https://github.com/ntBre/intder https://github.com/ntBre/intder - internal coordinate transformations https://github.com/ntBre/spectro https://github.com/ntBre/spectro - vibrational perturbation theory PRIMA looks very interesting, by the way. I may see if I can get some use out of it in my research!
- zaikunzhang 3y agoGreat! Thank you for the links. I will be very glad if PRIMA turns out useful to you. This will compensate my time, effort, and energy spent.