On 6/27/25 17:41, Toon Moene wrote:
Note: as the timeline at the top of the source implies, I have worked on
this until early 2021.
This means it compiled with gfortran 10 and 11.
So the problem is probably introduced after these versions.
[ Of course, while I perused the Fortran 2018 standard while writing
this code, I could easily have made an error that gfortran 10/11 simply
didn't catch. ]
I just used the following:
$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-linux-gnu/14/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian
14.2.0-19' --with-bugurl=file:///usr/share/doc/gcc-14/README.Bugs
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2,rust
--prefix=/usr --with-gcc-major-version-only --program-suffix=-14
--program-prefix=x86_64-linux-gnu- --enable-shared
--enable-linker-build-id --libexecdir=/usr/libexec
--without-included-gettext --enable-threads=posix --libdir=/usr/lib
--enable-nls --enable-bootstrap --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace
--enable-gnu-unique-object --disable-vtable-verify --enable-plugin
--enable-default-pie --with-system-zlib
--enable-libphobos-checking=release --with-target-system-zlib=auto
--enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet
--with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32
--enable-multilib --with-tune=generic
--enable-offload-targets=nvptx-none=/build/reproducible-path/gcc-14-14.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/reproducible-path/gcc-14-14.2.0/debian/tmp-gcn/usr
--enable-offload-defaulted --without-cuda-driver
--enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
--with-build-config=bootstrap-lto-lean --enable-link-serialization=3
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.2.0 (Debian 14.2.0-19)
$ su --login
# apt install libcoarrays-openmpi-dev
libcoarrays-openmpi-dev is already the newest version (2.10.2+ds-4).
$ gfortran -v -fcoarray=lib random-weather.f90 -lcaf_openmpi
Driving: gfortran -v -fcoarray=lib random-weather.f90 -lcaf_openmpi -l
gfortran -l m -shared-libgcc
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-linux-gnu/14/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian
14.2.0-19' --with-bugurl=file:///usr/share/doc/gcc-14/README.Bugs
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2,rust
--prefix=/usr --with-gcc-major-version-only --program-suffix=-14
--program-prefix=x86_64-linux-gnu- --enable-shared
--enable-linker-build-id --libexecdir=/usr/libexec
--without-included-gettext --enable-threads=posix --libdir=/usr/lib
--enable-nls --enable-bootstrap --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace
--enable-gnu-unique-object --disable-vtable-verify --enable-plugin
--enable-default-pie --with-system-zlib
--enable-libphobos-checking=release --with-target-system-zlib=auto
--enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet
--with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32
--enable-multilib --with-tune=generic
--enable-offload-targets=nvptx-none=/build/reproducible-path/gcc-14-14.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/reproducible-path/gcc-14-14.2.0/debian/tmp-gcn/usr
--enable-offload-defaulted --without-cuda-driver
--enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
--with-build-config=bootstrap-lto-lean --enable-link-serialization=3
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.2.0 (Debian 14.2.0-19)
COLLECT_GCC_OPTIONS='-v' '-fcoarray=lib'
'-foffload-options=-l_GCC_gfortran' '-foffload-options=-l_GCC_m'
'-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'a-'
/usr/libexec/gcc/x86_64-linux-gnu/14/f951 random-weather.f90 -quiet
-dumpdir a- -dumpbase random-weather.f90 -dumpbase-ext .f90
-mtune=generic -march=x86-64 -version -fcoarray=lib
-foffload-options=-l_GCC_gfortran -foffload-options=-l_GCC_m
-fintrinsic-modules-path /usr/lib/gcc/x86_64-linux-gnu/14/finclude
-fpre-include=/usr/include/finclude/x86_64-linux-gnu/math-vector-fortran.h
-o /tmp/cchsje2B.s
GNU Fortran (Debian 14.2.0-19) version 14.2.0 (x86_64-linux-gnu)
compiled by GNU C version 14.2.0, GMP version 6.3.0, MPFR version
4.2.1, MPC version 1.3.1, isl version isl-0.27-GMP
warning: MPFR header version 4.2.1 differs from library version 4.2.2.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
COLLECT_GCC_OPTIONS='-v' '-fcoarray=lib'
'-foffload-options=-l_GCC_gfortran' '-foffload-options=-l_GCC_m'
'-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'a-'
as -v --64 -o /tmp/ccLAkhDa.o /tmp/cchsje2B.s
GNU assembler version 2.44 (x86_64-linux-gnu) using BFD version (GNU
Binutils for Debian) 2.44
Reading specs from /usr/lib/gcc/x86_64-linux-gnu/14/libgfortran.spec
rename spec lib to liborig
COLLECT_GCC_OPTIONS='-v' '-fcoarray=lib'
'-foffload-options=-l_GCC_gfortran' '-foffload-options=-l_GCC_m'
'-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'a-'
COMPILER_PATH=/usr/libexec/gcc/x86_64-linux-gnu/14/:/usr/libexec/gcc/x86_64-linux-gnu/14/:/usr/libexec/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/14/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/14/:/usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/14/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/14/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-fcoarray=lib'
'-foffload-options=-l_GCC_gfortran' '-foffload-options=-l_GCC_m'
'-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'a.'
/usr/libexec/gcc/x86_64-linux-gnu/14/collect2 -plugin
/usr/libexec/gcc/x86_64-linux-gnu/14/liblto_plugin.so
-plugin-opt=/usr/libexec/gcc/x86_64-linux-gnu/14/lto-wrapper
-plugin-opt=-fresolution=/tmp/cch0pDOv.res
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lquadmath -plugin-opt=-pass-through=-lm
-plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s
-plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64
--hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2
-pie /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o
/usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/crti.o
/usr/lib/gcc/x86_64-linux-gnu/14/crtbeginS.o
-L/usr/lib/gcc/x86_64-linux-gnu/14
-L/usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu
-L/usr/lib/gcc/x86_64-linux-gnu/14/../../../../lib
-L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu
-L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/14/../../..
/tmp/ccLAkhDa.o -lcaf_openmpi -lgfortran -lm -lgcc_s -lgcc --as-needed
-lquadmath --no-as-needed -lm -lc -lgcc_s -lgcc
/usr/lib/gcc/x86_64-linux-gnu/14/crtendS.o
/usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/crtn.o
COLLECT_GCC_OPTIONS='-v' '-fcoarray=lib'
'-foffload-options=-l_GCC_gfortran' '-foffload-options=-l_GCC_m'
'-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'a.'
$ echo ' &config / ' | mpirun -np 9 ./a.out
[moene][[38819,1],8][../../../../../../opal/mca/btl/tcp/btl_tcp_proc.c:266:mca_btl_tcp_proc_create_interface_graph]
Unable to find reachable pairing between local and remote interfaces
[moene][[38819,1],8][../../../../../../opal/mca/btl/tcp/btl_tcp_proc.c:266:mca_btl_tcp_proc_create_interface_graph]
Unable to find reachable pairing between local and remote interfaces
...
Decomposition information on image 9 : there are 9 * 1 slabs; the
slabs are 8 * 70 grid cells in size.
Decomposition information on image 7 : there are 9 * 1 slabs; the
slabs are 8 * 70 grid cells in size.
Decomposition information on image 4 : there are 9 * 1 slabs; the
slabs are 8 * 70 grid cells in size.
Decomposition information on image 3 : there are 9 * 1 slabs; the
slabs are 8 * 70 grid cells in size.
Decomposition information on image 2 : there are 9 * 1 slabs; the
slabs are 8 * 70 grid cells in size.
Decomposition information on image 5 : there are 9 * 1 slabs; the
slabs are 8 * 70 grid cells in size.
Decomposition information on image 8 : there are 9 * 1 slabs; the
slabs are 8 * 70 grid cells in size.
Decomposition information on image 6 : there are 9 * 1 slabs; the
slabs are 8 * 70 grid cells in size.
Decomposition information on image 1 : there are 9 * 1 slabs; the
slabs are 8 * 70 grid cells in size.
Time 0 Image 9 PS= 99993.0938 T=
299.807098 U= -4.68836164 V= -3.28215408 W=
1.67415049E-02 Q= 2.11236533E-03
Time 0 Image 8 PS= 99993.6953 T=
300.043518 U= -12.8777018 V= -22.9066315 W=
-0.175551116 Q= 1.78670883E-03
Time 0 Image 2 PS= 99986.9688 T=
299.987213 U= -15.6621017 V= -14.4746389 W=
0.164351568 Q= 1.89338077E-03
...
Time 3600 Image 3 PS= 100041.141 T=
301.850708 U= 24.1793842 V= -11.8091040 W=
-0.445870042 Q= 2.58838967E-03
Time 3600 Image 1 PS= 100004.141 T=
299.877686 U= -4.40453911 V= 19.4066467 W=
8.26476812E-02 Q= 1.63628976E-03
Time 3600 Image 4 PS= 100094.172 T=
300.223022 U= -8.31251431 V= 44.4242210 W=
1.16551733 Q= 2.56650499E-03
So that still works, using gfortran 14.
Hope that helps,
--
Toon Moene - e-mail: t...@moene.org - phone: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands