Fortran newsletter: May 2021#

Welcome to the May 2021 edition of the monthly Fortran newsletter. The newsletter comes out at the beginning of every month and details Fortran news from the previous month.

fortran-lang.org#

This month we’ve had several updates to the website:

  • #244: Add a first year announcement

  • #236: Add dl_poly_4 to package index

  • #220: Include learn resources to online courses

Ongoing work:

  • #201 (WIP): Internationalization for fortran-lang

  • #246 (WIP): Transferring fortran90.org “Fortran Best Practise” into a mini-book

Let us know if you have any suggestions for the website and its content. We welcome any new contributors to the website and the tutorials page in particular - see the contributor guide for how to get started.

Fortran Standard Library#

Here’s what’s new in stdlib:

  • #391: Add issue templates

  • #388: Changed filenames for bitset tests

  • #384: Implement starts_with and ends_with functions

  • #367: Add Intel compiler workflow for OSX

  • #360: Summarize build toolchain workflow and implied rules

  • #343: Implement strip and chomp as supplement to trim

  • #336: Add functions to convert integer/logical values to character values

Work in progress:

  • #189 (WIP): Initial implementation of sparse matrices.

  • #272 (WIP), #273 (WIP), #276 (WIP), #278 (WIP): Implementation of the stdlib_stats_distribution modules. It provides probability distribution and statistical functions.

  • #311 (WIP): Implementation of a module for handling lists of strings

  • #313 (WIP): Legendre polynomials and Gaussian quadrature

  • #333 (WIP): Provide abstract base class for a string object

  • #349 (WIP): Simplify test makefile

  • #353 (WIP): Initial checkin for a module for tolerant comparison of reals

  • #355 (WIP): Implement clip function

  • #359 (WIP): Add general contributing guidelines to stdlib

  • #363 (WIP): Add sort to stdlib_string_type module

  • #372 (WIP): Correct implementation of to_title

  • #386 (WIP): Start the addition of the module stdlib_sorting

Please help improve stdlib by testing and reviewing pull requests!

The candidate for file system operations to be included in stdlib is being developed by @MarDiehl and @arjenmarkus in this repository. Please try it out and let us know how it works, if there are any issues, or if the API can be improved.

Fortran Package Manager#

Here’s what’s new in fpm:

  • #420: Phase out Haskell fpm

  • #468: Identify OpenBSD

  • #465: Fix typo in README

  • #442: Use lib instead of ar on Windows

  • #440: Minor edits to README

  • #438: Add external-modules key to build table for non-fpm modules

  • #437: Remove coarray single from default Intel flags

  • #433: Fix to allow compiling C with Intel CC

  • #431: Use different compiler flags on differnt platforms for Intel

  • #429: Use wget if curl is missing in install.sh

Work in progress:

  • First beta release (WIP): First feature-complete release of the Fortran implementation.

  • #364 (WIP): Plugin alpha version

  • #423 (WIP): Use default instead of master to reference the repository HEAD

  • #444 (WIP): Allow to find include files / modules in CPATH environment variable

  • #449 (WIP): Response files with ar on Windows

  • #450 (WIP): Remove coarray flag from intel debug settings

  • #451 (WIP): Refactor: use objects to represent compilers and archiver

fpm is still in early development and we need as much help as we can get. Here’s how you can help today:

  • Use it and let us know what you think! Read the fpm packaging guide to learn how to build your package with fpm, and the manifest reference to learn what are all the things that you can specify in the fpm.toml file.

  • Browse existing fpm packages on the fortran-lang website

  • Browse the open issues and see if you can help implement any fixes or features.

  • Adapt your Fortran package for fpm and submit it to the Registry.

  • Improve the documentation.

The short-term goal of fpm is to make development and installation of Fortran packages with dependencies easier. Its long term goal is to build a rich and decentralized ecosystem of Fortran packages and create a healthy environment in which new open source Fortran projects are created and published with ease.

Compilers#

Classic Flang#

A total of 5 pull requests were merged in April.

LLVM Flang#

Recent development updates:

  • OpenMP

    • [OPENMP5.1]Initial support for novariants clause.

    • [OPENMP5.1]Initial support for nocontext clause.

    • Add functionality to check « close nesting » of regions, which can be used for Semantic checks

    • [OpenMP5.1] Initial support for masked directive and filter clause

    • Modify semantic check for nesting of ordered regions to include close nesting check.

    • Remove OmpEndLoopDirective handles from code.

    • Add General Semantic Checks for Allocate Directive

  • New Driver

    • Add options for -Werror

    • Modify the existing test cases that use -Mstandard in f18, to use -pedantic and %flang_fc1 to share with the new driver

    • Add support for -cpp/-nocpp

    • Fix -fdebug-dump-provenance

    • Add debug options not requiring semantic checks

    • Remove %flang-new from the LIT configuration

    • Update the regression tests to use the new driver when enabled

    • Add support for -fget-definition

  • Move .f77 to the list of fixed-form file extensions

  • Runtime

    • Implement reductions

    • Implement numeric intrinsic functions

    • TRANSFER() intrinsic function

    • RANDOM_NUMBER, RANDOM_SEED, RANDOM_INIT

    • Implement IPARITY, PARITY, and FINDLOC reductions

  • Fix unit test failure on POWER

  • Improve constant folding for type parameter inquiries

  • Check for conflicting BIND(C) names

  • Enforce a limit on recursive PDT instantiations

  • Accept & fold IEEE_SELECTED_REAL_KIND

  • Define missing & needed IEEE_ARITHMETIC symbols

  • Handle instantiation of procedure pointer components

  • Fix checking of argument passing for parameterized derived types

  • Fix spurious errors from runtime derived type table construction

  • Check for attributes specific to dummy arguments

  • Handle structure constructors with forward references to PDTs

Call notes will be sent to the flang-dev email list and also recorded here.

LFortran#

  • 98 Merge Requests merged in April

  • Working towards compiling the SNAP proxy app (#313):

    • Code can be parsed to AST and transformed back to source code which compiles with other compilers and works

    • About 3rd of the files can be transformed from AST to ASR and the modules saved

  • Other improvements:

    • Runtime library (more functions work)

    • Nested functions

    • Derived types

Events#

  • We had our 11th Fortran Monthly call on April 22. You can watch the recording below:

  • Wadud Miah (@wadudmiah) from the University of Southampton presented a webinar on Fortran for High Performance Computing, organized by Excellerat. You can find the slides and the recording here.

As usual, subscribe to the mailing list and/or join the Discourse to stay tuned with the future meetings.

Contributors#

We thank everybody who contributed to fortran-lang in the past month by commenting in any of these repositories: