https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97589

--- Comment #11 from Toon Moene <toon at moene dot org> ---
Created attachment 49564
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49564&action=edit
The full program I am testing.

This is the full program I am testing. 

I have compiled it as follows (after building the latest coarray_native
branch):

~/compilers/install/coarray_native/bin/gfortran -g -fbacktrace -fcoarray=shared
 random-weather.f90  -lcaf_shared -lrt -lpthread

and run it as:

(export
LD_LIBRARY_PATH=/home/toon/compilers/install/coarray_native/lib/gcc/x86_64-pc-linux-gnu/11.0.0;
export GFORTRAN_NUM_IMAGES=N; echo ' &config / ' | ./a.out)

It works with

export GFORTRAN_NUM_IMAGES=2 ... 10

but crashes with a segmentation fault using

export GFORTRAN_NUM_IMAGES=1

(besides, it gives bogus numbers when it runs - this is readily apparent by
running the program compiled with -fcoarray=lib -lcaf_openmpi and compare).

Hope this helps - I am looking forward to this alternative implementation of
coarrays !

Reply via email to