Coarray shared memory testing

Jerry D jvdelisle2@gmail.com
Fri Oct 3 00:30:32 GMT 2025


On 10/1/25 6:52 AM, Andre Vehreschild wrote:
> Hi all,
> 
> attached series of patches adds more stable support for running shared
> memory multi process Fortran programs on MacOS. The only new part is the last
> (the pr88076_v4_9.patch). Changes in the former files are only results of
> rebasing.
> 
> On MacOS shared memory coarrays face the issue of having to have the shared
> memory segment at the same (virtual) base address in all processes/images, but
> the OS not always complying to our wish. The supervisor of the coarray program
> therefore now is able to restart an image, when the OS is not complying to put
> the shared memory segment where we need to have it. The shared memory segment
> needs to be at the same address in all images, because else shared mutexes tend
> malfunction. I haven't found any documentation from Apple or the
> MachOS kernel why this is that way, but it unfortunately is. The number of
> restarts of images is limited. I.e. this is not going on forever, but one can
> either set a (documented) environment variable, or got with the default of
> 4000 at the moment. The count on restarts is total on all images and not per
> image.
> 
> It took me quite some time to figure what was going on and I had to fix
> libsanitizer on macOS for newer OS releases, which being unfamiliar took me
> even longer. There might be other issues fixed unintentionally by these
> patches. So feel free to test.
> 
> Regtested ok on x86_64-pc-linux-gnu / F41, x86_64-w64-win32 / MSYS2 / UCRT64 and
> x86_64-apple-darwin24.something. (Testing on MSYS2/UCRT64 gives tons of fails
> of 'excess output' tests, which stem from gfortran emitting some escape code,
> which doesn't even print, and expect picking it up.)
> 
> Regards,
> 	Andre
The devel/gfortran-test branch has been updated to align with the latest 
trunk and the version 4 of Andre's patch series applied.

This should allow anyone to checkout this gcc branch and do testing.

All testing is appreciated.

Regards,

Jerry


More information about the Fortran mailing list