I have created a new gfortran-test branch on gcc here.
origin/devel/gfortran-test
This has the patches applied as needed to do the testing I have done.
When Andre's patches are approved I will revert and rebase this so we can test
the next set of major changes. I have done this to simplify the process of
testing for those who would like to just check out the branch and build it.
Regards,
Jerry
On 7/17/25 5:44 PM, Jerry D wrote:
On 7/16/25 7:13 AM, Andre Vehreschild wrote:
Hi Jerry,
I am back on track.
--- snip ---
After some back and forth with Andre I finally understand the discrepancies I
was having here. Andre has an OpenCoarrays branch being used to update
OpenCoarrays to sync with changes to gfortran-16. This branch is here:
https://github.com/sourceryinstitute/OpenCoarrays/tree/vehre/issue-779-form-team
The changes being made to implement the newer TEAM features and shared mem
result in a change to the gfortran interface for -fcoarray=lib libraries. The
first four patches of the patch set implement these changes. The last two add
the new shared memory library.
First I applied the gfortran patches and did a clean build of the compiler.
Second I rebuild OpenCoarrays with the issue-779-form-team branch using the
patched gfortran compiler.
All OpenCoarrays tests pass.
Here is the results of the random-weather example:
$ cat ~/bin/set-shared
export FC=/home/jerry/dev/usrav/bin/gfortran
export CC=/home/jerry/dev/usrav/bin/gcc
export GFORTRAN_NUM_IMAGES=8
export LD_LIBRARY_PATH=/home/jerry/dev/usrav/lib64/:/home/jerry/dev/usrav/lib/
[aside: FC and CC must be set correctly so the OpenCoarrays uses the correct
gfortran]
$ . set-shared
$ $FC -v
Using built-in specs.
COLLECT_GCC=/home/jerry/dev/usrav/bin/gfortran
COLLECT_LTO_WRAPPER=/home/jerry/dev/usrav/libexec/gcc/x86_64-pc-linux-
gnu/16.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gccav/configure --prefix=/home/jerry/dev/usrav --enable-
languages=c,c++,fortran --enable-libgomp --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.0 20250717 (experimental) (GCC)
[aside: No need to install as long as one uses the newly built caf and cafrun.]
$ ../opencoarrays-clean/bin/caf random-weather.f90
$ time ../opencoarrays-clean/bin/cafrun -np 8 ./a.out
.
.
.
real 0m26.533s
user 3m2.067s
sys 2m35.954s
$ $FC -fcoarray=lib random-weather.f90 -lcaf_shmem
$ time ./a.out
.
.
.
real 0m0.055s
user 0m0.279s
sys 0m0.102s
With this setup I can test with other examples. I have the necessary gfortran
patches gathered here and will get these out to the gfortran-test branch I
created earlier.
Regards,
Jerry