LFortran is an alpha-stage modern, interactive LLVM-based Fortran compiler.
LFortran compiles PRIMA
21–30 of 31 posts
Re: LFortran compiles PRIMA
#22Earlier quoted context omitted.
What compilers are used to build it might be relevant.
Typically gfortran and intel fortran.
Re: LFortran compiles PRIMA
#23https://fortran-lang.discourse.group/t/lfortran-compiles-pri...
Re: LFortran compiles PRIMA
#24I am not getting a full picture here. What's challenging about PRIMA code base? Does it use some advanced features that are difficult for a compiler to support? Are the mentioned features in the 2008 standard?
What's actually impressive is that LFortran in alpha stage is only 2x slower than GFortran, which goes back decades.
Re: LFortran compiles PRIMA
#25Re: LFortran compiles PRIMA
#26Earlier quoted context omitted.
I am fully aware of it, however most recent revisions tend not to be adopted by all compilers, and honestly the large majority only cares about keeping existing code running. A bit like C23 and C++23 are here, and the large majority is a mix of C89, C99, C++11, and C++17, as what folks in the trenches care about. Or Java 8 versus Java 24, and so on. Fortran is in a similar position.
How many different platforms out there run Fortran code these days? I’m aware of it being very important in scientific computing (and compiling existing code is critical) but I don’t know many other use cases and different platforms requiring different compilers.
Re: LFortran compiles PRIMA
#27Roughly: 8, 12, 18 units of time, respectively. Python only being twice as slow for the simplest matmul - how much of that is merely the interpreter startup time?
Re: LFortran compiles PRIMA
#28> It utilizes a range of Modern Fortran features, including extensive use of optional variables, function pointer passing, and a randomized test driver, among others. Successfully compiling PRIMA requires a compiler with a robust and mature backend, as well as well-developed intermediate passes and a capable parser. I am not getting a full picture here. What's challenging about PRIMA code base? Does it use some advan…
Re: LFortran compiles PRIMA
#29Earlier quoted context omitted.
How many different platforms out there run Fortran code these days? I’m aware of it being very important in scientific computing (and compiling existing code is critical) but I don’t know many other use cases and different platforms requiring different compilers.
In many HPC cases you are using the platform tools, not gfortran. Also we have one use case that is responsible for OpenCL losing mindshare for scientific community, running Fortran on GPU. Thus I bet at least Intel, NVidia, AMD, Cray, IBM, being relevant ones. Yes, some of them are planning to eventually adopt LFortran to replace their own, like they did with clang, or at least are using LLVM nowadays.
Re: LFortran compiles PRIMA
#30See https://labs.quansight.org/blog/building-scipy-with-flang which was once discussed on HN at https://news.ycombinator.com/item?id=38196412