125 points · by happy-go-lucky · 9y ago · 89 comments
Edit: on the other hand graduate students and postdocs are notoriously underpaid and often have a lot of freedom in how they spend their summer time. I guess that is the target competitor pool?
With this sort of code you also tune it to the machine architecture back when I did F77 for BT / Dialcom the code was tweaked to suit the PR!ME Architecture to get extra speed
i've heard people refer to c90 as modern before.. (in the last two years) and the nasa/astronomy guys are famously clingy to 'known good' tech from the olden days.
only the very most recent astronomical dataset i acquired was in .csv. everything is made for fortran from what i've seen over the last 10 years...
Not quite, the submission deadline is already in 8 weeks. And before you see any code, you need to go through their approval process, which they say takes several weeks. So you only have maybe 4 to 6 weeks to get the actual work done...
That same organizer is now gnashing their teeth, realizing full well how the organization extracted all the value out of that 2-year grant just forcing the proposal through (the money no doubt expires on 30 September but NASA bean counters no doubt refuse to cut checks after 31 August, or maybe even 31 July).
A hundred GS-7 employees, with an average education of a high school graduate, extracted the value of this poor bastard's grant with dozens of crappy PDF Standard Forms, emailed to distribution group of idiots and revised a dozen times each, and no, we can't even consider Form 2 until the President of these United States himself has signed off on Form 1.
I gotta tell ya boys, working for the Government sucks, but if you don't start stepping up, you're going to find your government, complete with nuclear weapons and responsibility for your clean water and bridge safety, is totally run by complete idiots.
i do not see this opinion espoused, nor lived by often enough today.
kudos.
This is not at all ready for a competition. The least they could do, if they want professional volunteer help, is to open-source the platform that everyone would be deploying on. It was probably built using public money, after all.
Sigh, no shame:
> FUN3D is: Code developed by the US Government at US taxpayer expense, ...
I'm also somewhat amused by the claim they expect a 1000x performance improvement.
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)
Compared to C or C++ it has the advantages of better complex floating point number support and better control of reproducible math results. And there is better possibility for compiler optimisation because the langauge semantics let the compiler know one array will not alias another.
Compared to Java, C#, or Python, or any other JVM language, it has the advantage of compiling to machine code for every relevant supercomputer and cluster architecture.
And all of the well-tested high performance computing libraries are written in or support Fortran. The ecosystem is there.
Don't assume things are done purely by inertia -- for big projects there are real reasons for the choices made!
No it does not have better complex types. C++11 added std::complex which is a standardized implementation of complex types for all data sizes.
> And there is better possibility for compiler optimisation because the langauge semantics let the compiler know one array will not alias another.
These optimizations will only ever be made if Fortran has wide adoption.
These optimizations are probably already done in GCC/Clang. Fortran also misses out on a HUGE optimization that can be provided by the existence of explicit inlining from C/C++ and implicit optimizations from things like C++/Rust. There's also constexpr from C++ which, in C++17, will offer huge benefits to non-trivial code.
Most formulas can be expressed as an inline function or constexpr and as a result can, in some cases, see huge performance improvements from compiler optimizations.
> Compared to Java, C#, or Python, or any other JVM language, it has the advantage of compiling to machine code for every relevant supercomputer and cluster architecture.
You can do this with Python. Or you could juse use Julia which is built for clustered environments, performance, IPC & machine-to-machine communication.
> And all of the well-tested high performance computing libraties are written in or support Fortran. The ecosystem is there.
So is with most of these languages. C++ is just as developed in this aspect, Julia is getting there but it's already ready for most applications.
> Don't assume things are done purely by inertia -- for big projects there are real reasons for the choices made!
I'm not. I'm assuming these decisions are made because people in physics/ME/chemistry are not programmers and don't know about the latest and greatest our field has to offer. It's our fault for not advertising our successes to these people.
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.
Finding developers and maintainability. Those are two reasons.
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).
Hint supersonic 1:1 wind tunnel time is very expensive so do you want to spent millions to which is why NASA uses CFD rewriting every thing in C++ would require a lot of back testing
Big frown over here
Just optimize our old code, and we'll pay peanuts! If you win, that is.
We were going to hire someone to shephard the old code, but why bother when you geeks will do it for nearly free because it's so cool!!!
OK I have my cynical hat on, and I can't really blame them for trying a cost-effective approach, but is this the future of work?
> is this the future of work?
Not just the future: many people have contributed to open source projects that have ended up being used in commercial projects, and never received any payment for their work.
I'll pass, but hopefully someone else can do this as a labor of love.
Yes, except you are not allowed to run the software on their cluster, instead you are expected to run it on your own machine.
Is it really from NASA? Are they lacking HPC programmers? Or any one knows HPC? Either their code is really bad such that optimizing on your home commodity computer is enough to get it run faster, or they are just making fun of it.
Even if the code gets much faster with their aging clusters, it wouldn't necessary be any better with skylake or knights landing.
I'm wondering if maybe NASA would be better off over the long term, if they ported their models to a more accessible platform. It sounds like they are having trouble hiring people who can work on their current stack.
The difference here is that this is a solver, not a library. So it is focused on a specific set of PDEs, by doing so you can apply optimizations that are specific to this PDEs and the space representation that it uses, this optimizations are not general to the underlying method of solution (which can actually be a combination of methods), so it will be extremely hard for this generic libraries to compete in performance with a focused solver.
Each generation has brought different optimisations, tweaked instruction sets, and performance characteristics. You'll have to optimise for the most common scenario.
> To catch integration errors, the suite of codes are repeatedly checked-out around the clock from our central repository, compiled, and several hundred regression and unit tests are run. Email and cell phone SMS provide instant notification of any errors.
also their us government tie... this is just a coded message for me that i am not welcome because i am too arabic. at least at first glance. probably its not but this is my experience of trying to do anything involving america in the last several years (i can't speak about the trump administration - but i doubt they are more arab friendly given the bad press).