> Quick Start: Variables, Example: variable assignment [1].... > pi = 4.141592 Well, for the sake of a reasonable correctness in the code example. Must be a typo with the intended: pi = 3.141592 Thanks for your efforts to help Fortran move forward. [1]: https://fortran-lang.org/learn/quickstart/variables#declarin...
What stopped me a while ago was the availability of good free compilers. (the appeal is you could be faster than C for numerical code in Fortran, but I remember vaguely these compilers then would not be cheap)
I often nowadays find GNU GFortran the same speed or faster than Intel Fortan for FEM/CFD codes, while 10-15 years ago Intel Fortan was 10-20% faster in general. So these days I typically just recommend to go with GFortan which is easily available on most platforms.
For anyone doing HPC work and hasn't tried GFortran >=10, I highly suggest giving it a go. We switched to it for the arm64 improvements, but surprisingly also found a 20% speedup on the x86-64 target. My best guess is that it's a combination of IPO and autovec enhancements.
Several things surprised me, both in the blog post and the other comments. (Though hpcjoe's and enriquot's comments took care of the "What? Fortran is dead?" reaction.)
- (Comment) "array operations, ... are slower than explicit loops" May be related to the following:
Several things surprised me, both in the blog post and the other comments. (Though hpcjoe's and enriquot's comments took care of the "What? Fortran is dead?" reaction.) - (Comment) "array operations, ... are slower than explicit loops" May be related to the following: - No mention of vectors. - No mention of LINPACK, LAPACK, etc. - No mention of GPUs.
Fortran arrays are indexed as you choose.
Vectors would be arrays. Array operations will lose if the compiler doesn't scalarization/deforestation properly (if deforestation is an appropriate word when dealing with arrays rather than lists/trees). Subroutines libraries and GPUs are irrelevant.
I've been a Fortran user for (gawd help me) 35 years or so. I can say that rumors of its demise are greatly exaggerated. There are many languages, and language fads. Fortran was never sexy, never faddy. My research codes from 30+ years ago still compile w/o issue to this day, and run, on my linux laptop. Even using the big endian data files (gfortran has a nice switch for that). I don't really use it actively anymore…
It's perhaps worth saaying that 30 years ago code in the wild might well not have compiled and run correctly on a different system, and is more likely to today. There tended to be more non-standard features and ignoring of the standard -- specifically storage association and order of evaluation rules, which people who hadn't read the standard would swear weren't in it. Also, there are a few things which have been dropped from the standard, though not necessarily from compilers.
I often nowadays find GNU GFortran the same speed or faster than Intel Fortan for FEM/CFD codes, while 10-15 years ago Intel Fortan was 10-20% faster in general. So these days I typically just recommend to go with GFortan which is easily available on most platforms.
For anyone doing HPC work and hasn't tried GFortran >=10, I highly suggest giving it a go. We switched to it for the arm64 improvements, but surprisingly also found a 20% speedup on the x86-64 target. My best guess is that it's a combination of IPO and autovec enhancements.
Profiling and -fopt-info should tell you why. (If you care about speed, use them anyway!) I'd be surprised if it's vectorization improvements, other than a specific bug fix.