Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
NASA Programming

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.
This discussion has been archived. No new comments can be posted.

NASA Runs Competition To Help Make Old Fortran Code Faster

Comments Filter:
  • If this was written in COBOL, the replacement code would be in C#.
    • by Baron_Yam ( 643147 ) on Thursday May 04, 2017 @11:12AM (#54354933)

      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.

    • COBOL will probably out live C#, even if COBOL programmers won't live that much longer.

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

      • In the year 9995, I will begin seriously brushing up on my COBOL.

        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.
      • Wait...who's using C#.....
    • 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.

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

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

      • Comment removed based on user account deletion
    • by T.E.D. ( 34228 ) on Thursday May 04, 2017 @12:53PM (#54355671)

      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.

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

        • "off the shelf" where the heck do you get off the shel COBOL programs!! They're all custom apps. Jesus tap dancing Christ.
          • "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.

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

    • Fortran is the replacement (you know, those versions that standards groups approved after 1977) There is no need to replace with anything else.

  • by Baron_Yam ( 643147 ) on Thursday May 04, 2017 @11:09AM (#54354901)

    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.

    • by gnick ( 1211984 )

      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.

    • by nickol ( 208154 ) on Thursday May 04, 2017 @11:40AM (#54355125)

      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.

      • by Nutria ( 679911 )

        or something parallel like this

        Maybe they expect FUN3D to be parallelized for $55K. lol

        • by slew ( 2918 )

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

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

          • by Nutria ( 679911 )

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

      • Maybe they are looking for people to improve on the routines because you know someone might have a better way of writing a routine or they may find redundant code.
    • 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.

      • > 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!)

    • There are vector extensions for c that make it just as fast. There isn't any reason to use Fortran any more.
  • “This is the ultimate ‘geek’ dream assignment

    VS

    [the software] has strict export restrictions requiring all challenge participants to be U.S. citizens over the age of 18.

    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.

    • NASA will realize this when only four people show up to the competition. Then they will have to do what they should have done years ago... Convert to a more modern language.
      • >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.

      • by xfizik ( 3491039 )
        Yep, this problem has JavaScript written all over it.
    • 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.

      • It's not even a matter of becoming a genius.....the real question is whether it's so easy to write code more efficiently than the original programmers from the 80s, who lived and breathed efficiency.

        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
        • There must be a reason NASA hasn't done this themselves.

          Peter Principle? This is a government agency we're talking about here.

        • So the assumption is the programmers who wrote this code where so perfect it's not possible to improve upon it nor is it likely there are bugs or inefficiencies in the code. Wow. Given human nature, I would assume there's room for improvement in the code.
      • 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...

        • Agreed. This is the sort of problem that probably requires understanding the software and coming up with new algorithms that are much faster but still give the same results. Not something that's likely to be done in a weekend.
    • In our company there are many gray beards with specialized FORTRAN software, no one in our company which is filled with engineers, mathematicians, and programmers has volunteered to modernize this software. In fact it's a running joke that updating that software would be used as a method to get the person to leave the company in stead of firing them.
    • You mean like physicists and engineers. Yeah they're really worried *eye roll*
  • The software was developed in the 1980s and is written in an older computer programming language called Fortran.

    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.

    $55,000 between the top two people who can make its FUN3D software run up to 10,000 times faster

    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

    • by xfizik ( 3491039 )
      Actually, it is Fortran. Maybe it was FORTRAN when FUN3D was originally written, but now it's most certainly just Fortran.
      https://en.wikipedia.org/wiki/Fortran
      https://gcc.gnu.org/wiki/GFortran
      https://software.intel.com/en-us/fortran-compilers
      • 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?

        • by slew ( 2918 )

          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

      • by mi ( 197448 )

        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.

        • No, it's Fortran. FORTRAN and Fortran refer to different specifications of the language (FORTRAN being the original).

        • by xfizik ( 3491039 )
          Fortran is not a colloquial whim, it's the official form used by the ANSI specification of the Fortran programming language. The last ANSI specification using FORTRAN was FORTRAN 77. It's 2017 in case you haven't noticed.
    • Clumsy copy-pasting? From msmash? Impossible!
  • Hahahahahahaha.

    What compiler is used on Pleiades?

  • by Waffle Iron ( 339739 ) on Thursday May 04, 2017 @11:12AM (#54354941)

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

    • Not $55k, half of that. You have to share it with someone else.
      • by slew ( 2918 )

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

  • by davidwr ( 791652 ) on Thursday May 04, 2017 @11:17AM (#54354977) Homepage Journal

    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.

  • my dream (Score:5, Informative)

    by phantomfive ( 622387 ) on Thursday May 04, 2017 @11:20AM (#54355007) Journal

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

    Actually it sounds like what I call "work."

    • 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

    • I would love it if this were what I did for "work". Instead of working on projects where performance and scalability are complete afterthoughts.
    • by Pascoea ( 968200 )

      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.

  • by Gravis Zero ( 934156 ) on Thursday May 04, 2017 @11:24AM (#54355037)

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

  • Fortran has been a staple of high performance computing applications for decades and will continue as such. As such, there are several off the shelf tools available for profiling, optimization and vectorization, many from the vendor that includes architecture dependency. This task is something that normally would be better accomplished in-house, but also makes a clever and probably lower cost recruiting tool.
  • I am not a Fortran programmer, but I know how to make some code run faster (on the very same hardware).
    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.
  • Comment removed based on user account deletion
  • $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.

  • by Weaselmancer ( 533834 ) on Thursday May 04, 2017 @01:03PM (#54355731)

    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.

  • 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

  • Porting this creaky code to node.js running in Docker should give at least a 10x performance boost.
  • 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.

  • 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!

Business is a good game -- lots of competition and minimum of rules. You keep score with money. -- Nolan Bushnell, founder of Atari

Working...