Default(none) requires data clause on compiler temporary variable

Using x86 NVHPC/22.3, compiling the following with nvfortran -acc -c sa.f90 gives:

NVFORTRAN-S-1069-Data clause required with default(none) - z_c_0(:) (sa.f90: 15)
  0 inform,   0 warnings,   1 severes, 0 fatal for do_local

Which is a variable that doesn’t exist in the code. Same thing happens if dummy is defined in a module.

pure subroutine dummy(p1, p2)
  implicit none
  !$acc routine seq
  real(8), dimension(3), intent(in) :: p1, p2
end subroutine dummy


subroutine do_local(m)
  implicit none
  integer, intent(in) :: m
  real(8) :: p1(3), p2(3), s
  integer :: i

  !$acc parallel loop private(p1,p2) default(none)
  do i = 1, m
     s = dble(i)/dble(m)
     p1 = [0.d0, 0.d0, 0.d0]
     p2 = [0.d0, 0.d0, s]
     call dummy(p1, p2)
  end do
end subroutine do_local

Thanks,
Paul

Thanks Paul.

While I’m not seeing a specific related report, it looks like we may already have this one fixed in the May 22.5 release.

% nvfortran -c test.F90 -acc -V22.3
NVFORTRAN-S-1069-Data clause required with default(none) - z_c_0(:) (test.F90: 14)
  0 inform,   0 warnings,   1 severes, 0 fatal for do_local
% nvfortran -c test.F90 -acc -V22.5
%

Since 22.5 is still a pre-release I can’t guarantee that this may get reverted prior to release (i.e. if whatever change engineer did to fix the issue causes other issues and has to be pulled), but this would be unlikely.

-Mat

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.