Slashdot Mirror


NASA Runs Competition To Help Make Old Fortran Code Faster (bbc.com)

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.

31 of 205 comments (clear)

  1. I had assumed Fortran was dead by Baron_Yam · · Score: 4, 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.

    1. Re:I had assumed Fortran was dead by nickol · · Score: 4, 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.

    2. Re:I had assumed Fortran was dead by slew · · Score: 2

      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)...

    3. Re:I had assumed Fortran was dead by mrchaotica · · Score: 2

      $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.

      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

  2. Re:What's the replacement for FORTRAN? by Baron_Yam · · Score: 4, 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.

  3. Did Dr. Evil think of this contest? by Waffle+Iron · · Score: 2

    "If you can make my simulation code run 10,000 faster, I'll give you Fifty Five Thousand dollars!"

    1. Re:Did Dr. Evil think of this contest? by abies · · Score: 4, 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 ;)

  4. Some ossible approaches by davidwr · · 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.

    --
    Knowledge is how to play a game, intelligence is how to win, wisdom is knowing what game to play.
    1. Re:Some ossible approaches by Tablizer · · Score: 3, Funny

      6. Split up the processing and run it on unsuspecting bot-netted PC's

  5. my dream by phantomfive · · Score: 5, Informative

    "This is the ultimate 'geek' dream assignment,"

    Actually it sounds like what I call "work."

    --
    "First they came for the slanderers and i said nothing."
    1. Re:my dream by Pascoea · · Score: 2

      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.

  6. Dammit! by Gravis+Zero · · Score: 2

    I entered the contest and made some modifications but it runs well over 10,000 times faster. Disqualified again! >:(

    --
    Anons need not reply. Questions end with a question mark.
  7. Re:What's the replacement for FORTRAN? by Pope+Raymond+Lama · · Score: 4, 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).

    --
    -><- no .sig is good sig.
  8. Re:What's the replacement for FORTRAN? by polgair · · 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.

  9. Re:algo, profile, assy by BostonPilot · · Score: 3, 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.

  10. Re:What's the replacement for FORTRAN? by HornWumpus · · Score: 4, 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.

    --
    John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
  11. Re:Ultimate 'geek' dream assignment? by HornWumpus · · Score: 3, Informative

    You don't know how tax brackets work. At least in the USA.

    --
    John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
  12. Re:What's the replacement for FORTRAN? by ShanghaiBill · · 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.

  13. Re:Fortran huh? by HornWumpus · · Score: 2

    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. Just understanding how the aero problem gets approximated to an LP would likely take longer than the contest duration though.

    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.

    --
    John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
  14. Re:FORTRAN jokes miss the point(er) by ShanghaiBill · · Score: 3, Informative

    Old FORTRAN's default statically allocated arrays are one less indirection to access.

    Also, FORTRAN does not allow pointer aliasing, 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.

  15. Sounds like NASA is looking for cheap labour by puppetman · · Score: 2

    $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.

  16. Re:What's the replacement for FORTRAN? by T.E.D. · · Score: 3, 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.

  17. Re:I feel . . . happy! by HornWumpus · · Score: 2

    Don't listen to him, he'll be stone dead in a minute.

    --
    John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
  18. Specs on the target machine: by Weaselmancer · · Score: 3, 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.

    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.

    --
    Weaselmancer
    rediculous.
  19. Re:Ultimate 'geek' dream assignment? by HornWumpus · · Score: 3, 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.

    --
    John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
  20. Re:Mommy, what's "Fortran"? by slew · · 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?

    The problem with FORTRAN was the punch card 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 language changed.

    Since the FUN3D project was started in the late '80s, it started in FORTRAN-77, but 2001 they converted to Fortran-90. The latest versions require a Fortran-2003 compiler

    The original punch-key machines of the day for punch-card FORTRAN didn't have lower case because the early cards didn't support it. On the other hand computer keyboards being essentially retasked electric typewriter keyboards generally supported lower case from the get go...

  21. Re:Ultimate 'geek' dream assignment? by xfizik · · Score: 2

    Yep, this problem has JavaScript written all over it.

  22. Re:Fortran huh? by HornWumpus · · Score: 3, 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.

    --
    John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
  23. Meh. US only by griffo · · 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.

  24. Re:Ultimate 'geek' dream assignment? by HornWumpus · · Score: 3

    You still don't know how tax brackets work.

    --
    John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
  25. Worst License Agreement Ever by Prien715 · · Score: 2

    When you try to download their software, you are taken to this page 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!

    --
    -- Political fascism requires a Fuhrer.