public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/97589] New: Segementation fault when allocating coarrays.
@ 2020-10-27 11:58 toon at moene dot org
  2020-10-29 21:17 ` [Bug fortran/97589] " tkoenig at gcc dot gnu.org
                   ` (29 more replies)
  0 siblings, 30 replies; 31+ messages in thread
From: toon at moene dot org @ 2020-10-27 11:58 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97589
           Summary: Segementation fault when allocating coarrays.
           Product: gcc
           Version: coarray_native
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: toon at moene dot org
  Target Milestone: ---

Created attachment 49446
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49446&action=edit
The failing program.

I compiled the attached program as follows:

~/compilers/install/coarray_native/bin/gfortran -fbacktrace -fcoarray=shared
test-coarrays.f90 -lcaf_shared -lrt -lpthread

and ran it:

(export
LD_LIBRARY_PATH=/home/toon/compilers/install/coarray_native/lib/gcc/x86_64-pc-linux-gnu/11.0.0;
export GFORTRAN_NUM_IMAGES=1; echo ' &config / ' | ./a.out)
Decomposition information on image   1 : there are   1 *   1 slabs; the slab on
this image has  90 *  90 grid cells.

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x7f4af6b41bd0 in ???
#1  0x7f4af6b40e25 in ???
#2  0x7f4af67efcbf in ???
#3  0x7f4af6916e6d in ???
#4  0x7f4af6e264fb in get_memory_by_id_internal
        at /home/toon/compilers/coarray_native/libgfortran/nca/alloc.c:73
#5  0x401f70 in ???
#6  0x403a74 in ???
#7  0x7f4af6e26a7f in image_main_wrapper
        at
/home/toon/compilers/coarray_native/libgfortran/nca/coarraynative.c:83
#8  0x403acb in ???
#9  0x7f4af67dacc9 in ???
#10  0x401189 in ???
#11  0xffffffffffffffff in ???
ERROR: Image 1(0x22dbf4) failed

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
@ 2020-10-29 21:17 ` tkoenig at gcc dot gnu.org
  2020-10-29 21:24 ` tkoenig at gcc dot gnu.org
                   ` (28 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-10-29 21:17 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Seems fixed by https://gcc.gnu.org/g:23856d2f29fd87edf724ade48ee30c869a3b1ea3 .

Thanks for the report!

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
  2020-10-29 21:17 ` [Bug fortran/97589] " tkoenig at gcc dot gnu.org
