Announcement

Collapse
No announcement yet.

FLANG: NVIDIA Brings Fortran To LLVM

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • starshipeleven
    replied
    Originally posted by toguro123 View Post
    Maybe. Or you could just use Fortran and be done with it.
    I just pointed out that the reasons you posted aren't exactly hard to work around.

    You made it sound like it was some technical limitation of C, when the issues you stated are actually a consequence of the fact that Fortran is still perfectly fine since math isn't changing much, so none bothered making something better for C/C++ (or you/others doing that stuff didn't bother searching for such libraries as you had already a good tool for the job, which is still basically the same).

    Leave a comment:


  • toguro123
    replied
    Originally posted by starshipeleven View Post
    Given what you state here, I think that it isn't that hard to write a C/C++ library of wrapper/helper functions that let people write decent math-oriented code. Did you try any opensource scientific C libraries? There are a bunch in the wild.
    Maybe. Or you could just use Fortran and be done with it.

    I did use Armadillo. It worked OK.

    The only programming language I see can replace Fortran for numerical calculations is Julia.

    Leave a comment:


  • starshipeleven
    replied
    Originally posted by toguro123 View Post
    I did my entire PhD and MS simulation work with Fortran (2003). All codes written from scratch and made very little sense to use something like C/C++:
    1) arrays in Fortran start with index 1 -> C/C++ indexing of arrays does not lend itself well for matrix algebra (non-intuituve, intrusive, and goes against common mathematical conventions).
    2) passing arrays to functions is straightforward in Fortran. With most general-purpose programming languages one has to think too much about passing by value vs passing by reference, pointers, etc etc etc. Please let me do my math already! You spend more time "developing code" than doing physics.
    3) Fortran already has a good set of OOP features.
    4) Writing fast codes in Fortran is easy(er). Can you develop a GUI with it? Probably not. But for performing calculations, Fortran is still king.
    Given what you state here, I think that it isn't that hard to write a C/C++ library of wrapper/helper functions that let people write decent math-oriented code. Did you try any opensource scientific C libraries? There are a bunch in the wild.

    Leave a comment:


  • starshipeleven
    replied
    Originally posted by andrei_me View Post
    There is a comparison of Rust, Go and C against Fortran perf argument on astrophysics:

    https://arxiv.org/pdf/1702.02951.pdf
    Reporting the conclusions as a tl:dr for others:


    We have shown the reliability of Rust as a programming language as opposed to For-
    tran, C or even Go. Rust allows the user to avoid common mistakes such as the access to
    invalid memory regions and race conditions. We have also shown that it is a competitive
    language in terms of speed and accuracy.
    The main challenge we experienced was the initial learning curve, it was necessary
    to really understand and get used to the ownership and borrowing concepts. Once the
    paradigm shift is done, the benefits are immediate. We therefore encourage the commu-
    nity to consider Rust as a language that will help us produce good quality, memory safe,
    concurrent and high-performance scientific code.



    I approve the findings of this article.

    Leave a comment:


  • andrei_me
    replied
    There is a comparison of Rust, Go and C against Fortran perf argument on astrophysics:

    Leave a comment:


  • toguro123
    replied
    I did my entire PhD and MS simulation work with Fortran (2003). All codes written from scratch and made very little sense to use something like C/C++:
    1) arrays in Fortran start with index 1 -> C/C++ indexing of arrays does not lend itself well for matrix algebra (non-intuituve, intrusive, and goes against common mathematical conventions).
    2) passing arrays to functions is straightforward in Fortran. With most general-purpose programming languages one has to think too much about passing by value vs passing by reference, pointers, etc etc etc. Please let me do my math already! You spend more time "developing code" than doing physics.
    3) Fortran already has a good set of OOP features.
    4) Writing fast codes in Fortran is easy(er). Can you develop a GUI with it? Probably not. But for performing calculations, Fortran is still king.
    Last edited by toguro123; 18 May 2017, 02:32 PM.

    Leave a comment:


  • nslay
    replied
    About time. Was wondering when LLVM would have a Fortran frontend.

    Almost all the gold standard mathematical algorithms are written in FORTRAN. Prolific examples include BLAS and LAPACK which are both heavily used in industry (e.g. both of them power MATLAB). Of course, there's a re-implementations of these functions in other languages, but the ones on netlib are the gold standard.

    Reference:

    Leave a comment:


  • ⲣⲂaggins
    replied
    A more concrete example of Fortran still being useful is python's scipy.odeint, a wrapper for the Fortran-written library ODEPACK. If you've ever needed to solve an ode in python you'll probably have used it.

    Leave a comment:


  • dangerousHobo
    replied
    I've worked (2012-2014) on a military project once that used Fortran heavily. Some of the code dated back to the 80's but it's still maintained today. We had ~50 people working with the code and they were of all ages (20's - 60's).

    Leave a comment:


  • wikinevick
    replied
    Originally posted by droidhacker View Post
    Fortran? Really? The three people who still use that are enough to justify this?
    Such deep ignorance is only paralleled by Pawlerson.

    Leave a comment:

Working...
X