complier error with cuda fortran code

Hello,

I am new to cuda fortran. Someone please tell why I am getting compiler errors with the last line in the following code. The error message is
PGF90-S-0155-DEVICE or SHARED arrays may not be automatic - xloc (enrgy_eval.f90)
Thanks in advance
The code is below:

attributes(global) subroutine enrgy_eval_kernel( x, y, z, WLKR, NCL_NO, KE, V, sig_6)
implicit none
integer, value, intent(in) :: WLKR, NCL_NO
real *8, value, intent(in) :: sig_6
real *8, device, intent(in), dimension(WLKR,NCL_NO) :: x, y, z
real *8, device, intent(out), dimension(WLKR) :: KE, V

real *8, shared, dimension(blockdim%x,NCL_NO) :: xloc

Hi mbkumar,

Support for dynamic shared memory was added in the 11.6 release. You will need to update your compiler version or change xloc to be a fixed size.

Hope this helps,
Mat

Hello Mat,

Thanks for the info. I updated the PGI compiler and now it compiles.