NV 23.7 Not compiling code that worked with 23.5

Hi,

I just installed NV 23.7 and my code (MAS) no longer compiles.

I have a character(64) string in a module:

character(64) :: boundary_frame='FAKE_COROTATING'

that I put on the device with:

!$acc enter data copyin(boundary_frame)

It is used in a do concurrent loop as:

          do concurrent (k=2:npm1, j=1:ntm1)
            ........
            if (boundary_frame.eq."FAKE_COROTATING") then
              av_vp=av_vp+r0*st(j)*omega_corotate
            end if
            vtaux(j,k)=av_vp*av_br-av_vr*av_bp
          enddo

This used to work fine, but now the compiler is giving this error:

NVFORTRAN-S-0155-Compiler failed to translate accelerator region (see -Minfo messages): Could not find allocated-variable index for symbol - boundary_frame (mas.f: 64388)

Is using this character array in this way not allowed or is this a compiler problem?

Thanks!

– Ron

Hi Ron,

I tried to create a reproducer but wasn’t able to get it fail. Are you able to proved a minimal reproducing example?

I do see one other similar report with a character but not a character array. May be the same issue or something different but I can’t tell without a reproducer.

-Mat

Hi,

Here is a reproducer:

      module interplanetary_vars
      
      character(64) :: boundary_frame='F'
      
      end module
c#######################################################################
      program test
      
      use iso_fortran_env
      use interplanetary_vars
            
      implicit none
      
      integer, parameter :: r8=REAL64
      
      integer :: i,j
      
      real(8) :: n,m
      
      real(r8), dimension(:,:), allocatable :: x,y
      
      n = 10
      m = 20
            
      allocate(x(n,m))
      allocate(y(n,m))            
      
      x(:,:) = 0.
      y(:,:) = 0.
      
!$acc enter data copyin(x,y)     

      call start
      
      do concurrent (j=2:m, i=1:n)
        x(i,j) = 2.0 + y(i,j)

        if (boundary_frame.eq."FAKE_COROTATING") then
          x(i,j) = 2.0*x(i,j)
        end if

      enddo
      
!$acc update self(x)
      
      print*,x(:,:)
      
      end program test
c#######################################################################
      subroutine start      
      
      use interplanetary_vars
      
      boundary_frame='FAKE_COROTATING'
      
!$acc enter data copyin(boundary_frame)
      
      
      end subroutine start  
c#######################################################################      

If the data movement of boundary_frame is done in the main program it works fine. It is only when it is done in a routine.

– Ron

Thanks Ron.

Looks like this is indeed the same issue that was reported earlier and appears to have already been fixed in our pre-release 23.9.

I do need to make the usual caveat that since I’m testing against a pre-release compiler, things may change before the final release. While unlikely, it’s possible that other issues arise causing the fix to get pulled. Though I’ll add your issue to the previous report so it’s tracked as well.

-Mat