public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgomp/95150] New: Some offloaded programs crash with openmp
@ 2020-05-15 11:36 chinoune.mehdi at hotmail dot com
  2020-05-15 14:10 ` [Bug libgomp/95150] " burnus at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: chinoune.mehdi at hotmail dot com @ 2020-05-15 11:36 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95150
           Summary: Some offloaded programs crash with openmp
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgomp
          Assignee: unassigned at gcc dot gnu.org
          Reporter: chinoune.mehdi at hotmail dot com
                CC: jakub at gcc dot gnu.org
  Target Milestone: ---

This is the reduced program:

$ cat matmul.F90
program main
  implicit none
  integer, parameter :: sp = selected_real_kind(6,37)
  integer, parameter :: l = 1024, m = 1024, n = 1024
  real(sp), allocatable :: a(:,:), b(:,:), c(:,:)
  integer :: i, j, k, t1, t2
  real(sp) :: tic
  !
  call system_clock( t1, tic)
  !
  allocate( a(l,m), b(m,n), c(l,n) )
  !
  call random_number(a)
  call random_number(b)
  c = 0._sp
  !
  !$acc data copyin(a,b) copyout(c)
  !$acc parallel loop collapse(3)
  !$omp target teams distribute collapse(3) map( to:a,b ) map( tofrom:c)
  do j = 1, n
    do k = 1, m
      do i = 1, l
        c(i,j) = a(i,k)*b(k,j) + c(i,j)
      end do
    end do
  end do
  !$acc end data
  !
  call system_clock(t2)
  print*, (t2-t1)/tic
  !
end program main

This program compiles successfully with both OpenMP and OpenACC but it crashs
with OpenMP after a short time of running, throwing this error message:

$ gfortran-10 -fopenmp -foffload=nvptx-none="-lm -lgfortran" matmul.F90 -o
test.x
$ $ ./test.x

libgomp: cuCtxSynchronize error: the launch timed out and was terminated

The same message appears with gfortran-9

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

end of thread, other threads:[~2021-07-28  8:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15 11:36 [Bug libgomp/95150] New: Some offloaded programs crash with openmp chinoune.mehdi at hotmail dot com
2020-05-15 14:10 ` [Bug libgomp/95150] " burnus at gcc dot gnu.org
2020-05-15 15:42 ` chinoune.mehdi at hotmail dot com
2020-05-15 15:49 ` chinoune.mehdi at hotmail dot com
2020-05-21  7:12 ` chinoune.mehdi at hotmail dot com
2020-10-30  9:32 ` mehdi.chinoune at hotmail dot com
2020-12-12 20:03 ` mehdi.chinoune at hotmail dot com
2020-12-13  3:33 ` mehdi.chinoune at hotmail dot com
2020-12-13  4:21 ` mehdi.chinoune at hotmail dot com
2020-12-19 12:18 ` mehdi.chinoune at hotmail dot com
2021-07-28  8:26 ` mehdi.chinoune at hotmail dot com

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).