NASA Runs Competition To Help Make Old Fortran Code Faster (bbc.com) 205
NASA is seeking help from coders to speed up the software it uses to design experimental aircraft. From a report on BBC: It is running a competition that will share $55,000 between the top two people who can make its FUN3D software run up to 10,000 times faster. The FUN3D code is used to model how air flows around simulated aircraft in a supercomputer. The software was developed in the 1980s and is written in an older computer programming language called Fortran. "This is the ultimate 'geek' dream assignment," said Doug Rohn, head of NASA's transformative aeronautics concepts program that makes heavy use of the FUN3D code. In a statement, Mr Rohn said the software is used on the agency's Pleiades supercomputer to test early designs of futuristic aircraft. The software suite tests them using computational fluid dynamics, which make heavy use of complicated mathematical formulae and data structures to see how well the designs work.
What's the replacement for FORTRAN? (Score:2)
Re:What's the replacement for FORTRAN? (Score:5, Informative)
C++, but Fortran's pretty much the same for all but a few cases... where it's markedly better. Apparently it's also easier to learn and has a few other practical advantages.
So the answer is that there ISN'T a replacement yet. Fortran is the programming language of choice for large physics simulations at present.
Re: (Score:2)
Old FORTRAN's default statically allocated arrays are one less indirection to access.
Tiny change compared to what can be lost in 'simple' object access. Which can cause a context switch, worst case, modern crap used by the unaware.
In some C dialects '[' and ']' are just macros that expand into pointer math.
Re:FORTRAN jokes miss the point(er) (Score:4, Informative)
Old FORTRAN's default statically allocated arrays are one less indirection to access.
Also, FORTRAN does not allow pointer aliasing [wikipedia.org], so memory accesses can be cached in registers. That is a barrier to optimization in C/C++. C has the "restrict" keyword which helps, but it is rarely used and is not supported by old compilers.
Re: (Score:2)
You can do all kinds of things worse than 'pointer aliasing' in FORTRAN. Turn off array bounds checking and access neighboring structures etc. But if you do that, it's on you to understand your compiler, memory allocation/layout and hardware.
the C++ (Score:2)
Now it's like 'the AIDS' and 'the diabetes'!
Oh no, he's got 'the C++' on his resume, don't touch it.
Re: (Score:2)
COBOL will probably out live C#, even if COBOL programmers won't live that much longer.
Re: (Score:2)
COBOL will probably out live C#, even if COBOL programmers won't live that much longer.
A coworker told me that there's good money in COBOL, either programming COBOL on the mainframes or teaching COBOL programmers to program in C#. He did the latter until HP laid him off.
Re: (Score:2)
In the year 9997 everyone is going to start getting worried about the Y10K issue being the end of civilization as we switch over to five digit years. There will suddenly be a lot of short term COBOL work available.
Re: (Score:2)
Better start training your grandchildren in the ancient ways of COBOL
Re: (Score:2)
Re: (Score:3)
Don't listen to him, he'll be stone dead in a minute.
Re: (Score:2)
The obvious way to speed up this code is to identify the hotspots and rewrite them in OpenCL or CUDA. There are FORTRAN interfaces to both. Then the program can run on a GPU, or array of GPUs. That is the way that most other CFD programs work.
Re:What's the replacement for FORTRAN? (Score:5, Insightful)
They want a 10000 times speed up. They would not ask for such if the capability to do that was just lying on their hardware, idle. They either already have the GPU cores to make the calculations, and those are not in use - or they at least expect the same approach, but to make use of multiple-cores that are similarly idle. Otherwise asking for that kind of improvement is simply idiotic. (I think that for this price it is idiotic anyway, they should proper fund that thing).
Re:What's the replacement for FORTRAN? (Score:5, Insightful)
Jesus tits.
Both of you should google 'Pleiades supercomputer specs'. 100 nodes of 10,000 have GPUs. They are currently at near 100% utilization. The do have enough GPU equipped nodes for someone to prove the speedup and for them to start slapping in GPUs and upgraded power supplies.
Alternatively: Spin off the numeric parts to SSE. Use fixed point math routines.
Re: (Score:2)
How close do you think solvers get before they say 'close enough' to converged. These are all approximate solutions.
Re: (Score:2)
Re:What's the replacement for FORTRAN? (Score:5, Informative)
They want a 10000 times speed up.
To be fair, NASA did not say that. They said a 10 times speed up. They also said they are hoping that maybe it could be sped up even more, perhaps even by a factor of a thousand. So the journalist took the "10" and the "thousand" and multiplied them together. Then that inflated made-up number was copy-pasted into the summary.
Re:What's the replacement for FORTRAN? (Score:4, Informative)
Pleiades is just a slurm cluster. You can deploy new hardware, push your processes to be queued to the new hardware and link your run time to use cuda enabled libraries no problem.
Switching link time and link time hooks is pretty easy on Pleiades. It's the same way you would switch between python versions, different fortran run times (intel and gnu), different mpi runtimes (openmpi/sgi enabled stuff).
Source: worked on Advanced Vehicle Make and had to run cfd code on Pleiades.
Re: (Score:2)
I don't see the relationship between COBOL and C#. COBOL was very focused on data entry and reporting. C# has no such focus. Sure, it can do those things, but it is also really good at handling media and yes, even heavy math. If raw power is what's needed, C++ is probably a better option.
Re: (Score:2)
I don't see the relationship between COBOL and C#.
As pointed out in a different comment, I have a coworker who taught COBOL programmers how to use C# before HP laid him off. A quick search indicates that C# as a replacement and/or front-end for COBOL.
Re: (Score:2)
Re: (Score:2)
Re:What's the replacement for FORTRAN? (Score:4, Informative)
Where I work (we have tons of legacy Fortran code), generally C++. However, the real answer is not to bother. If you have a working Fortran compiler, the old code works just fine. "Porting" it to another language does nothing for you but potentially introduce new bugs. At best you'd just have the same functionality you did before (as that is the goal of a port), but we all know the best never happens. Why go through a really expensive effort that will do nothing for you but make your product worse?
However, we do all brand new work in C++, so it will slowly take over.
I suspect most COBOL houses will tell you the same vs C# (or Java or whatever your current language du-jour is).
What would you tell a mechanic who wants $400 to change your perfectly functional alternator with a new one that works exactly the same, but uses the latest in alternator technology, so mechanics will enjoy working on it more? I know I'd tell him if the old one breaks and can't be fixed, put a new one in. Otherwise, I have better uses for my $400, tyvm.
Re: (Score:2)
If your car has a mechanical voltage regulator and the car is for driving, not looking at, best to upgrade it. Keep the old one, purists will want it.
Points vs electronic ignition is the same.
Virtually all the 'off the shelf' FORTRAN and COBOL programs have been replaced, decades ago. What's left is custom.
Re: (Score:2)
Re: (Score:2)
"off the shelf" where the heck do you get off the shel COBOL programs!!
Library books. When I looked up computer programming books as a kid in the early 1980's, the local library only had books on financial accounting in COBOL. One book even described how to program punch cards.
Re: (Score:2)
Now they are. You think nobody sold standard, simple by today's standards, accounting packages, written in COBOL in 1965? Jesus titty fucking Christ.
You might even have heard of some of the companies that sold that software.
Re: (Score:2)
Fortran is the replacement (you know, those versions that standards groups approved after 1977) There is no need to replace with anything else.
I had assumed Fortran was dead (Score:5, Interesting)
But a bit of googling shows that there's still more than enough justification to call it the best programming language for physics simulations.
So... there will be Fortran programmers out there. I'd suspect, though, given that it's maintained a niche in high-end physics simulation, that anyone who would program in Fortran at the level required here currently has a job doing just that, and won't have time for a major side project with an unknown probability of paying off.
Re: (Score:2)
I suspect you're right. If NASA wants FORTRAN programmers capable of this kind of work, their best bet is to hire FORTRAN programmers capable of this kind of work. People with those skills are just sitting around idle hoping for a project to work on that may or may not pay.
Re:I had assumed Fortran was dead (Score:5, Interesting)
As an active Fortran programmer, I'd like to tell you that it is definitely NOT the best language for any task. It is old and also spoiled by multiple improvements. It has terrible syntax. It has entertaining semantics. And it has all these implementations also, which makes things even more interesting.
However it is not probable that someone will be able to increase the speed of the program 10000 times. For example, I recently took a Fortran program for 16-bit DOS, running in emulator (DOSBOX), and recompiled it under 64-bit Linux. This yielded speed increase of about 20 times. My personal record in this area is 200 times, but this was PL-SQL.
10000 times could be possible if they still use, for example, IBM PC for the program, and it will be rewritten for NVIDIA-CUDA or something parallel like this. But not for the same machine. Also the task description says that the requirement is 10-1000 times speedup.
Re: (Score:2)
or something parallel like this
Maybe they expect FUN3D to be parallelized for $55K. lol
Re: (Score:3)
or something parallel like this
Maybe they expect FUN3D to be parallelized for $55K. lol
Apparently, FUN3D is already paralyzed in performance (it is already parallelized)...
Actually, I think they expect someone to rework the numerical solving algorithm or distributed solver scheme for a mere chance at a $55K prize...
Basically, they are looking for some retired numerical solver guru with a lot of time on their hands and a chance for a few milliseconds in the spotlight (before being bribed and/or kidnapped by a foreign power and forced to give up the export controlled FUN3D source code)...
Re: (Score:3)
$55k is 1/3 - 1/2 of a year's pay for a programmer (outside of Silicon Valley, anyway). Is it that unreasonable to think that replacing a few inner loops with parallel algorithms couldn't be done by one programmer in four to six months?
I mean, maybe if it's a horrible rat's nest of cross-cutting side effects that requires rewriting the entire program, then sure, that could be a tall order. But if it doesn't require large-scale modifications of data structures and such it seems doable.
Re: (Score:2)
$55k is 1/3 - 1/2 of a year's pay for a programmer (outside of Silicon Valley, anyway).
Up to $55K, shared between the top two contestants.
I mean, maybe if it's a horrible rat's nest of cross-cutting side effects that requires rewriting the entire program, then sure, that could be a tall order.
Mid-1980s Fortran was F77 (with maybe some ANSI or DEC language extensions). It's gonna be pretty messy.
Re: (Score:2)
Re: (Score:2)
But a bit of googling shows that there's still more than enough justification to call it the best programming language for physics simulations.
Easiest != best
Let's just say I'm going to need a LOT of convincing on this one. I'm old enough to have actually studied computer programming in the 1980s and even then Fortran was dying. No doubt this was done in the days when you could program in whatever you wanted on whatever machine architecture was handy with no thought to having to support it in the future.
Re: (Score:2)
> I'm old enough to have actually studied computer programming in the 1980s
I'm a bit behind that. I was playing around with BASIC and LOGO on the C=64 around that time. And a bit of whatever SpenceBBS was coded in. I didn't study a programming language until the 1990s, and they put APL in front of me. (And that didn't stick, I remember nothing!)
Re: (Score:2)
Re: (Score:2)
Fortran gotos aren't so bad.
If you see: 'goto intvar' run away.
Ultimate 'geek' dream assignment? (Score:2)
VS
Given the popularity of Fortran these days amongst 'geeks' (whatever they mean by that), this challenge is essentially limited to people already working on it.
Re: (Score:2)
Re: (Score:2)
>they will have to do what they should have done years ago... Convert to a more modern language
For this type of task, Fortran is still the best choice. A quick bit of google research reveals that C++ is competitive, but still a runner-up.
Re: (Score:3)
Re: (Score:2)
There are a lot of programmers here who claim to be amazing geniuses, maybe they should spend a weekend and become FORTRAN experts and prove it.
Re: (Score:2)
A) If they couldn't do it more efficiently, how easy is it going to be to find 10,000 speedup?
B) The major potential for speed in modern days (compared the 80s) is parallelization......but that could involve a major rewrite that is not nearly worth the prize money offered. There must be a reason NASA hasn't
Re: (Score:2)
There must be a reason NASA hasn't done this themselves.
Peter Principle? This is a government agency we're talking about here.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Learning Fortran is trivial - 45 years ago it was a requirement for my MBA. Read the manual, wrote the required application, done in an afternoon.
Making it run 10000 times faster? not so simple...
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re:Ultimate 'geek' dream assignment? (Score:4, Informative)
You don't know how tax brackets work. At least in the USA.
Re: (Score:2)
be hit with the extra tax on everything you make for the year simply for taking on a side job
The only way this is true is if you change your W4 and over estimate a secondary income. Otherwise you just pay the tax on the award when you receive it.
Re:Ultimate 'geek' dream assignment? (Score:4)
You still don't know how tax brackets work.
Re:Ultimate 'geek' dream assignment? (Score:4, Informative)
When you cross into a new bracket, you don't pay that rate on all your income. Only the income above the cutoff.
Some payroll programs are _stupid_, it is possible to get a raise and see a smaller check. But at the end of the year, you get a bigger refund, all other things being equal.
Mommy, what's "Fortran"? (Score:2)
I understand, why BBC may want to explain, what FORTRAN is, but for Slashdot to spell it out reveals clumsy copy-pasting — and lousy editing.
What's with the "up to"? If I make it only twice faster, will I get anything? What if I make it 20,000 times faster — will my entry be disqualified for
Re: (Score:2)
https://en.wikipedia.org/wiki/Fortran
https://gcc.gnu.org/wiki/GFortran
https://software.intel.com/en-us/fortran-compilers
Re: (Score:2)
Actually, it is Fortran. Maybe it was FORTRAN when FUN3D was originally written, but now it's most certainly just Fortran.
Or FORTRAN because early keyboards couldn't do lowercase letters?
Re: (Score:3)
Actually, it is Fortran. Maybe it was FORTRAN when FUN3D was originally written, but now it's most certainly just Fortran.
Or FORTRAN because early keyboards couldn't do lowercase letters?
The problem with FORTRAN was the punch card [wikipedia.org] formats popular for FORTRAN was BCDIC which has no encoding for lower case and the machine FORTRAN was designed for (IBM704) used a 6-bit BCD code (6 of which were packed into a 36-bit word).
The FORTRAN-77 language still required UPPERCASE keywords, but most compilers (including ratfor) accepted lower-case keywords, but by Fortran-90, lower-case keywords were officially supported and thus in tribute to that long awaited change, the official capitalization of the l
Re: (Score:2)
If we go by the colloquial whims of the day, we'd start spelling "you are" as "your" and "ur" and believe that humans — uniquely among mammals — have not two, but 71 sexes [telegraph.co.uk]...
No, it is FORTRAN... As in FORmula TRANslator.
Re: (Score:2)
No, it's Fortran. FORTRAN and Fortran refer to different specifications of the language (FORTRAN being the original).
Re: (Score:2)
Re: (Score:2)
$55K to rewrite a CFD package? (Score:2)
Hahahahahahaha.
What compiler is used on Pleiades?
Did Dr. Evil think of this contest? (Score:3)
"If you can make my simulation code run 10,000 faster, I'll give you Fifty Five Thousand dollars!"
Re: (Score:2)
Re: (Score:2)
Not $55k, half of that. You have to share it with someone else.
Actually, you have to share it with several someone elses....
A prize purse of up to $55,000 will be distributed among first and second finishers in two categories.
and the US treasury (they always share in the wealth)...
Re:Did Dr. Evil think of this contest? (Score:5, Funny)
That's big money in the 3rd world.
From TFA:
"The sensitive nature of the code means the competition is only open to US citizens who are over 18. "
Unless, by 3rd world, you meant Alabama ;)
Re: (Score:2)
That's big money in the 3rd world. It's partly why Americans win fewer international programming contests: the prize means less in USA dollars.
And what about the part that states that all participants must be American?
Anyway, for me it could be a little bit more money than it is in the U.S., but ti still would hardly pay the expenses to work on this - if done as a contract. As a lottery thing, this is simply a no-no.
Some ossible approaches (Score:3, Insightful)
1. Run it on better hardware.
2. Re-write the compiler to optimize this code in the best way possible.
3. Re-write the code so it provides optimal input to the compiler.
4. Come up with a new algorithm.
5 and beyond: Left as an exercise to the reader.
Assuming any improvements from #1 and #2 don't "count" for this contest, that leaves you with 3 and 4.
Unless the code is brain-dead there is no way you'll get anywhere close to 10,000 improvement JUST by #3. You MIGHT get it with a combination of #3 and #1 and/or #2 vs. just #1 and #2 alone. That is to say, changes in hardware and compilers may give an opportunity to re-factor the code to get huge improvements vs. un-modified code on new compilers and new hardware.
The big win will be in #4, but only if there are better algorithms out there or someone can come up with one. As with re-factoring the code, changes in hardware and corresponding changes in compilers may turn an algorithm that was inefficient in the 1980s into something that is best-in-class today.
5 and beyond are open-ended and the sky is the limit.
Re: (Score:3, Funny)
6. Split up the processing and run it on unsuspecting bot-netted PC's
Re: (Score:2)
my dream (Score:5, Informative)
"This is the ultimate 'geek' dream assignment,"
Actually it sounds like what I call "work."
Re: (Score:2)
I read an article recently that said there are a few people who make a living wage out there just entering competition ... it's work, but it's work where you can pick and choose what you want to take a stab at, and don't have to deal with people telling you how to do your job & changing requirements as the project drags on. ... but you have to be good at it, or you don't get paid for anything.
And I know that people have worked CUDA support into IDL (Interactive Data Language), and IDL reminds me a hell
Re: (Score:2)
Re: (Score:3)
Actually it sounds like what I call "work."
That's kind of what I was thinking. It's not what I do for a living, but if it was I think I'd be charging more than $55,000 to do it.
Dammit! (Score:3)
I entered the contest and made some modifications but it runs well over 10,000 times faster. Disqualified again! >:(
Publicity plus recruiting tool (Score:2)
Compilers? Code refactorization? Programmers? C? (Score:2)
One, is a better compiler with machine code optimizations that lead to (average) faster code execution.
Two, automated source code analysis, refactorization and optimization.
Three, hire better programmers, provided that Fortran can allow for higher effectiveness.
Four, move to a language that can take advantage of multithreading. Like Fortran 2008+ or, better, C.
Re: (Score:2)
Re: (Score:2)
Sounds like NASA is looking for cheap labour (Score:3)
$55,000 is much cheaper than hiring developers to do it. It's akin to companies having a contest for a new marketing logo, and the winner get's their work used. The compensation is a line on a resume.
Specs on the target machine: (Score:4, Insightful)
System Architecture
Manufacturer: SGI
161 racks (11,472 nodes)
7.25 Pflop/s peak cluster
5.95 Pflop/s LINPACK rating (#13 on November 2016 TOP500 list)
175 Tflop/s HPCG rating (#9 on November 2016 HPCG list)
Total CPU cores: 246,048
Total memory: 938 TB
2 racks (64 nodes total) enhanced with NVIDIA graphics processing units (GPUs)
184,320 CUDA cores
0.275 Pflop/s total
1 rack (32 nodes total) enhanced with Intel Xeon Phi co-processors (MICs)
3,840 MIC cores
0.064 Pflop/s total
Operating Environment
Operating system: SUSE® Linux®
Job scheduler: Altair PBS Professional®
Compilers: Intel and GNU C, C++ and Fortran
MPI: SGI MPT
Full specs here. [nasa.gov]
Sounds like stone soup to me. CUDA cores, Phi coprocessors, SGI interconnects, Linux OS because nothing else in the whole wide world could talk to all of that...
Ick. Keep your prize money.
Processing Power (Score:2)
In 1986 the state-of-the-art CPU generation was the i386 (other Motorola and other makers had similarly-powered CPUs available), but it was new and the i286 was much more common. The Pentium 200's were about 79x faster than those [karbosguide.com] (based on the popular NSI). After that, the improvements were mostly in clock rate, with the latest I7's clocking the CPU roughly 20x faster than the Pentium 200.
So that means CPU-bound Fortran code should be executing roughly 1600x faster just by recompiling it on an I7. That's
Re: (Score:2)
The solution is obvious (Score:2)
Meh. US only (Score:2)
I thought: ah, a fun challenge.
Then I read the last sentence in the BBC article:
>The sensitive nature of the code means the competition is only open to US citizens who are over 18.
They just don't get it.
Worst License Agreement Ever (Score:3)
When you try to download their software, you are taken to this page [nasa.gov] which at the bottom contains the follow text:
By accessing and using this computer system, you are consenting to system monitoring, including the monitoring of keystrokes. Unauthorized use of, or access to, this computer system may subject you to disciplinary action and criminal prosecution. [emphasis mine]
A keylogger for using your website? Microsoft hasn't even thought of that yet!
Re: (Score:2)
Which NASA's management still doesn't understand, those perennial idiots with their failure to go metric
Huh? What are you talking about? I'm not sure what they did back in the Apollo days, but they've been all-metric for some time now at least. If you're talking about that failed Mars lander mission, that was the fault of some stupid defense contractor they got some data from. NASA's failure was in not verifying the units of the data, but the contractor was also at fault for not providing any kind of un
Re: (Score:2)
Wake up, sheeple! (Score:2)
The 10,000 times faster is this clearly unattainable goal, but just like the NP-Complete problems used in cryptography, no one knows for sure if P == NP or if there is some clever hack.
If you submit a solution anywhere near a 10,000 speedup, these guys with HKs wearing Ninja suits will come to your house, slap a bag over your head, and you will wake up on this island where you will be assigned a number and where this menacing beach-ball device will prevent you from ever returning home.
Re: (Score:2)
If I remember correctly, nobody actually managed to prove that any of the cryptographic problems in use today are NP complete.
Re:algo, profile, assy (Score:4, Interesting)
Um, towards the bottom of the article it mentions "10 times faster" which is probably achievable and probably what they actually are looking for. They even mention that rewriting an inner loop, shaving a few milliseconds off will give a substantial speed increase.
Way back I worked at Alliant Computer Systems (https://en.wikipedia.org/wiki/Alliant_Computer_Systems) which was a hardware/software system that would automatically unroll loops in Fortran code and run them in parallel on up to 8 processors at a time (and each of the 8 also had vector hardware). It was very fast on the right Fortran code... Hardware support for concurrency control when one iteration of the loop depended on a computation from another iteration. All done in custom hardware which was killed (like many supercomputer companies) by the advent of high performance microprocessors.
Re: (Score:3)
WTF is up with slashdot?
Not even a link to the actual contest page. Not that anybody in their right mind would touch it, I might signup. Just to look at how bad it was, perhaps to laugh/cry a little. Bet I've seen worse. Bet it doesn't use calculated GOTOs (Fortran 'feature' Goto IntVar, where IntVar contains a line number).
I bet hidden at the bottom is a linear problem (LP) solver that bangs on sub simulations, getting those results to converge across cells faster would be another trick worth trying.
Re: (Score:2)
A lot of work has already been done on this. My college roommate twentymumble years ago worked on a sizable project to accelerate FORTRAN for parallel processing during his senior year, and lots of effort went into that project back then.
Re: (Score:2)
This whole contest is bait for the retired old bastards that wrote the thing in the first place. They think one of them might have a trick or two, still up his sleeve.
Are you suggesting that the original authors wrote the code up to 10,000 times slower than they were capable of?
"You know that job you did? Do it again, only better this time. You could win a shiny!"
Re:Fortran huh? (Score:4, Insightful)
Sometimes, years after you finish a job (that you never really liked the solution to) a better solution comes to you.
Also: In the 1980s they didn't have a 10,000 node cluster, Multicore CPUs, SSI, Nvidia, ASICs, FPGAs or Gigabytes of RAM. They barely had math coprocessors and blitters.
If at the end of a job, you don't know how to do a it better, that proves you haven't learned anything since you started.