LFortran supports all intrinsic functions

We are thrilled to announce that LFortran supports all intrinsic functions listed in F2018 Interpretation Document (Table 16.1 Pg: 332) (also shown by this nice list online at GFortran’s documentation). This comprehensive list of almost 200 intrinsics encompasses a broad array of functions and subroutines essential to Fortran’s functionality, including elemental, inquiry, transformational, array operations, and more. For each function we support both compile-time and runtime evaluation.

The functions are implemented in an ASR (Abstract Semantic Representation) pass, which means they get “instantiated” and specialized for the argument types and then the compiler can optimize it, so using any intrinsic function is at least as fast as implementing the same operation yourself, there is no runtime overhead.

[Read More]

LFortran now compiles SNAP

We are thrilled to announce that LFortran can now successfully compile and run lanl/SNAP, marking a significant milestone in our journey to beta. SNAP is the seventh production-grade, third-party code that LFortran can compile, bringing us closer to our goal of compiling 10 such codes—a critical step toward a beta-quality compiler.


About SNAP

SNAP (SN Discrete Ordinates Application Proxy) is a proxy application designed to emulate the performance of modern discrete ordinates neutral particle transport codes. It replicates the computational workload, memory requirements, and communication patterns of the Los Alamos National Laboratory code PARTISN, without including actual physics. By using domain decomposition and parallelization across spatial, angular, and energy domains, SNAP is ideal for performance testing on cutting-edge high-performance computing systems.

[Read More]

Fortran On Web Using LFortran

Fortran On Web Using LFortran

Recently, there was a blog post titled Fortran on WebAssembly released by Dr George W Stagg. This article inspired us to compile the same example using our LFortran compiler. We are happy to share that we have the fortran mnist classifier example used in the blog post, compiled to WebAssembly using LFortran (with no hacks to the compiler) and working perfectly in the browser.

MNIST

We cloned the original authors code and just swapped-in two of our generated files mnist.js and mnist.wasm with the original files. We also fixed few minor bugs in the code that we came across (details in the commit history).

[Read More]

LFortran compiles Fortran stdlib

LFortran compiles 85% Fortran stdlib

We are happy to announce that LFortran can compile all numerical modules in stdlib. The stdlib library has 32 modules, here are the details of the current status:

  • all 32 modules compile to ASR
  • 27 modules (85%) compile to LLVM; there are 4 hash modules (hash_32bit, hash_64bit, hashmaps, hashmap_wrappers, stringlist_type) and one stringlist_type module that does not compile to LLVM yet
  • 24 modules pass all their tests; 3 modules (sorting, bitsets, stats) do not pass all tests yet, but simple examples that use the modules work

This is sixth third-party production-grade code that LFortran can compile after SciPy. The progress bar towards beta has thus reached 6/10.

[Read More]