@ 2020-10-29 21:24 ` tkoenig at gcc dot gnu.org
  2020-11-08 12:00 ` tkoenig at gcc dot gnu.org
                   ` (27 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-10-29 21:24 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
   Last reconfirmed|                            |2020-10-29
                 CC|                            |koenigni at gcc dot gnu.org
     Ever confirmed|0                           |1
         Resolution|FIXED                       |---

--- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Correction - you were referring to a runtime error, so this is not
yet fixed.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
  2020-10-29 21:17 ` [Bug fortran/97589] " tkoenig at gcc dot gnu.org
  2020-10-29 21:24 ` tkoenig at gcc dot gnu.org
@ 2020-11-08 12:00 ` tkoenig at gcc dot gnu.org
  2020-11-09 20:39 ` tkoenig at gcc dot gnu.org
                   ` (26 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-11-08 12:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Simplified test case:

program main
  type foo
     real, allocatable, dimension(:) :: a[:]
  end type foo
  type (foo) :: x
  sync all
  allocate (x%a(10)[*])
end program main

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (2 preceding siblings ...)
  2020-11-08 12:00 ` tkoenig at gcc dot gnu.org
@ 2020-11-09 20:39 ` tkoenig at gcc dot gnu.org
  2020-11-09 20:48 ` tkoenig at gcc dot gnu.org
                   ` (25 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-11-09 20:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(In reply to Thomas Koenig from comment #3)
> Simplified test case:
> 
> program main
>   type foo
>      real, allocatable, dimension(:) :: a[:]
>   end type foo
>   type (foo) :: x
>   sync all
>   allocate (x%a(10)[*])
> end program main

Correction: That does not always segfault.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (3 preceding siblings ...)
  2020-11-09 20:39 ` tkoenig at gcc dot gnu.org
@ 2020-11-09 20:48 ` tkoenig at gcc dot gnu.org
  2020-11-09 21:43 ` tkoenig at gcc dot gnu.org
                   ` (24 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-11-09 20:48 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |NEW

--- Comment #5 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Really reduced test case, no derived types are needed to expose the bug.

program random_weather
  implicit none
  real, allocatable :: my_ps(:,:)  [:,:]
  integer :: i, npx, nxlocal, nylocal, nzglobal
  nxlocal = 23
  nylocal = 23
  nzglobal = 30
  npx = 4
  allocate (my_ps(0:nxlocal-1, 0:nylocal-1) [0:npx-1,0:*])
end program random_weather

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (4 preceding siblings ...)
  2020-11-09 20:48 ` tkoenig at gcc dot gnu.org
@ 2020-11-09 21:43 ` tkoenig at gcc dot gnu.org
  2020-11-10  8:03 ` toon at moene dot org
                   ` (23 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-11-09 21:43 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING

--- Comment #6 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
After

https://gcc.gnu.org/pipermail/gcc-cvs/2020-November/336787.html

the simplified test case seems to be fixed.

What I now get with the original test case is

Decomposition information on image   4 : there are   2 *   4 slabs; the slab on
this image has  45 *  21 grid cells.
Decomposition information on image   6 : there are   2 *   4 slabs; the slab on
this image has  45 *  23 grid cells.
Decomposition information on image   2 : there are   2 *   4 slabs; the slab on
this image has  45 *  23 grid cells.
Decomposition information on image   8 : there are   2 *   4 slabs; the slab on
this image has  45 *  21 grid cells.
Decomposition information on image   5 : there are   2 *   4 slabs; the slab on
this image has  45 *  23 grid cells.
Decomposition information on image   1 : there are   2 *   4 slabs; the slab on
this image has  45 *  23 grid cells.
Decomposition information on image   7 : there are   2 *   4 slabs; the slab on
this image has  45 *  23 grid cells.
Decomposition information on image   3 : there are   2 *   4 slabs; the slab on
this image has  45 *  23 grid cells.
Size mismatch for coarray allocation id 0x608460: found = 30240 != size = 33120

where the error message seems to be correct; I think all coarrays
on different images must have the same size.

Toon, could you maybe comment?

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (5 preceding siblings ...)
  2020-11-09 21:43 ` tkoenig at gcc dot gnu.org
@ 2020-11-10  8:03 ` toon at moene dot org
  2020-11-10  9:02 ` tkoenig at gcc dot gnu.org
                   ` (22 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: toon at moene dot org @ 2020-11-10  8:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Toon Moene <toon at moene dot org> ---
I agree - the coarrays should be the same size and the program should just only
*use* the part that it needs.

I also got an error with the caf-mpi library, but that one was impossible to
understand (in fact, that was the reason I wanted to try the native version
...)

Thanks !

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (6 preceding siblings ...)
  2020-11-10  8:03 ` toon at moene dot org
@ 2020-11-10  9:02 ` tkoenig at gcc dot gnu.org
  2020-11-14 14:53 ` toon at moene dot org
                   ` (21 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-11-10  9:02 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |FIXED

--- Comment #8 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
So, this one is fixed then.

Thanks a lot for the bug report - handling coarrays as components
was actually broken in more than one way.

If you have anything else, don't hesitate to throw it at the branch :-)

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (7 preceding siblings ...)
  2020-11-10  9:02 ` tkoenig at gcc dot gnu.org
@ 2020-11-14 14:53 ` toon at moene dot org
  2020-11-15 11:43 ` tkoenig at gcc dot gnu.org
                   ` (20 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: toon at moene dot org @ 2020-11-14 14:53 UTC (permalink / raw)
  To: gcc-bugs

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

Toon Moene <toon at moene dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |---
             Status|RESOLVED                    |REOPENED

--- Comment #9 from Toon Moene <toon at moene dot org> ---
Unfortunately, I now get the following error on the original code in the
attachment:

(export
LD_LIBRARY_PATH=/home/toon/compilers/install/coarray_native/lib/gcc/x86_64-pc-linux-gnu/11.0.0;
export GFORTRAN_NUM_IMAGES=1; echo ' &config / ' | ./a.out)
Decomposition information on image   1 : there are   1 *   1 slabs; the slab on
this image has  90 *  90 grid cells.
Fortran runtime error: Integer overflow when calculating the amount of memory
to allocate

Error termination. Backtrace:
#0  0x7f310ff36bd0 in ???
#1  0x7f310ff37685 in ???
#2  0x7f310ff37b49 in ???
#3  0x40247b in __types_MOD_global_alloc
        at /home/toon/src/test-coarrays.f90:21
#4  0x403a74 in random_weather
        at /home/toon/src/test-coarrays.f90:95
#5  0x7f311021bc0a in image_main_wrapper
        at
/home/toon/compilers/coarray_native/libgfortran/nca/coarraynative.c:184
#6  0x403acb in main
        at /home/toon/src/test-coarrays.f90:28

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (8 preceding siblings ...)
  2020-11-14 14:53 ` toon at moene dot org
@ 2020-11-15 11:43 ` tkoenig at gcc dot gnu.org
  2020-11-15 18:30 ` toon at moene dot org
                   ` (19 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-11-15 11:43 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |WAITING

--- Comment #10 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(In reply to Toon Moene from comment #9)
> Unfortunately, I now get the following error on the original code in the
> attachment:
> 
> (export
> LD_LIBRARY_PATH=/home/toon/compilers/install/coarray_native/lib/gcc/x86_64-
> pc-linux-gnu/11.0.0; export GFORTRAN_NUM_IMAGES=1; echo ' &config / ' |
> ./a.out)
> Decomposition information on image   1 : there are   1 *   1 slabs; the slab
> on this image has  90 *  90 grid cells.
> Fortran runtime error: Integer overflow when calculating the amount of
> memory to allocate

That should be fixed with

https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=649754c5b4a888c2c69c1a9cbeb1c356899934c1

(which just removed the overflow checks).

Anything else? :-)

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (9 preceding siblings ...)
  2020-11-15 11:43 ` tkoenig at gcc dot gnu.org
@ 2020-11-15 18:30 ` toon at moene dot org
  2020-11-16 18:50 ` tkoenig at gcc dot gnu.org
                   ` (18 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: toon at moene dot org @ 2020-11-15 18:30 UTC (permalink / raw)
  To: gcc-bugs

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 !

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (10 preceding siblings ...)
  2020-11-15 18:30 ` toon at moene dot org
@ 2020-11-16 18:50 ` tkoenig at gcc dot gnu.org
  2020-11-16 20:27 ` tkoenig at gcc dot gnu.org
                   ` (17 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-11-16 18:50 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #12 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Reduced test case:

program main
  type global_model_state
     real, allocatable :: ps(:)  [:]
  end type global_model_state
  type (global_model_state) :: ms_full
  allocate (ms_full % ps(100) [*])
  ms_full %ps = 42.
end program main

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (11 preceding siblings ...)
  2020-11-16 18:50 ` tkoenig at gcc dot gnu.org
@ 2020-11-16 20:27 ` tkoenig at gcc dot gnu.org
  2020-11-16 20:33 ` tkoenig at gcc dot gnu.org
                   ` (16 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-11-16 20:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(In reply to Thomas Koenig from comment #12)
> Reduced test case:
> 
> program main
>   type global_model_state
>      real, allocatable :: ps(:)  [:]
>   end type global_model_state
>   type (global_model_state) :: ms_full
>   allocate (ms_full % ps(100) [*])
>   ms_full %ps = 42.
> end program main

That one is now fixed, but the original test case still segfaults.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (12 preceding siblings ...)
  2020-11-16 20:27 ` tkoenig at gcc dot gnu.org
@ 2020-11-16 20:33 ` tkoenig at gcc dot gnu.org
  2020-11-16 21:15 ` tkoenig at gcc dot gnu.org
                   ` (15 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-11-16 20:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(In reply to Thomas Koenig from comment #13)
> (In reply to Thomas Koenig from comment #12)
> > Reduced test case:
> > 
> > program main
> >   type global_model_state
> >      real, allocatable :: ps(:)  [:]
> >   end type global_model_state
> >   type (global_model_state) :: ms_full
> >   allocate (ms_full % ps(100) [*])
> >   ms_full %ps = 42.
> > end program main
> 
> That one is now fixed, but the original test case still segfaults.

... with 16 images:

Decomposition information on image   1 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image  13 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image  15 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image  16 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image   6 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image  14 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image   8 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image   2 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image   3 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image   4 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image  11 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image   7 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image  10 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image   5 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image   9 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image  12 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x7fb21745659f in ???
        at
/usr/src/debug/glibc-2.26-lp151.19.19.1.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
#1  0x41195b in __types_MOD_global_init
        at /home/ig25/Krempel/Nico/random_weather.f90:154
#2  0x4148e7 in random_weather
        at /home/ig25/Krempel/Nico/random_weather.f90:494
#3  0x41576d in image_main_wrapper
        at ../../../coarray_native/libgfortran/caf_shared/coarraynative.c:183
#4  0x4153d2 in main
        at /home/ig25/Krempel/Nico/random_weather.f90:413
ERROR: Image 16(0x5a1d) failed

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (13 preceding siblings ...)
  2020-11-16 20:33 ` tkoenig at gcc dot gnu.org
@ 2020-11-16 21:15 ` tkoenig at gcc dot gnu.org
  2020-11-16 21:15 ` tkoenig at gcc dot gnu.org
                   ` (14 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-11-16 21:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Next reduced test-case:

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (14 preceding siblings ...)
  2020-11-16 21:15 ` tkoenig at gcc dot gnu.org
@ 2020-11-16 21:15 ` tkoenig at gcc dot gnu.org
  2020-11-17 13:18 ` tkoenig at gcc dot gnu.org
                   ` (13 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-11-16 21:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
program random_weather
  implicit none
  type global_model_state
     real, allocatable :: ps(:,:)  [:,:]
  end type global_model_state
  integer :: nxslab, nyslab

  type(global_model_state) :: ms_full
  integer :: i, time, np1, np2, npx, npy, npxy
  real, parameter :: PS = 100000.0,  T = 300.0,    U = 0.0,    V = 0.0,    W =
0.0,      Q = 0.002    ! Mean value

  npxy = num_images()
  nxslab = 72
  nyslab = 70
  npx = 1
  allocate( ms_full % ps(0:nxslab-1, 0:nyslab-1)        [0:npx-1, 0:*] )

  ms_full % ps = PS
end program random_weather

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (15 preceding siblings ...)
  2020-11-16 21:15 ` tkoenig at gcc dot gnu.org
@ 2020-11-17 13:18 ` tkoenig at gcc dot gnu.org
  2020-11-22 13:20 ` tkoenig at gcc dot gnu.org
                   ` (12 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-11-17 13:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #17 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
A bit more reduced (no derived types necessary):

program random_weather
  implicit none
  real, allocatable :: ps(:,:)  [:,:]
  integer :: nxslab, nyslab

  integer :: npx
  integer :: i, j
  real, parameter :: PS1 = 100000.0

  nxslab = 72
  nyslab = 70
  npx = 1
  allocate( ps(nxslab, nyslab)        [npx, *] )
  ps(1,1) = PS1
end program random_weather

So, it appears that the offset for multi-co-dimensional
allocated coarrays is miscalculated.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (16 preceding siblings ...)
  2020-11-17 13:18 ` tkoenig at gcc dot gnu.org
@ 2020-11-22 13:20 ` tkoenig at gcc dot gnu.org
  2020-11-22 18:10 ` toon at moene dot org
                   ` (11 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-11-22 13:20 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING

--- Comment #18 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Hi Toon,

with https://gcc.gnu.org/pipermail/gcc-cvs/2020-November/337586.html ,
your program seems to work (at least the values look reasonable):

Decomposition information on image   2 : there are   3 *   2 slabs; the slabs
are  24 *  35 grid cells in size.
Decomposition information on image   5 : there are   3 *   2 slabs; the slabs
are  24 *  35 grid cells in size.
Decomposition information on image   3 : there are   3 *   2 slabs; the slabs
are  24 *  35 grid cells in size.
Decomposition information on image   1 : there are   3 *   2 slabs; the slabs
are  24 *  35 grid cells in size.
Decomposition information on image   4 : there are   3 *   2 slabs; the slabs
are  24 *  35 grid cells in size.
Decomposition information on image   6 : there are   3 *   2 slabs; the slabs
are  24 *  35 grid cells in size.
 Time           0  Image           5  PS=   99978.4531      T=    300.364166   
  U=    19.3067131      V=    15.9685030      W=   0.138491884      Q=   
2.17480748E-03
 Time           0  Image           1  PS=   99985.0938      T=    300.027161   
  U=   -9.06420994      V=    5.92245483      W=   0.137841657      Q=   
2.10389541E-03
 Time           0  Image           3  PS=   99999.3828      T=    300.014618   
  U=   -4.48150349      V=   -1.37469864      W=   -8.73371959E-02  Q=   
1.81287562E-03
 Time           0  Image           2  PS=   99986.4141      T=    300.200836   
  U=   -3.47342205      V=    16.5930214      W=   0.205771178      Q=   
1.97321200E-03
 Time           0  Image           6  PS=   99980.4141      T=    300.424133   
  U=    12.8092175      V=    11.5236654      W=    6.01452552E-02  Q=   
1.87643641E-03
 Time           0  Image           4  PS=   100010.516      T=    300.005005   
  U=    11.4250631      V=    3.44926071      W=  -0.227272436      Q=   
2.07653991E-03
 Time         240  Image           6  PS=   99990.5781      T=    300.666931   
  U=    22.8395500      V=   -11.9721365      W=    3.66642363E-02  Q=   
1.70292379E-03
 Time         240  Image           2  PS=   99980.1484      T=    300.538757   
  U=    19.1216316      V=    34.7150421      W=    3.16514075E-03  Q=   
2.09417334E-03
 Time         240  Image           1  PS=   99969.6641      T=    300.400970   
  U=    3.65581894      V=    16.8670387      W=    2.10290849E-02  Q=   
2.06003617E-03
 Time         240  Image           3  PS=   99995.2734      T=    300.354370   
  U=    4.84142876      V=    4.59838200      W=    1.12933442E-02  Q=   
1.67453510E-03
 Time         240  Image           5  PS=   99959.9141      T=    300.308228   
  U=    35.2094879      V=    26.3194275      W=    6.13999888E-02  Q=   
2.24495190E-03
 Time         240  Image           4  PS=   100024.211      T=    300.642700   
  U=   -21.4838848      V=   -5.71874714      W=   0.123860441      Q=   
1.77718676E-03
 Time         480  Image           1  PS=   99988.9688      T=    300.262726   
  U=   -1.55552006      V=    13.3446560      W=   -1.83758438E-02  Q=   
1.98666588E-03
 Time         480  Image           5  PS=   100030.500      T=    300.034546   
  U=    8.11599827      V=    49.5809326      W=   -1.16332620E-02  Q=   
2.18066899E-03
 Time         480  Image           3  PS=   99974.3828      T=    300.171265   
  U=   -12.1284695      V=    13.2599001      W=  -0.132261544      Q=   
1.64680334E-03
 Time         480  Image           6  PS=   99983.6328      T=    299.253204   
  U=   -16.0964108      V=   -7.74500656      W=  -0.392248750      Q=   
1.88040221E-03
 Time         480  Image           2  PS=   99969.3672      T=    299.095215   
  U=   -5.18578625      V=    36.8412170      W=  -0.231359661      Q=   
1.97951938E-03
 Time         480  Image           4  PS=   100016.453      T=    300.540619   
  U=   -1.72649384      V=    38.7740860      W=  -0.185899958      Q=   
2.31738412E-03

Thanks again for the test case, it certainly showed up a lot of bugs :-)

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (17 preceding siblings ...)
  2020-11-22 13:20 ` tkoenig at gcc dot gnu.org
@ 2020-11-22 18:10 ` toon at moene dot org
  2020-11-22 19:10 ` toon at moene dot org
                   ` (10 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: toon at moene dot org @ 2020-11-22 18:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #19 from Toon Moene <toon at moene dot org> ---
Thanks.

It works now for export GFORTRAN_NUM_IMAGES=1..10 for me.

Unfortunately, when I want to change the nxglobal and nyglobal values in the
domain via the namelist, sometimes the "default" values are used.

However, this could well be because I do not do the distribution of the
configuration values to the images other than 1 correctly.

If you see any shortcoming here I would be very interested in the analysis.

In any way, you can use this test case as you see fit - I wrote this in 2018
specifically to test the native coarrays ...

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (18 preceding siblings ...)
  2020-11-22 18:10 ` toon at moene dot org
@ 2020-11-22 19:10 ` toon at moene dot org
  2020-11-22 20:27 ` tkoenig at gcc dot gnu.org
                   ` (9 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: toon at moene dot org @ 2020-11-22 19:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #20 from Toon Moene <toon at moene dot org> ---
Example of the problem described in the last comment:

(export
LD_LIBRARY_PATH=/home/toon/compilers/install/coarray_native/lib/gcc/x86_64-pc-linux-gnu/11.0.0;
export GFORTRAN_NUM_IMAGES=28; echo ' &config nxglobal=936, nyglobal=770,
nzglobal=60 / ' | ./a.out)
Decomposition information on image   1 : there are   4 *   7 slabs; the slabs
are 234 * 110 grid cells in size.
Decomposition information on image   6 : there are   4 *   7 slabs; the slabs
are  18 *  10 grid cells in size.
Decomposition information on image   9 : there are   4 *   7 slabs; the slabs
are 234 * 110 grid cells in size.
Decomposition information on image  24 : there are   4 *   7 slabs; the slabs
are  18 *  10 grid cells in size.
Decomposition information on image  23 : there are   4 *   7 slabs; the slabs
are  18 *  10 grid cells in size.
Decomposition information on image   2 : there are   4 *   7 slabs; the slabs
are 234 * 110 grid cells in size.
Decomposition information on image  22 : there are   4 *   7 slabs; the slabs
are 234 * 110 grid cells in size.
Decomposition information on image  16 : there are   4 *   7 slabs; the slabs
are  18 *  10 grid cells in size.
Decomposition information on image  21 : there are   4 *   7 slabs; the slabs
are 234 * 110 grid cells in size.
Decomposition information on image  12 : there are   4 *   7 slabs; the slabs
are 234 * 110 grid cells in size.
Decomposition information on image   8 : there are   4 *   7 slabs; the slabs
are 234 * 110 grid cells in size.
Decomposition information on image  26 : there are   4 *   7 slabs; the slabs
are 234 * 110 grid cells in size.
Decomposition information on image  14 : there are   4 *   7 slabs; the slabs
are  18 *  10 grid cells in size.
Decomposition information on image   5 : there are   4 *   7 slabs; the slabs
are 234 * 110 grid cells in size.
Decomposition information on image  15 : there are   4 *   7 slabs; the slabs
are  18 *  10 grid cells in size.
Decomposition information on image   3 : there are   4 *   7 slabs; the slabs
are 234 * 110 grid cells in size.
Decomposition information on image  19 : there are   4 *   7 slabs; the slabs
are  18 *  10 grid cells in size.
Decomposition information on image  27 : there are   4 *   7 slabs; the slabs
are 234 * 110 grid cells in size.
Decomposition information on image  10 : there are   4 *   7 slabs; the slabs
are 234 * 110 grid cells in size.
Decomposition information on image   7 : there are   4 *   7 slabs; the slabs
are  18 *  10 grid cells in size.
Decomposition information on image  25 : there are   4 *   7 slabs; the slabs
are  18 *  10 grid cells in size.
Decomposition information on image  11 : there are   4 *   7 slabs; the slabs
are  18 *  10 grid cells in size.
Decomposition information on image   4 : there are   4 *   7 slabs; the slabs
are 234 * 110 grid cells in size.
Decomposition information on image  13 : there are   4 *   7 slabs; the slabs
are  18 *  10 grid cells in size.
Decomposition information on image  20 : there are   4 *   7 slabs; the slabs
are 234 * 110 grid cells in size.
Decomposition information on image  17 : there are   4 *   7 slabs; the slabs
are 234 * 110 grid cells in size.
Decomposition information on image  18 : there are   4 *   7 slabs; the slabs
are 234 * 110 grid cells in size.
Decomposition information on image  28 : there are   4 *   7 slabs; the slabs
are 234 * 110 grid cells in size.
Size mismatch for coarray allocation id 0x419400: found = 2882880 != size =
20160
Size mismatch for coarray allocation id 0x419400: found = 2882880 != size =
20160
ERROR: Image 28(0x1e0a22) failed

BTW, I cannot replicate this reliably, so it is probably timing related ...

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (19 preceding siblings ...)
  2020-11-22 19:10 ` toon at moene dot org
@ 2020-11-22 20:27 ` tkoenig at gcc dot gnu.org
  2020-11-26 22:41 ` tkoenig at gcc dot gnu.org
                   ` (8 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-11-22 20:27 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #21 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Hi Toon,

yes, I can replicate this.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (20 preceding siblings ...)
  2020-11-22 20:27 ` tkoenig at gcc dot gnu.org
@ 2020-11-26 22:41 ` tkoenig at gcc dot gnu.org
  2020-11-27  8:34 ` toon at moene dot org
                   ` (7 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-11-26 22:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #22 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Hi Toon,

it took some time, but we finally figured out that it is actually
a bug in your program that is causing problems.

It has (shortened)

nxglobal = 72;

This sets the coarray nxglobal to 72 on every image, including image 2.

if (this_image() == 1) then
   read(*,config)

This optionally reads in nxglobal[1].

!     Why won't this work as nxglobal[:] = nx ?
   do i = 2, num_images()
      nxglobal[i] = nxglobal;

This sets nxglobal[2] on image 2 from image 1. This is a race
condition: It is not clear which store comes first.

To fix this, you would need a "sync all" before the
if (this_image() = 1) statement, or you could set the default
value on image 1 only.

(Incidentally, looking at this code led to finding a bug in
namelist handling, where the implied this_image() was not honored
(namelist I/O only worked on image 1), so the time looking at this
bug was not wasted :-)

By the way, there is also a segfault with GFORTRAN_NUM_IMAGES=64, which
will need to be investigated.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (21 preceding siblings ...)
  2020-11-26 22:41 ` tkoenig at gcc dot gnu.org
@ 2020-11-27  8:34 ` toon at moene dot org
  2020-11-27 14:35 ` toon at moene dot org
                   ` (6 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: toon at moene dot org @ 2020-11-27  8:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #23 from Toon Moene <toon at moene dot org> ---
The segfault at GFORTRAN_NUM_IMAGES=64 might be due to the fact that the
program doesn't contain a check whether the size of the boundary relaxation
zone (currently set to 4) is too large for the slabs.

The boundary relaxation is programmed under the assumption that the size of a
slab >= 4x4.

If that's the problem, it should go away by setting the size to 3 or 2 (or use
a larger domain than horizontally 72 x 70).

The current version of the program can be found at:

http://moene.org/~toon/random-weather

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (22 preceding siblings ...)
  2020-11-27  8:34 ` toon at moene dot org
@ 2020-11-27 14:35 ` toon at moene dot org
  2020-11-27 17:52 ` toon at moene dot org
                   ` (5 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: toon at moene dot org @ 2020-11-27 14:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #24 from Toon Moene <toon at moene dot org> ---
And I can reproduce the GFORTRAN_NUM_IMAGES=64 segfault:

(export
LD_LIBRARY_PATH=/home/toon/compilers/install/coarray_native/lib/gcc/x86_64-pc-linux-gnu/11.0.0;
export GFORTRAN_NUM_IMAGES=64; echo ' &config nxglobal=936, nyglobal=770,
nzglobal=60 / ' | ./a.out)

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x7fec7b252bd0 in ???
#1  0x7fec7b251e25 in ???
#2  0x7fec7af00cbf in ???
#3  0x7fec7b5377ae in shared_malloc
        at
/home/toon/compilers/coarray_native/libgfortran/caf_shared/allocator.c:70
#4  0x7fec7b5374ab in get_memory_by_id_internal
        at
/home/toon/compilers/coarray_native/libgfortran/caf_shared/alloc.c:75
#5  0x4141ed in random_weather
        at /home/toon/src/random-weather.f90:551
#6  0x7fec7b537c0a in image_main_wrapper
        at
/home/toon/compilers/coarray_native/libgfortran/caf_shared/coarraynative.c:183
#7  0x415d2a in main
        at /home/toon/src/random-weather.f90:413
ERROR: Image 64(0x3a877f) failed

after which message it hangs ...

Notably, I did add a check on boundary relaxation zone size, so that cannot be
the problem.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (23 preceding siblings ...)
  2020-11-27 14:35 ` toon at moene dot org
@ 2020-11-27 17:52 ` toon at moene dot org
  2020-11-28 17:16 ` tkoenig at gcc dot gnu.org
                   ` (4 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: toon at moene dot org @ 2020-11-27 17:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #25 from Toon Moene <toon at moene dot org> ---
BTW, the speed difference between the native and the OpenMPI based program is
staggering. For a 936x770x60 grid, the native run takes around 14 seconds
elapsed time, while the OpenMPI based one takes 2 minutes on my 10 core x 2
hyperthreads Skylake machine.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (24 preceding siblings ...)
  2020-11-27 17:52 ` toon at moene dot org
@ 2020-11-28 17:16 ` tkoenig at gcc dot gnu.org
  2020-11-28 20:12 ` toon at moene dot org
                   ` (3 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-11-28 17:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #26 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
After 00c2e5d1c15c67fc2c9d9ed86bfa1f5aa13848cc ,
the segfault for too many images is now also fixed,
and your program runs as expected.

I'd say an important milestone has been reached :-)

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (25 preceding siblings ...)
  2020-11-28 17:16 ` tkoenig at gcc dot gnu.org
@ 2020-11-28 20:12 ` toon at moene dot org
  2021-09-08 20:05 ` anlauf at gcc dot gnu.org
                   ` (2 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: toon at moene dot org @ 2020-11-28 20:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #27 from Toon Moene <toon at moene dot org> ---
Yes, I am now convince this works (64 leads to stop 1, but 63 works).

Note that I slightly changed the program today, to add a sync all before the
forecasting loop, and adding one to the copy_local_to_global defined assignment
procedure.

Thanks for your perseverance.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (26 preceding siblings ...)
  2020-11-28 20:12 ` toon at moene dot org
@ 2021-09-08 20:05 ` anlauf at gcc dot gnu.org
  2021-09-09  7:01 ` toon at moene dot org
  2021-09-09 18:08 ` anlauf at gcc dot gnu.org
  29 siblings, 0 replies; 31+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-09-08 20:05 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING

--- Comment #28 from anlauf at gcc dot gnu.org ---
(In reply to Toon Moene from comment #27)
> Yes, I am now convince this works (64 leads to stop 1, but 63 works).

So has this been definitely fixed, and can we close it?

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (27 preceding siblings ...)
  2021-09-08 20:05 ` anlauf at gcc dot gnu.org
@ 2021-09-09  7:01 ` toon at moene dot org
  2021-09-09 18:08 ` anlauf at gcc dot gnu.org
  29 siblings, 0 replies; 31+ messages in thread
From: toon at moene dot org @ 2021-09-09  7:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #29 from Toon Moene <toon at moene dot org> ---
On 9/8/21 10:05 PM, anlauf at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97589
> 
> anlauf at gcc dot gnu.org changed:
> 
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>               Status|NEW                         |WAITING
> 
> --- Comment #28 from anlauf at gcc dot gnu.org ---
> (In reply to Toon Moene from comment #27)
>> Yes, I am now convince this works (64 leads to stop 1, but 63 works).
> 
> So has this been definitely fixed, and can we close it?
> 

Yes, it can be closed - thanks !

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Bug fortran/97589] Segementation fault when allocating coarrays.
  2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
                   ` (28 preceding siblings ...)
  2021-09-09  7:01 ` toon at moene dot org
@ 2021-09-09 18:08 ` anlauf at gcc dot gnu.org
  29 siblings, 0 replies; 31+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-09-09 18:08 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
                 CC|                            |anlauf at gcc dot gnu.org
             Status|WAITING                     |RESOLVED

--- Comment #30 from anlauf at gcc dot gnu.org ---
Thanks for the confirmation!  Closing.

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2021-09-09 18:08 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-27 11:58 [Bug fortran/97589] New: Segementation fault when allocating coarrays toon at moene dot org
2020-10-29 21:17 ` [Bug fortran/97589] " tkoenig at gcc dot gnu.org
2020-10-29 21:24 ` tkoenig at gcc dot gnu.org
2020-11-08 12:00 ` tkoenig at gcc dot gnu.org
2020-11-09 20:39 ` tkoenig at gcc dot gnu.org
2020-11-09 20:48 ` tkoenig at gcc dot gnu.org
2020-11-09 21:43 ` tkoenig at gcc dot gnu.org
2020-11-10  8:03 ` toon at moene dot org
2020-11-10  9:02 ` tkoenig at gcc dot gnu.org
2020-11-14 14:53 ` toon at moene dot org
2020-11-15 11:43 ` tkoenig at gcc dot gnu.org
2020-11-15 18:30 ` toon at moene dot org
2020-11-16 18:50 ` tkoenig at gcc dot gnu.org
2020-11-16 20:27 ` tkoenig at gcc dot gnu.org
2020-11-16 20:33 ` tkoenig at gcc dot gnu.org
2020-11-16 21:15 ` tkoenig at gcc dot gnu.org
2020-11-16 21:15 ` tkoenig at gcc dot gnu.org
2020-11-17 13:18 ` tkoenig at gcc dot gnu.org
2020-11-22 13:20 ` tkoenig at gcc dot gnu.org
2020-11-22 18:10 ` toon at moene dot org
2020-11-22 19:10 ` toon at moene dot org
2020-11-22 20:27 ` tkoenig at gcc dot gnu.org
2020-11-26 22:41 ` tkoenig at gcc dot gnu.org
2020-11-27  8:34 ` toon at moene dot org
2020-11-27 14:35 ` toon at moene dot org
2020-11-27 17:52 ` toon at moene dot org
2020-11-28 17:16 ` tkoenig at gcc dot gnu.org
2020-11-28 20:12 ` toon at moene dot org
2021-09-08 20:05 ` anlauf at gcc dot gnu.org
2021-09-09  7:01 ` toon at moene dot org
2021-09-09 18:08 ` anlauf at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).