8 ms·
Putting up two TL;DR filters right away: US citizens only, Fortran codebase :-/
by mynegation 10y ago
Putting up two TL;DR filters right away:
US citizens only, Fortran codebase :-/
- 52-6F-62 10y ago> US citizens only Big frown over here
- snovv_crash 10y agoHow about US expats?
- cbcoutinho 10y agoAre you still a US citizen?
- gravypod 10y agoThere is sadly a huge amount of Fortran code bases in science. Not old. Not left over libraries. Not software written for a bygone age. No... New software. Huge, mission critical, core project, software. The best part: No documentation, no maintainer, and no migration plan. Scientists think in terms of how Units of Science per Units of Work. Translating code, learning new languages, testing, checking correctness, software validation, bug testing, or even just using external (non-science) libraries yield a very low science/work ratio. Just opening a text editor, writing a language you already know, and calling it "good enough" is high science/work. Their method of software validation usually boils down to "spit out your data, graph it, and see if it looks like what you expect". There's also this notion that "Fortran is fast" that MANY people hold for some reason. They don't know about what kinds of modern compiler optimizations they're missing out on and what new IPC frameworks are available. They know Fortran is fast, MPI is parallel, and that's what they use. Right now I'm looking at a codebase that is actively being developed and is written in Fortran. It's about 48,466 lines in total. The source is about 2.3M in size. No one seems to have formula listings for it. I want to rewrite it but pulling apart fortran is very difficult. It's very scary that if I were to write the software in C that it would be seen as modern! This software is tax-payer funded and included in real time systems and production software. (On that note if anyone is good at Fortran and can document the formulas in this software so I can rewrite them I'd be happy! Please email me)
- DHermit 9y agoWhat makes you think that Fortran is not a modern language? And when writing scientific code which involves multidimensional matrices, Fortran is most of the time more readable than C, because you can do array slicing, use elemental functions over an array (like simply doing sin(a) where a is an array). Your whole post is just complaining about Fortran still beeing used, but you don't really explain why. The only point I can find is > The best part: No documentation, no maintainer, and no migration plan. which is in no way language specific. Have you looked at modern Fortran? You have object orientation, polymophism and even parallel features like coarrays (I have to admit that I never really used them, because the gcc support is somehow incomplete).
- goalieca 10y agoI used to think academic code was a hack fest. Then I entered industry. I would not be so quick to shit on scientists. They may not be language gurus writing with the latest idioms and toolkits but there is a lot of carefully analyzed and "correct" software.
- qb45 10y ago> There's also this notion that "Fortran is fast" that MANY people hold for some reason. They don't know about what kinds of modern compiler optimizations they're missing out on and what new IPC frameworks are available. Fortran is fast and has no reason to be worse than C. In fact, it may be easier to write compiler-friendly code in F thanks to "restrict by default". And are there really HPC-grade C compilers with whatever "modern optimizations" that don't come with a Fortran frontend? Don't think so. BTW, I have seen an attempt to rewrite a few dozen KLOC Fortran project to C and it wasn't pretty. The code was still a bunch of for loops crunching through a bunch of arrays, just in a different language, and then it had some new bugs that were introduced in translation and also it produced slightly different results because of different language rules, compiler and optimizations translating the same math formulas to different machine code. And the formulas were written to produce expected output when compiled with, you guessed it, Fortran. Don't get me wrong, the old-school Fortran with 3-letter variable names, 72 character columns, GOTOs and stuff sucks donkey balls. But you don't have to write like that - while I'm no real Fortran expert (sorry), I've heard that modern standards of Fortran are vastly better and look much closer to C. I would certainly research this before rewriting everything in C.
- walshemj 10y agoWhy for serious CFD / HPC Fortran is still the daddy