All,
The gfortran developers have added a shared-memory
implementation for coarray Fortran. The forthcoming
GCC 16.1 will be the first release with this support.
This implementation sits on top an operating system's
pthread library (at least on Linux and BSD).
To use it, one compile with
% gfortran -fcoarray=lib -lcaf_shmem file.f90
On 3/5/2026 2:56 PM, Steven G. Kargl wrote:
All,Speaking of coarrays, I never did get a clear explanation of how to have
The gfortran developers have added a shared-memory
implementation for coarray Fortran. The forthcoming
GCC 16.1 will be the first release with this support.
This implementation sits on top an operating system's
pthread library (at least on Linux and BSD).
To use it, one compile with
% gfortran -fcoarray=lib -lcaf_shmem file.f90
a single instance of a GUI but with a coarray subsection (4 cores on
Windows with the particular IVF and hardware I had) in the same process.
Within the same application i always got 4 copies of the GUI. I could find no way to designate only certain threads were to be duplicated on
the 4 cores, rather than the entire executable/program. I ended up
trying a coarray calculation engine and a separate GUI process that communicated with it via shared memory. Is it possible within a single coarray application to have such fine control over what is delegated to
each core?
It worked with the separate GUI control, but for my application it only
got about 10% performance improvement and was too difficult to support
long term.
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,099 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 492372:33:16 |
| Calls: | 14,105 |
| Calls today: | 1 |
| Files: | 187,124 |
| D/L today: |
1,282 files (580M bytes) |
| Messages: | 2,495,994 |