6 ms·
Makes sense both Livermore and ORNL have a lot of older Fortran code that they still use.
by cprayingmantis 11y ago
Makes sense both Livermore and ORNL have a lot of older Fortran code that they still use.
- bsharitt 11y agoIt not just to use old Fortran code. Lot's of it is still being written in the scientific computing world.
- yeukhon 11y agoPretty sure a lot of FOTRAN code are compiled or wrapped around with C interface when I install numpy/scipy. I just don't remember which module to be exact.
- Fomite 11y agoThe ODE solvers are, IIRC.
- gh02t 11y agoMany others too. QUADPACK, LSODA, LAPACK, MINPACK etc.
- yeukhon 11y agoI guess pretty much linear algebra / matrix stuff will find FOTRAN useful then. Thank you guys for answers.
- gh02t 11y agoNot just LA, pretty much all numerical methods. Fortran is still a very natural and surprisingly pleasant language for numerics these days. It's just terrible at everything else... which is why it doesn't get much attention in the broader programming community I think. Fortran is in a somewhat unique niche- basically anybody who uses a computer uses a library written in Fortran (via BLAS) but very few people are aware of it, especially that it has continued to develop and is actively in usd. There are plenty of places (mostly related to parallel evaluation) where Fortran is state of the art. But speaking as someone mildly competent in it, it isn't something everybody needs to care about. It has its niche and is pretty awful at everything else, best left to its little island of programmers. Haskell is my favorite language and C++ or Python are what I use in a professional setting, but I won't hesitate to break out the good old `IMPLICIT NONE` if it is the right tool.
- tanderson92 11y ago+1. The extent of my use of LA in Fortran is pretty much BLAS/LAPACK. But for pretty much everything else numerical it still wins handily, at least for my uses (numerical PDEs, FFTs). It likely seems niche to most programmers, but array slicing is such a godsend to certain areas of software that there really is no more natural language to write a code in. There is Matlab, but its purpose is for prototyping. In fact it is a major credit to Matlab that the conversion is very natural. This niche is why Fortran exists and has such a strong following. And the more modern features are like candy sprinkled on the core features. I could write a sonnet about modern fortran.
- truncate 11y agoI'm not at all familiar with Fortran. I was under impression that its old language living in legacy. I believe there are other good alternatives, why still use Fortran for new code?
- tjl 11y agoIt's still faster than the alternatives. Things like Scipy/Numpy are more alternatives to Matlab as is R. Julia isn't fast enough yet. C/C++ doesn't have the built-in matrix/vector support. The latter is what I ran into when I was coding for my Master's thesis, so I just gave up and went with Fortran. For my PhD, I used Matlab as the speed wasn't an issue. There's also issues with wanting to use the old Fortran code in new projects and if the new alternatives don't have a good interface for Fortran, it's a bit of a pain to integrate.
- fafner 11y agoIn C++ - unlike C - you can actually implement quite good matrix/vector support. E.g., Eigen3 http://eigen.tuxfamily.org/index.php?title=Main_Page http://eigen.tuxfamily.org/index.php?title=Main_Page or Blaze https://bitbucket.org/blaze-lib/blaze https://bitbucket.org/blaze-lib/blaze or if you have a specific BLAS library tuned to your cluster then maybe FLENS http://apfel.mathematik.uni-ulm.de/~lehn/FLENS/index.html http://apfel.mathematik.uni-ulm.de/~lehn/FLENS/index.html
- tjl 11y agoTrue, but the problem I had (which I will admit was back in '99) is that there's no standard one. So, if you need to solve a system of ODEs and a linear system, you're invariably needing to convert between the two.
- RogerL 11y agoThis is still true. This library uses Eigen, that one uses Boost, the other one uses a home grown one. And then you want to use another library, it uses Eigen (yay!), but an old version of Eigen and it won't compile against the current version. C++ really crippled itself in this regard by never making a standard. I never bought Stroustrup's claims of "but you can write your own" for these reasons.