3 ms·
TIL "Fortran is a natively parallel programming language". I guess we aren't talking about FORTRAN 77 then.
by martyvis 3y ago
TIL "Fortran is a natively parallel programming language". I guess we aren't talking about FORTRAN 77 then.
- zabzonk 3y agothings have advanced a little since then - speaking as someone that really liked f77 :-) but even way back when i think there were parallel options, if your hardware could support them.
- jeanlucas 3y agoMakes sense, somehow I assumed things stayed the same. Turns out I only know fortran from the memes about it.
- kergonath 3y agoThe important thing is that old programs and libraries keep working. Some features were removed from the standard, and modern compilers are much better at detecting errors (and are much stricter than they used to be by default), but all of them have a switch to make them work with random codes from the 1980s. There is an awful lot of new features on top of that (things like first-class multidimensional arrays language-level parallelism, object orientation, modules, etc), but old software keeps working.
- reacharavindh 3y agoThat was my first thought as well. I’ve had researchers running an in-house built Fortran program in the field of genetics on our HPC clusters, such that they’d run their task as 1000s of jobs in the cluster each operating on a small segment of data instead of a single program making use of as many cores available in the system. Perhaps, newer Fortran would’ve done it, but the old software was still reliant on old Fortran.
- pletnes 3y agoNew and old Fortran is incredibly compatible. Chances are you can rewrite or refactor to add new features directly into or along the old code. If you know what you’re doing.
- m_mueller 3y agoFortran 90+ has strong support for parallel programming, including MPI, OpenMP, CUDA and OpenAPI (for GPU).
- mseepgood 3y agoWhy would we be talking about FORTRAN 77 in 2023?
- jki275 3y agoBecause there are still codebases in active use and development in FORTRAN 77.
- kergonath 3y agoThis is an allusion to coarrays, which is a feature from Fortran 2008. It is actually very neat and very nice to program for. There is a C thing that took inspiration from it: https://en.m.wikipedia.org/wiki/Unified_Parallel_C https://en.m.wikipedia.org/wiki/Unified_Parallel_C .
- marshallward 3y agoDo concurrent loops can also be parallelized.
- kergonath 3y agoYes, a lot of things can be parallelised with OpenMP or MPI, just like in C/C++. These extensions and libraries are not core language features, though.
- deleted 3y ago[deleted]
- deleted 3y ago[deleted]
- marshallward 3y agoVery true, and it opens the door to new optimizations which are not possible when going through a library (at least in the case of MPI).
- pklausler 3y agoDO CONCURRENT is not a parallel construct. It is a serial loop with arbitrary ordering of iterations, and limitations on data accesses that were intended to ease parallelization but turned out to be incorrect.
- marshallward 3y agoI agree that it is not a parallel construct. But it can nonetheless be parallelized if certain criteria are met.