12 ms·
The skills gap for Fortran looms large in HPC
- dpflan 4y agoCould LLMs help here to translate between programming languages? Same with COBOL. Is a coding assistant the way to get legacy systems updated -- sounds like a consulting niche.
- culopatin 4y agoCould but who’s going to verify that they are not just feeding them garbage?
- humanrebar 4y agoThis is the right answer. Almost always in manual translation processes, there are questions about intent, either ambiguities in the original source (is this a big or do we keep it?) or clarifications in project planning (this code is unused... should we leave it out?). How does an AI know to surface those concerns?
- buescher 4y agoWe'll sure find out, because there's no way to keep people from it.
- rpep 4y agoThere have been automatic translators from Fortran to C for many years, but they don’t product idiomatic C code.
- Loic 4y agoFor Fortran, it is really a niche. This is a part of what I am doing for a living. For the first time, I proposed my service on the traditional "who is hiring/looking for work/freelancer" to see if some people reacted to it because of a previous discussion about this report[0]. For the moment nothing, I am not really surprised. It is quite a lot of you know someone who... kind of niche. To port or upgrade some scientific code from Fortran to a new language, you need to have some minimal, some times extensive, domain knowledge, Fortran knowledge and target language knowledge. It is hard to find the right persons, with not that many persons, you do not want to start a big migration and lose the head developer on the way, etc. This is why if you read in the report and the forums, what people want is to "reboot" the community/ecosystem and put new life in it. But this is also hard if the ecosystem starts to fossilize. I love and really enjoy working in Fortran, but as a paradox, because of the mentioned situation, it is not that easy to find Fortran work. [0]: https://news.ycombinator.com/item?id=35738763 https://news.ycombinator.com/item?id=35738763
- jerf 4y agoI doubt it. Non-idiomatic translation is already covered by compiler-based technologies that already exist and are off-the-shelf. Idiomatic translation would require an LLM that could ingest large chunks of the code base; it is not sufficient to translate one function at a time (which is, again, a solved problem), and LLMs have scaling problems still as you go up. And, this is code, not human language. It doesn't take very many small mistakes where the code did this one obscure thing, but the LLM thought it was a more popular thing, before the whole translation is worthless. In my playing with ChatGPT if you deliberately bait it with code that looks like some really popular task but it's actually doing another, it is very strongly attracted to the popular thing. An AI that uses LLMs but is more than just an LLM, maybe.
- rpep 4y agoNone of this is particularly surprising. I think there are a multitude of factors: * Universities are teaching Python more than ever. When I started my undergrad in Physics everyone took C++, by the time I graduated it was all Python. * Academia as a career track is not stable so people want to write code in something that they might have a hope of getting a job in afterwards. C/C++ are much more applicable in the wider world so anyone with one eye on the exit is likely to prefer one of those… * Fortran itself is fine and even improving with fpm and the ecosystem changes happening, but the big Fortran scientific code bases are not much fun to work on. * There’s no performance benefit to sticking with Fortran. You can make code fast in any language. The main argument that Fortran is faster than C/C++ is to do with aliasing which anyone writing performance critical code will know how to deal with anyway. Performance portability codes like Kokkos that let you run on OpenMP/MPI/CUDA but write code once are pretty much all C++ too. * A few years ago, CUDA could only be used in Fortran with the PGI compiler which was commercial. This made it less attractive vs C/C++. This has improved now but it was a major factor for a few years. Even now I think they’re not at feature parity although it’s been a long time since I looked.
- MichaelZuo 4y ago> * There’s no performance benefit to sticking with Fortran. You can make code fast in any language. The main argument that Fortran is faster than C/C++ is to do with aliasing which anyone writing performance critical code will know how to deal with anyway. Performance portability codes like Kokkos that let you run on OpenMP/MPI/CUDA but write code once are pretty much all C++ too. Nonsense, any physics PhD student could write meaningful Fortran code over a weekend that's significantly faster then all but the most optimized C code. And even then there might still be a small gap. It's a huge difference in skill-required effort and hours-spent effort, maybe as high as 100 to 1.
- 11101010001100 4y agoThis was certainly the case while I was a grad student.
- mhh__ 4y ago
- krastanov 4y agoI would expect that most HPC programmers can learn Fortran or Cobol in a week or two. They are reasonably small languages, and Fortran would be sufficiently familiar to people who have both C/C++ with Matlab/Julia experience (typical for HPC). Would it be more proper to say it is not a skill gap, rather a "desire to work with old codebases" gap. Which the article does admit: > The skills issue with Fortran is apparently not just about learning Fortran, but more about being associated with Fortran and all of the legacy baggage that has given its vintage and its low marketability going forward.
- khrbrt 4y agoI learned Fortran back in 2016 for a HPC course. It was indeed quick to learn but the resources online at the time for understanding compiler and runtime errors were scant compared to more popular languages. I mostly referenced pdfs of old books, and course notes scattered across various academic pages of ~vintage for learning the language and had sparse SO answers for help with gfc errors. This quote from the article rings true to me: >First, the lack of a standard library, a common resource in modern programming languages, makes mundane general-purpose programming tasks difficult. Second, building and distributing Fortran software has been relatively difficult, especially for newcomers to the language. Third, Fortran does not have a community maintained compiler like Python, Rust or Julia has, that can be used for prototyping new features and is used by the community as a basis for writing tools related to the language. Finally, Fortran has not had a prominent dedicated website – an essential element for new users to discover Fortran, learn about it, and get help from other Fortran programmers.
- hecanjog 4y agoThe folks behind https://fortran-lang.org https://fortran-lang.org have been working on many of these issues.
- jamesfinlayson 4y agoI wonder what the driver was? Anyway, first release of Fortran Package Manager was in November 2020: https://github.com/fortran-lang/fpm/releases/tag/v0.1.0 https://github.com/fortran-lang/fpm/releases/tag/v0.1.0 - more recently than I expected.
- jmclnx 4y ago>The nerds all learned to program Fortran, which was two years younger than COBOL A typo ? I thought FORTRAN was a bit older than COBOL :) Anyway, i very nice article.
- medler 4y agoGood catch! Fortran had, somewhat famously, the first optimizing compiler and the first commercially available compiler. My rule of thumb is that if I’ve heard of it it probably came after Fortran.
- unixhero 4y agoRPG is almost as old as Fortran and is still in use!
- ewgoforth 4y agoFortran (1957) is older than RPG (1959)
- RugnirViking 4y agothat is what the parent said.
- unixhero 4y agoRPG (1959) is almost as old as Fortran and is still in use! https://en.m.wikipedia.org/wiki/IBM_RPG https://en.m.wikipedia.org/wiki/IBM_RPG
- greenyoda 4y agoSo is Lisp (released 1960; development began in 1958): https://en.wikipedia.org/wiki/Lisp_(programming_language) https://en.wikipedia.org/wiki/Lisp_(programming_language) Interestingly, Lisp and Fortran were both initially implemented on the same vacuum-tube based computer, the IBM 704: https://en.wikipedia.org/wiki/IBM_704#Landmarks https://en.wikipedia.org/wiki/IBM_704#Landmarks
- sampo 4y ago> The good news for some HPC simulations and models, both inside of the National Nuclear Security Administration program at the DOE and in the HPC community at large, is that many large-scale physics codes have been rewritten or coded from scratch in C++ When C++ one day goes out of fashion, like Fortran already has, this will turn out to be bad news. Fortran is not a big language, and any programmer can learn Fortran in a matter of weeks. But if you'd need to teach people C++ just so that they'd be able to maintain a legacy code base, that will be considerably more difficult than with Fortran.
- humanrebar 4y agoProbably in a thousand years nobody will be writing C++. In one year, there will still be a helluva lot of C++, including new projects. Point being, the premise of your argument isn't granted. Is C++ going away soon? Or is it holding steady and even growing? How can someone objectively know either way?
- moregrist 4y agoIt’s hard to predict much about 10 years out, let alone 1000. But we keep expecting languages like COBOL and MUMPS to die, and they keep living on. I think there’s a almost 100% chance that 1000 years from now, when all that’s left of human civilization is a bunch of bots trading hustle culture spam and culture war arguments on a zombie internet, that the whole thing will still run on some mission critical code written in C. Buggy, unsafe, but mission critical and hard to replace. And of course there will be heated bot arguments about how it should all be scrapped and rewritten in Rust++.
- Aeolos 4y agoIf AI maintains a decent rate of advancement, it will eventually become possible to just ask an AI to... rewrite it in a different language. You can already give GPT a decent-sized chunk of C code and ask it to rewrite it in, say, Rust, and it works with some rate of success. For the last 50 years, this was impossible to do in a generic way. In the last 6 months, we managed to move the needle from impossible to possible. Give it another 12000 months, and what are the chances this would not move towards "trivial"?
- Bostonian 4y agoPrevious thread about the same report, with 71 comments: https://news.ycombinator.com/item?id=35738763 https://news.ycombinator.com/item?id=35738763
- rbanffy 4y agoFun to think that the two least sexy programming languages, COBOL and FORTRAN, run on the sexiest computers ever built. Code has an almost surreal longevity.
- petschge 4y agoIf you work on supercomputers they feel a lot less sexy. As the old quote goes "supercomputers are devices to turn compute bound problems into IO bound problems". So you spend a lot of time fighting IO. (And thinking about memory movements.)
- rbanffy 4y agoI miss the Seymour Cray designs as well.
- green-salt 4y agoI called it "sysadmin by committee" because the decisions were made for the cluster were usually made by someone else who didn't know what they were doing.
- Melatonic 4y agoI would argue Mainframes (modern ones) may actually be the sexiest but your point still stands!
- rbanffy 4y agoI think that too. They are a lot more interesting than the brute force of a modern supercomputer. But, then, imagine an HPC parallel sysplex of a thousand five-drawer z16's filled to the gills with Nvidia GPUs for the number crunching.
- nologic01 4y agoIn retrospect there is no particular reason why the "two-language" approach of Python to numerically intensive computations should not have been primarily in Fortran rather than C/C++. A Python/Fortran combination would have made the development of high-performing HPC type applications more accessible to scientists, more fun, and would have given Fortran a more secure future. The decisions or non-decisions, the culture and approach to community etc of key stakeholders of language ecosystems do have implications.
- ghc 4y ago> A Python/Fortran combination would have made the development of high-performing HPC type applications more accessible to scientists, more fun, and would have given Fortran a more secure future. SciPy makes heavy use of Fortran. Numpy uses Fortran (but it's optional). f2py compiles fortran into python modules with little fuss. Python's ctypes module can directly call fortran libraries. But to say Python should have been implemented in Fortran rather than C to enable Fortran interop by default -- that doesn't make sense. Python was designed as a scripting language for C-based operating systems, so it needed to be able to use pre-build unix libraries written in C, and it also needed to be embeddable in C programs. At the time neither of these things was easy via Fortran (cpython predates the Fortran 90 standard).
- nologic01 4y agoCython got started in 2007. F90 was very mature by then. In any case its not a binary choice C vs Fortran, and definitely not about a Fortran implementation of Python itself. It is about the ease of integrating performant bits written in something other than C/C++, not by HPC specialists but domain scientists. The examples you mention show that this is possible but its not what people have been doing in the broader data science area. There might be other benefits for adopting C++ instead of F90 as the computing layer but overall it might have been a missed opportunity.
- ghc 4y agoCython is not cpython. cpython started in 1990. Edit: In case you're confused, cpython is the de-facto standard implementation of Python. Cython is something entirely different (it compiles Python to C). Here's a good summary of Python's history: https://www.geeksforgeeks.org/history-of-python/ https://www.geeksforgeeks.org/history-of-python/.
- giantg2 4y agoThis shouldn't really be a problem. Everyone always says that a good programmer can learn a new language - the concepts are universal, it's just syntax. The real problem is that no company wants to train and they all expect experts on day one. Even if one company was willing to train, the employee would be SoL when searching for a new job since no other company wants to train. I'm starting to think that replacing a bachelor requirement for most dev jobs with an associate degree followed by an apprenticeship would be better and cheaper. Perhaps an industry-wide union setting career development paths would be (marginally) better than what we have today, at least for people just starting out or switching jobs.
- Melatonic 4y agoAgreed
- the_only_law 4y ago> I'm starting to think that replacing a bachelor requirement for most dev jobs with an associate degree followed by an apprenticeship would be better and cheaper. I was looking into applying to a job at a national lab. Not anything crazy, no HPC or scientific programming, just back office enterprise crap, but they seemed so intent on wanting a degree. I’m not sure places like that in particular that are primarily seen a “scientific” organizations will be willing to ignore credentialism.
- alfalfasprout 4y agoMaybe I've worked in big tech and finance too long but most good companies (excluding companies looking specifically for C++ expertise) assume you're able to pick up whatever languages you need. Coding is the easy part of software engineering. With that said, there's obviously a gap between folks that are mainly just programming vs. folks that are engineering systems. And both personas have been lumped in together. The fundamentals that a good CS, math, and stats education teach you are invaluable when you actually have to build things that scale or work on difficult problems.
- giantg2 4y ago
- lebuffon 4y agoIs the use of "codes" in the article, versus "code" a sign that the author/editor is not "code" literate? Asking for a friend.
- marktangotango 4y agoIt's an interesting idiom you see in hpc and scientific computing that can be jarring when first encountered. "Codes" can be read as program or library.
- petschge 4y agoNo, that is more national lab slang.
- cozzyd 4y agoIt's just a bit antiquated. Rest assured people were writing codes for decades before any consumers had computers
- hpcjoe 4y agoFortran was old in the early 1980s, when I first taught it to myself for use on a research project. I'd taught myself BASIC, x86 assembler, and APL (for another physics course) by then. All the serious physicists were using Fortran though, for all their simulations. My research project required use of the university mainframe for the big calculations, the 1000x1000 Markov matrices I was working on. I taught myself how to work on out-of-core code then as well, as well as exploiting symmetries inherent in my models. My Ph.D. code was all written in Fortran, with a little Perl thrown in for good luck. 30+ years later, all of it works without a problem on my laptop/desktop machines. I learned C in 1996 and C++ in 1997. The C code I wrote still works, though the C++ code needs special compilation options to be able to work. I've not used Fortran in maybe 15 years now. I'm not up on the modern bits, I stopped using it professionally as F90 was becoming a thing. I taught graduate HPC programming courses at my alma mater in the CS department, and gave the choice of Fortran or C to the kids. They blanched at the thought of using a nearly (at the time) 60 year old language. They correctly reasoned that learning the language would not help their employability. Today, I use Julia for heavy computation. Python as a glue language, and C++ when required. I read the report, and I disagreed with the conclusions for a number of reasons, but what it comes down to is that many research groups in Physics/Chem still use Fortran, and aren't about to do the port to C/C++ due to funding. You can't get funding for this conversion. So codes will go on, students will learn what they need, and profs will keep publishing papers. Moreover, this isn't the first, second, etc. time that people have predicted the death of Fortran. I heard this in 1990s as I was finishing up my Ph.D in theoretical/computational physics. In 20 years or so, after I have (hopefully) retired, I'd bet that Fortran is still in widespread use, with Python following Java down the path to legacy. And the newer HPC language(s) will be quite happy to talk to Fortran. I could be wrong, and I'm ok with it. But I doubt it.
- hilbert42 4y ago"Physics/Chem still use Fortran, and aren't about to do the port to C/C++ due to funding." If funding's a problem across many fields then wouldn't it perhaps make better sense to just accept Fortran as the most appropriate language for certain well defined application types/fields and concentrate on improving the language, that is fixing its actual or perceived limitations in current environments? It would seem more efficient to centralize effort to improving just the language and its tools than to convert or rewrite a whole world of disparate applications that have been developed over many decades. After all, take English for instance, at any point in history, say 1600, its grammar and vocabulary were appropriate for the time. Moving on 400+ years till now we didn't chuck English away and replace it with a seemingly better language such Esperanto but progressively updated it to modern requirements. I have to admit to some bias here in that Fortran was my first language so it acted as the template for others. That said, I am not convinced that the enormous plethora of different languages that have flooded programming in recent decades has benefited computing and CS to the extent that perhaps it ought to have as there has been a great deal of unnecessary duplication and overlap that's led to wasted human effort—the need to learn many different languages, lack of uniformity etc. The large number of languages, lack of agreed consensus/standards—the most appropriate language for a given class of applications, etc.—has also led to language ghettoization where programmers swear by one language they've become familiar with and continue to use for jobs where another would be more appropriate. And one can't blame them for not wanting to learn a new language seemingly every other year. It seems to me that rationalizing and simplifying the language problem ought to be a high priority for CS. Given its long and mature history, its entrenched position in certain fields and its proven suitability for math-intensive work, that process could begin with Fortran as it would likely be the least disruptive.
- ARandomerDude 4y agoAccording to Tiobe, Fortran is the 20th most popular language. Clojure is in the "next 50 languages" section – that is, somewhere between 51 and 100 in popularity. As a Clojure lover, this hurts. https://www.tiobe.com/tiobe-index/ https://www.tiobe.com/tiobe-index/
- postsantum 4y agoNo way this rating reflects reality. Kotlin and Type Script should be way higher, certainly higher than 35/38
- dagss 4y ago10 years ago or so I really wanted to NOT use Fortran for my PhD. In my effort to try to use Python instead in my field, I fell down countless rabbit holes along the way (like being for a year or so one of the core contributors to Cython, in an effort to make "a better Fortran"). In the end though -- I decided it was time to just Get It Done, and just did what my supervisor had patiently and subtly hinted for years. Enough rabbit holes, just get it done in Fortran, and hand in the thesis... I think what I learned most about (having an interest in compilers and programming languages) is the ignorance the rest of the programming language community, and computer science, has about the kind of things you are actually interested in when doing HPC. What kind of language features you care about and what idioms make sense. Learning Fortran is super simple.. that is perhaps part of the problem that also people who are barely programmers can write (bad) programs in it. So what this must mean is simply a lack of programmers, full stop, being attracted to the field. And...C++ is truly the most wrong language for this space there could be.
- shihab 4y agoI'm in a similar position as you were right now: a PhD student in HPC domain who really wants to/ needs to use C++ for everything ( I love Python but has now come to terms with its limitations). Your last sentence is scary for me to hear- can you please elaborate a bit?
- dan-robertson 4y agoNot sure what the parent meant but I always think of https://travisdowns.github.io/blog/2019/08/26/vector-inc.html https://travisdowns.github.io/blog/2019/08/26/vector-inc.htm...
- jabl 4y agoOf all the commonly used languages, C++ is the most complex, baroque, and filled with subtle and not-so-subtle footguns. Of course with all that downside comes the upside that C and C++ are the lingua franca for low level programming where performance matters, not only HPC (yes, I hope Rust will be there one day, but I digress..). Fortran is pretty much limited to numerical computing, you're not going to find much Fortran libraries outside that domain. So if you envision doing programming like that outside HPC after your PhD, C++ might be worth the investment. But of course a lot comes down to what language other people in your group and your particular subfield, and what your supervisors are using. Doing a PhD is hard enough without being the odd guy out who's using a language nobody else in your community is using.
- deleted 4y ago[deleted]
- opportune 4y agoThis could be good in the long run. I think one of the problems in HPC is that a lot of libraries and tools are very ossified into a particular design that doesn’t work as well for new use cases (like genetics) and that’s partly because a lot of people are building off very old software. When that software is migrated or abandoned, what replaces it will be fresh in people’s minds and able to be modified to generalize past the openmp+mpi paradigm. It’s like in professional software, ignoring that we’re generally too willing to decide on a rewrite, one of the main benefits of a rewrite is your current team builds expertise on all the logic or behavior that predates them (and usually uncovers hidden knowledge like implicit behavior, subtle bugs, the code being ugly because it needed to be to solve a bug).
- noobermin 4y agoThis is just a symptom of the fact developers are like cogs, where you drop them in and expect them to work with "legacy code" where as they guy who just moved on/was laid off had all that expertise on the logic and behavior that predates you. If you people decided to actually build with an eye towards longevity, (in this case, I mean keeping people around so they can train the newbies) then this wouldn't be a problem.
- plantain 4y agoI have to work with Fortran HPC code a lot. The code and conventions are often extremely difficult to read. What I've started doing recently is just pasting into ChatGPT and having it explain the code to me. It actually works great.
- slowhand09 4y agoI learned Fortran IV as an introductory language. And read here that it is so elementary, and these other languages that are more complex and faster and better for software engineering, and software engineers are better now... I say why haven't these new and improved SEs devised a translation program to compile Fortran into C++? Back in the 1980s we used software to reverse-build flow diagrams of Fortran programs. They gave us fullpath test coverage, unique variables, reused variables, loop termination conditions etc. Before that on mainframes we'd use JCL (job control language) to output assembler code from submitted Fortran, COBOL, or PL/1. How can we not feed Fortran source in and receive Language XYZ as output? Perhaps the new wave of ChatGTP will write this and save society.
- jamesfinlayson 4y agoNot sure - I'm sure I've seen a COBOL to Java translator (paid). I guess there's not enough commercial demand, and any hobbyist who's good enough at Fortran probably isn't interested in doing it. edit: apparently f2py (Fortran to Python) is a thing.
- jabl 4y agof2py is a tool for calling Fortran code from Python, it doesn't translate Fortran into Python.