Compiler error with 21.5 and OpenACC

I have a program that I compile a couple of different ways. It utilizes DO CONCURRENT loops and the stdpar flag. When I have DO CONCURRENT loops and data movement OpenACC pragmas and compile with “-stdpar=multicore”, I get the error below. If I remove the data movement pragmas, the code compiles fine. I compile two separate versions for my needs with “-stdpar=multicore” and “-stdpar=gpu” because I need dedicated versions for both the CPU and GPU. I leave the data movement pragmas in my CPU code so that I do not need to have multiple versions of my code.

nvfortran-Fatal-/opt/nvidia/hpc_sdk/Linux_x86_64/21.5/compilers/bin/tools/fort2 TERMINATED by signal 11

Arguments to /opt/nvidia/hpc_sdk/Linux_x86_64/21.5/compilers/bin/tools/fort2

/opt/nvidia/hpc_sdk/Linux_x86_64/21.5/compilers/bin/tools/fort2 /tmp/nvfortranjsUjBC50nOxH.ilm -fn diffuse_Y-ACC_Y-OMP_Y-DC-R/diffuse.f -opt 3 -terse 1 -inform warn -x 51 0x20 -x 119 0xa10000 -x 122 0x40 -x 123 0x1000 -x 127 4 -x 127 17 -x 19 0x400000 -x 28 0x40000 -x 120 0x10000000 -x 70 0x8000 -x 122 1 -x 125 0x20000 -quad -vect 56 -y 34 16 -x 34 0x8 -x 32 31457280 -y 19 8 -y 35 0 -x 42 0x30 -x 39 0x40 -x 39 0x80 -x 59 4 -x 129 2 -tp haswell -x 120 0x1000 -x 124 0x1400 -y 15 2 -x 57 0x3b0000 -x 58 0x48000000 -x 49 0x100 -astype 0 -x 121 1 -x 183 4 -x 121 0x800 -x 68 0x1 -x 8 0x40000000 -x 70 0x40000000 -x 56 0x10 -x 54 0x10 -x 249 110 -x 68 0x20 -x 70 0x40000000 -x 8 0x40000000 -x 164 0x800000 -x 85 0x2000 -x 85 0x4000 -x 34 0x40000000 -x 53 0x800000 -x 68 0x1 -x 39 4 -x 56 0x10 -x 26 0x10 -x 26 1 -x 56 0x4000 -x 124 1 -accel multicore -accel multicore -x 180 0x4000400 -x 121 0xc00 -x 186 0x80 -x 163 1 -x 186 0x80000 -x 180 0x400 -x 121 0xc00 -x 210 8 -x 180 0x4000400 -x 121 0xc00 -x 186 0x80 -x 163 1 -x 186 0x80000 -x 180 0x400 -x 121 0xc00 -x 240 0x1 -x 210 8 -y 163 0xc0000000 -x 189 0x10 -y 189 0x4000000 -x 9 1 -x 72 0x1 -x 136 0x11 -x 37 0x480000 -x 9 1 -x 72 0x1 -x 136 0x11 -x 37 0x480000 -x 0 0x1000000 -x 2 0x100000 -x 0 0x2000000 -x 161 16384 -x 162 16384 -cci /tmp/nvfortranrsUjZ-Ke_dvo.cci -cmdline ‘+nvfortran diffuse_Y-ACC_Y-OMP_Y-DC-R/diffuse.f -o diffuse_3_Y-ACC_Y-OMP_Y-DC-R.o -c -O3 -Mvect=simd -I/opt/psi/nv/ext_deps/deps/hdf4/include -I/opt/psi/nv/ext_deps/deps/hdf5/include -I/opt/psi/nv/ext_deps/deps/jpeg/include -I/opt/psi/nv/ext_deps/deps/zlib/include -acc=multicore -stdpar=multicore -Minfo=accel’ -stbfile /tmp/nvfortranzsUjl_Svcg9N.stb -asm /tmp/nvfortran5sUjRLrPabVs.ll

Can you provide a small reproducing example that exhibits the error? If so, I can then investigate and file a problem report for out engineers.

Thanks,
Mat

My code works fine with nvfortran 21.3, but fails with nvfortran 21.5. Below is a small test case. I compile with “nvfortran -stdpar=multicore test.f”. When I comment out “numbers(:,:)=1.0”, the code fails to compile, but another strange bug is that if I change have “numbers(:,:)=1.0” commented out but change “print*, numbers(i,1)” to “print*, numbers(i,i)”, it compiles without a problem.

When I compile this same code with “nvfortran -acc=multicore test.f”, it compiles without a problem. It would appear the OpenACC data movement pragmas are not ignored.

      program TEST
c
c-----------------------------------------------------------------------
c
      implicit none
      real :: numbers(5,5)
      integer :: i,j
      integer, dimension(:,:), allocatable :: temp
      allocate(temp(5,5))

c If you comment out this line, compile fails with 
c "nvfortran -stdpar=multicore test.f"
c      numbers(:,:)=1.0

!$acc enter data copyin(numbers)
!$acc enter data copyin(temp)
c      
      call set_data(numbers)
c
!$acc exit data copyout(numbers)
!$acc exit data delete(temp)

      do i=1,5
        print*, numbers(i,1)
      enddo

      end program
c
      subroutine set_data(numbers)
        implicit none
        real :: numbers(5,5)
        integer :: i,j
        do concurrent (i=1:5,j=1:5)
           numbers(i,j) = 2.0
        enddo
      end subroutine
c

Thanks mikostul, the example is helpful. I was able to reproduce the issue here and and filed a problem report (TPR #30214)

Note that the error does not occur if you remove the data directives. Since you’re targeting the CPU, these are extraneous so might serve as a work around until we can get this fixed.

-Mat

Hello Mat,

I compile the same code on the GPU and CPU, so it was nice with 21.3 that I did not need multiple versions of my code. Now it appears I either have to get rid of my directives and trust “-stdpar=gpu” or have multiple versions.

Thank you for the help.

-Miko

Hi Mat,

Why would the compile even look at the “acc” data pragmas when being compiled for the CPU with -stdpar=multicore? Shouldn’t all acc and omp pragmas be ignored under that compilation?

  • Ron

Hi Ron,

The directives themselves would still be processed by the compiler, even if they later ignored by the back-end when doing the code generation.

-Mat