AMD Developing Next-Gen Fortran Compiler Based On Flang, Optimized For AMD GPUs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Svyatko
    Senior Member
    • Dec 2020
    • 208

    #21
    Originally posted by cl333r View Post

    But everything that has a beginning has also an end. Isn't Fortran slowly faiding away? Are these corporations and scientists planning to run old fortran code for the next 150 years?
    Fortran holds #8 in TIOBE Index for Nov 2024:



    Great rise during last 2 years.
    Take care of your future - learn Fortran!
    Last edited by Svyatko; 16 November 2024, 02:54 PM.

    Comment

    • Svyatko
      Senior Member
      • Dec 2020
      • 208

      #22
      AMD's repo:



      Originally posted by rickst29 View Post

      Yes! Python (compiled) can be pretty fast when the mathematical work is done within well-optimized libraries (such as numpy).
      I get a 512^3 array representing a Temperature distribution from a simulation (written in Fortran). The array is stored in a binary file that's about 1/2G in size. I need to know the minimum, maxim...

      The numpy is faster because you wrote much more efficient code in python (and much of the numpy backend is written in optimized Fortran and C) and terribly inefficient code in Fortran.

      Pure Python can be 10x - 100x times slower than Fortran/C/C++.

      Comment

      • rickst29
        Junior Member
        • Feb 2013
        • 45

        #23
        Originally posted by Svyatko View Post
        AMD's repo:





        I get a 512^3 array representing a Temperature distribution from a simulation (written in Fortran). The array is stored in a binary file that's about 1/2G in size. I need to know the minimum, maxim...




        Pure Python can be 10x - 100x times slower than Fortran/C/C++.
        We agree that PYTHON run as interpreted code, and without using support libraries (such as numpy) will be vastly slower with number crunching. But 'HPC' projects should always be built to use those libraries, and they should also be compiled after debugging. I'll stand by my guess that Python will become more widely used over time.

        Comment

        • Old Grouch
          Senior Member
          • Apr 2020
          • 675

          #24
          Originally posted by rickst29 View Post

          We agree that PYTHON run as interpreted code, and without using support libraries (such as numpy) will be vastly slower with number crunching. But 'HPC' projects should always be built to use those libraries, and they should also be compiled after debugging. I'll stand by my guess that Python will become more widely used over time.
          Python as 'glue' holding together the libraries written in Fortran is what happens now. It appears to be a reasonably good model. Python obviously won't replace compiled Fortran, but allows simple 'front-end' application development. As I said earlier, the value in Fortran is the battle-tested libraries for things like numerical simulations. There's little point in re-inventing a perfectly good wheel in a new language, badly - unless the new language offers significant benefits over and above Fortran for the things that Fortran is already very, very good at.
          I'm unlikely to write a GUI in Fortran, but I do know of business applications that were written in Fortran calling screen-handling (80x24, not bitmapped) libraries - that have been in use in industry for over 30 years. I would not recommend that approach now, but it was, at the very least, workable. Oddly enough, several attempts were made to replace the applications with more 'modern' approaches, all of which failed as they required far more machine resources to achieve the same tasks.

          I certainly don't think that Fortran is the best tool for all programming jobs. Far from it. But in cases where Fortran is doing what it is good at (outlined in other people's postings above) it is hard to beat. There is a huge amount of work that has gone into the scientific and technical libraries, and replicating even part of that legacy would take a lot of time and money, so it is difficult to make a case for replacing them that generates the necessary payback. It is interesting to speculate on what might offer such a payback.

          Comment

          Working...
          X