Re: GCC/gfortran: asking for permission to merge devel/gfortran-test into master, adding a shared memory implementation of coarrays.

Toon Moene <[email protected]>
Newsgroups gmane.comp.gcc.patches,gmane.comp.gcc.fortran
Organization Moene Computational Physics, Maartensdijk, The Netherlands
Message-ID <[email protected]>
On 2/8/26 22:15, Thomas Koenig wrote:

> Jerry,
> 
> you know my concerns about this patch set - race conditions which I
> do not know were fixed.
> 
> Is there a record somewhere of the race conditions that were found
> and fixed?
> 
> Can you describe the testing that was done?  Were test
> programs run on machines which which would likely provoke
> race conditions, like a 400-process parallel run on cfarm120?

We tested the lock race condition you found (test program):

program memain
    use, intrinsic :: iso_fortran_env, only : lock_type
    type(lock_type), codimension[*] :: lck
    integer, codimension[*] :: count
    integer :: i, j, s
    do j=0,5  ! To be adjusted, dunno how long this runs
      if (this_image() == 1) count = 0
      sync all
      do i=1,10**j
         lock (lck[1])
         count[1] = count[1] + 1
         unlock (lck[1])
      end do
      sync all
      if (this_image() == 1) then
         print *,"Expected: ",10**j*num_images(), "Found: ", count
      end if
      sync all
    end do
end program

It turned out to be a problem that was genuine to the coarray 
implementation in the front-end (tested by Andre himself with OpenCoarrays).

He fixed it, and we moved on.

Kind regards,

-- 
Toon Moene - e-mail: [email protected] - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.