public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/94129] New: Using almost any openacc !$acc directive causes ICE "compressed stream: data error"
@ 2020-03-10 19:49 andrew at blamsoft dot com
  2020-03-11  7:45 ` [Bug fortran/94129] " rguenth at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: andrew at blamsoft dot com @ 2020-03-10 19:49 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94129
           Summary: Using almost any openacc !$acc directive causes ICE
                    "compressed stream: data error"
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: andrew at blamsoft dot com
  Target Milestone: ---

I am using the Ubuntu gcc/gfortran 10 packages with nvptx offloading.
Specifically, the packages are gfortran-10 and gcc-10-offload-nvptx. The
specific versions are:

GNU Fortran (Ubuntu 10-20200304-1ubuntu1) 10.0.1 20200304 (experimental)
[master revision
0b0908c1f27:cb0a7e0ca53:94f7d7ec6ebef49a50da777fd71db3d03ee03aa0]

gcc (Ubuntu 10-20200304-1ubuntu1) 10.0.1 20200304 (experimental) [master
revision 0b0908c1f27:cb0a7e0ca53:94f7d7ec6ebef49a50da777fd71db3d03ee03aa0]

When trying to use openacc I get the following ICE.

0x8bc90a lto_uncompression_zlib
        ../../src-nvptx/gcc/lto-compress.c:393
0x8bc90a lto_end_uncompression(lto_compression_stream*, lto_compression)
        ../../src-nvptx/gcc/lto-compress.c:415
0x8bac1e lto_get_section_data(lto_file_decl_data*, lto_section_type, char
const*, int, unsigned long*, bool)
        ../../src-nvptx/gcc/lto-section-in.c:166
0x8ac51b lto_input_mode_table(lto_file_decl_data*)
        ../../src-nvptx/gcc/lto-streamer-in.c:1603
0x5c776d lto_file_finalize
        ../../src-nvptx/gcc/lto/lto-common.c:2200
0x5c776d lto_create_files_from_ids
        ../../src-nvptx/gcc/lto/lto-common.c:2237
0x5c776d lto_file_read
        ../../src-nvptx/gcc/lto/lto-common.c:2292
0x5c776d read_cgraph_and_symbols(unsigned int, char const**)
        ../../src-nvptx/gcc/lto/lto-common.c:2744
0x5b6466 lto_main()
        ../../src-nvptx/gcc/lto/lto.c:630
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
mkoffload: fatal error: x86_64-linux-gnu-accel-nvptx-none-gcc-10 returned 1
exit status
compilation terminated.
lto-wrapper: fatal error:
/usr/lib/gcc/x86_64-linux-gnu/10//accel/nvptx-none/mkoffload returned 1 exit
status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status

I have found that using "data" and "host_data" work. Any other directive I try
such as "parallel" or "kernels" causes a crash. Here is a tutorial program I
found that causes the crash. I could not find any simple program online that
didn't crash.

program main

    ! Size of vectors
    integer :: n = 100000000

    ! Input vectors
    real(8),dimension(:),allocatable :: a
    real(8),dimension(:),allocatable :: b 
    ! Output vector
    real(8),dimension(:),allocatable :: c

    integer :: i
    real(8) :: sum

    ! Allocate memory for each vector
    allocate(a(n))
    allocate(b(n))
    allocate(c(n))

    ! Initialize content of input vectors, vector a[i] = sin(i)^2 vector b[i] =
cos(i)^2
    do i=1,n
        a(i) = sin(i*1D0)*sin(i*1D0)
        b(i) = cos(i*1D0)*cos(i*1D0) 
    enddo

    ! Sum component wise and save result into vector c

    !$acc kernels copyin(a(1:n),b(1:n)), copyout(c(1:n))
    do i=1,n
        c(i) = a(i) + b(i)
    enddo
    !$acc end kernels

    ! Sum up vector c and print result divided by n, this should equal 1 within
error
    do i=1,n
        sum = sum +  c(i)
    enddo
    sum = sum/n
    print *, 'final result: ', sum

    ! Release memory
    deallocate(a)
    deallocate(b)
    deallocate(c)

end program

Compile with:
gfortran -fopenacc program.f90

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

end of thread, other threads:[~2020-04-17  8:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-10 19:49 [Bug fortran/94129] New: Using almost any openacc !$acc directive causes ICE "compressed stream: data error" andrew at blamsoft dot com
2020-03-11  7:45 ` [Bug fortran/94129] " rguenth at gcc dot gnu.org
2020-03-11  8:28 ` marxin at gcc dot gnu.org
2020-03-11 12:57 ` doko at debian dot org
2020-03-11 13:07 ` rguenth at gcc dot gnu.org
2020-03-11 13:11 ` rguenth at gcc dot gnu.org
2020-03-11 13:13 ` marxin at gcc dot gnu.org
2020-03-11 15:34 ` doko at debian dot org
2020-03-12 15:22 ` marxin at gcc dot gnu.org
2020-04-16 13:02 ` marxin at gcc dot gnu.org
2020-04-16 13:14 ` rguenth at gcc dot gnu.org
2020-04-17  8:46 ` marxin 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).