Authors: Milan Curcic, Sebastian Ehlert, Jérémie Vandenplas, Alexis Perry-Holby, Ondřej Čertík
Happy New Year and welcome to the January 2022 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
Here’s what’s new and ongoing in the fortran-lang.org repo:
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.
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:
#634:
Better extraction of the Fortran compiler from the MPI wrapper
Work in progress
#642 (WIP):
Replace polymorphic assignment with move_alloc
#630 (WIP):
allow backfilling of current directory in fpm-new subcommand
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 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
Flang
Recent development updates:
FIR
Add fir.box_isarray, fir.box_isptr and fir.box_isalloc conversion.
Add !fir.vector type conversion
Add type conversion for fir.boxchar
Add !fir.alloca conversion
Add placeholder conversion pattern for disptach operations
Add fir.select_case conversion
Add !fir.field type conversion
Transform IsPresentOpConversion and AbsentOpConversion
Add type conversion for FIR heap type
Add type conversion for FIR integer kind
Add !fir.len type conversion
Transform fir.emboxchar to a sequence of LLVM MLIR
Add fir.select_type conversion placeholder
Remove extra return in SelectTypeOpConversion
Transform fir.unboxchar to a sequence of LLVM MLIR
Add fir.global_len conversion placeholder
Add the FIR LLVMPointer Type
Add fir.cmpc conversion
Add fir.gentypedesc conversion
Transform fir.boxchar_len to a sequence of LLVM MLIR
Add missing HasParent in fir_DTEntryOp
Add fir.string_lit conversion
Add conversion patterns for slice, shape, shapeshift and shift ops
Add fir.box_tdesc conversion
!fir.tdesc type conversion
Add fir.constc conversion
Add fir.embox conversion
Notify conversion failure for Proc ops, types
Add tests for mlir::ComplexType conversion
Add fir.end conversion placeholder
Transform fir.field_index to a sequence of LLVM MLIR
Add a factory class for creating Complex Ops
Add fir.no_reassoc conversion
Set !fir.len_param_index conversion to unimplemented
Add base for runtime builder unittests
Add fir transformational intrinsic builder
Add assignment runtime API builder
Add data flow optimization pass
Add array value copy pass
Add fir reduction builder
Add fir numeric intrinsic runtime call builder
Add fircg.ext_embox conversion
Add fir derived type runtime builder
Add fir character builder
Add fircg.ext_array_coor conversion
Upstream conversion of the XRebox Op
Convert fir.allocmem and fir.freemem operations to calls to malloc and free, respectively
Runtime
Fix vector cshift runtime with non zero lower bounds
Respect NO_STOP_MESSAGE=1 in runtime
Runtime performance improvements to real formatted input
Allow write after non advancing read in IO runtime
Fix reversed comparison in RESHAPE() runtime
Define & implement a lowering support API IsContiguous() in runtime
Don’t close stderr in runtime (fixes STOP output)
Return arrays in Transfer runtime with SIZE argument
Fix INQUIRE(FILE=,NAME=)
Add ragged array runtime functions
Allow exterior branch to outermost WHERE construct statement
Fix ORDER= argument to RESHAPE
Fix rounding edge case in F output editing
Handle ENTRY names in IsPureProcedure() predicate
Allow implicit procedure pointers to associate with explicit procedures
Fix a bug in INQUIRE(IOLENGTH=) output
Remove default argument from function template specialization
Check ArrayRef base for contiguity in IsSimplyContiguousHelper
Deal with negative character lengths in semantics
Fix INQUIRE(PAD=) and (POSITION=) for predefined units
Add a semantics test for co_sum
Fix off-by-one results from folding MAXEXPONENT and MINEXPONENT
Skip Fortran STOP: before message when NO_STOP_MESSAGE is set
Fix printing of constc and parsing of #fir.real
Predefine unit 0 connected to stderr
Add -fno-automatic, refine IsSaved()
Correct the argument keyword for AIMAG(Z=…)
Inclusive language: remove instances of master
Return true in IsSymplyContiguous for allocatables
Fix usage & catch errors for MAX/MIN with keyword= arguments
Re-fold bounds expressions in DATA implied DO loops
Correct INQUIRE(POSITION= & PAD=)
Rearrange prototype & code placement of IsCoarray()
Replace notifyMatchFailure with TODO hard failures
TargetRewrite: Rewrite fir.address_of(func)
Fix folding of EXPONENT() intrinsic function
OPEN(RECL=) handling for sequential formatted I/O
Avoid potential deadlock in CloseAll()
Call notes are recorded and available upon request here. Please contact Alexis Perry-Holby at aperry@lanl.gov for document access.
LFortran
Beginning of refactoring of ASR (Abstract Semantic Representation) into a standalone library
New intrinsics: mvbits, bge, bgt, ble, blt, ibits
generic procedure resolution fixes
FreeBSD fixes
Implement .xor. (LFortran as well as GFortran extension)
Fixes to large integers (BigInt) handling
Added support for private, final attributes in derived types/classes
The following people contributed code in December 2021: Ondřej Čertík, Gagandeep Singh, Harris Snyder
We are looking for new contributors. Please do not hesitate to contact us if
you are interested. We will help you get up to speed.
Events
fpm has a new documentation website hosted at
fpm.fortran-lang.org.
This website will provide user-oriented tutorials and how-to guides, as well
as developer-oriented reference documents and specifications.
We welcome all contributions to the fpm documentation, including translations
to other languages.
Please visit the fpm-docs repo to
get started.
We had our 21st Fortran Monthly call on December 14.
You can watch the recording below:
We also wrote a review of the Fortran-lang projects in 2021. Read it
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: