Coarrays using native shared memory mulithreading on single node machines and handling Fortran 2018’s TEAM feature.
Fortran 2003: Parameterized Derived Types support is improved. Handling of LEN parameters works but still requires a future change of representation (see PR82649).
Fortran 2018: Support the extensions to the IMPORT statement, the REDUCE intrinsic and the new GENERIC statement.
The Fortran 2023 additions to the trigonometric functions are now supported (such as the sinpi intrinsic).
Fortran 2023: The split intrinsic subroutine is now supported and c_f_pointer now accepts an optional lower bound as a argument.
The -fexternal-blas64 option has been added to call external BLAS routines with 64-bit integer arguments for MATMUL. This option is only valid for 64-bit systems and when -ffrontend-optimize is in effect.
Of these the shared memory version of co-arrays is probably the biggest addition along with improved PDT support
I have tested it with a recent nightly build (see the Fortran Wiki for instructions), using two small demos computing Pi by Monte Carlo with corrays and collectives. GFortran automatically used 8 threads on my machine:
According to @jerryd , the option -lcaf_shmem is temporarily necessary, until an option like -fcoarray=shared is added in a later release. Note also that I had to put the option -lcaf_shmemat the end of the command for the linker.
Thanks. I didn’t see that it was an RC on the web site. I hope the shmem version of CAF performs better than the current MPI based version which (at least on an 8 core Ryzen) doesn’t perform at all and usually “deadlocks”. I have not bothered to dig very deep into the standard CAF implementation (have used Cray’s CAF before) due to the horrendous performance (at least for me) on multi-core “single node” workstations. If the Gfortran shmem version shows a usable speedup then I hope it will lead to further adoption and improvement as more people like me finally start to use CAF.
As of last September (2025) they also added F2023 conditional expressions. (A feature Fortran should have had 60+ years ago - if only IBM had listened to John McCarthy.) Particularly with Fortran, it should be useful for simplifying handling optional arguments, where the merge intrinsic doesn’t work.
!Test conditional expressions in Fortran 2023.
!Ref: Metcalf, 6th Ed. Section 23.2.3 Conditional expressions and arguments
!OBS: still not implemented in ifx v. 2025.3.3 and gfortran 15.2.1
program tes_conditional_expressions
implicit none
real :: x, val
call random_number(x)
print’(a,g0)', ‘x= ‘, x
val= (x > 0.5 ? x : 0.0 )
print’(a,g0)’, 'val= ', x
end program tes_conditional_expressions
Right now, the latest gfortran version distributed by Fedora repo is:
GNU Fortran (GCC) 15.2.1 20260123 (Red Hat 15.2.1-7)
And the error message is:
tes_conditional_expressions.f90:11:14: 11 | val= (x > 0.5 ? x : 0.0 ) | 1 Error:Expected a right parenthesis in expression at(1)
I have just created this repository with a buddhabrot example:
ppm_coarray_buddhabrot.f90 is a CLI program drawing a Buddhabrot in a portable pixmap binary format (PPM) file, a very basic uncompressed image file format. Each Fortran image is computing its own Buddhabrot, and they are finally summed using the co_sum()collective subroutine. The process is therefore very similar to what is done in astrophotography.
Does it mean it won’t require OpenCoarrays to build parallel programs? I’m using Homebrew for Linux to get latest gfortran (still 15.2 there) but unfortunately the opencoarrays package requires gcc@13 which seems quite out-of-date now that v16 has been released.
The announcement made there is for shared memory parallelism. For distributed memory parallelism with coarray one still needs OpenCoarrays to enhance gfortran (AFAIK).
I’m probably very wrong about this but I think OpenCoarrays is just the interface to a version of MPI thats used for the transport layer. The standard CAF syntax is built into the compiler so any backend that acts as a transport layer for communicating between processors or threads can be used to implement CAF. I think the NAG implementation of CAF is shared memory. My best guess is that the gfortran shared memory version of CAF is built on top of OpenMP or maybe some native implementation using Pthreads etc. So no I don’t think you will need OpenCoarrays unless you want to write something that can be used on a massively parallel distributed memory machine (think a Cray with thousands of cores etc). However, if I’m going to run on a Cray I would used Cray’s compilers.
Exactly, on single node machines, you just need to install GFortran 16.1 (just like you just need to install Intel ifx to use coarrays). I am playing with it and it works nicely.
GCC 16.1 should be released officially tomorrow. It will then arrive progressively in all packaging systems.
A quick look at the source code shows references to pthreads if WIN32 and CYGWYN are not defined. Does WIndows support pthreads? If so it appears to be based on pthreads. As a side note, a Fortran pthread package was written by Richard Hanson, Henry Gabb and Clay Breshears (AKA Mr. Concurrency) around 2002. Richard, Henry, Clay and I all worked for or was affiliated with the old DoD HPCMP Programming Environments and Training (PET) program at the time. Richard was working with Rice University at the time and I lent him a two processor Pentium Pro box I had put together to use as a work station until he got official access to the DoD systems. There also appears to be a more recent Fortran Pthreads library based on F2003
GCC16 has an Algol68 Front-End. One of the recent additions is a way to call C from Algol so Fortran can be called too. No sign of how to go the other way round.
Yes I saw the Algol front end mentioned on the GCC web site. There also appears to be a GCC Rust compiler under development but I don’t know enough about Rust to compare it with the standard compiler. I will say if I was going to make the effort to learn a new language it would probably be Rust. I think Microsoft has announced they are rewritting parts of Windows in Rust.
Rust is definitely a nice language to learn, for discovering new programming and computing concepts and rediscovering classical ones. I have read last year that book to acquire the basics (which does not mean it is a book for beginners, it is definitely for people knowing already several languages):