unsupported call to 'pgf90_alloc04_i8'

Hi all,

I’ve recently upgraded to 13.10 to fix an earlier problem, but now I get the following error message:

Accelerator restriction: unsupported call to ‘pgf90_alloc04_i8’

It comes in the following context:

185, Accelerator region ignored
227, Accelerator restriction: function/procedure calls are not supported
239, Accelerator restriction: induction variable live-out from loop: k
240, Accelerator restriction: induction variable live-out from loop: k
249, Accelerator restriction: unsupported call to ‘pgf90_alloc04_i8’

I understand the live-out business, and I’ll fix that up on my own, but I find that last line quite strange. Line 249 is simply

line 227   do  j = 1, nx

...

            if ( j /= k) then                               
                temp_row = W(k,1:nx)
line 247        W(k,1:nx) = W(j,1:nx)
                W(j,1:nx) = temp_row
                reciproc(k) = reciproc(j)
            endif

...
        enddo

W is declared as:

real(SELECTED_REAL_KIND(P=12, R = 60)) :: W(nx, nx)

where nx is a dummy variable which isn’t very large. I’m compiling with -Mlarge_arrays and -mcmodel=medium. Again, I’ll do some more investigating, but it strikes me that this is the wrong error message.

Rob

It looks like PGI wants to allocate integer variable for each thread. Memory allocation function couldn’t be inlined into the kernel code.

Yes, that’s what it looks like. But that doesn’t seem to match the code. I’ve fix the live-out variable, but this allocation error remains.

Any ideas?

Hi Rob,

The “pgf90_alloc04_i8” message typically means that compiler added a temp array and is trying to allocate it. This can happen when using array syntax since the right-hand side expression needs to be fully evaluated before assigned to the left-hand side. Though, very often the compiler can optimize out the need for a temp array and why this isn’t usually a problem.

Why it’s happening here, I can’t tell from what you’ve posted. The “i8” indicates that it’s trying to allocate an array of INTEGER(8), but “W” is a REAL. Also, expressions with array syntax is just one case where a temp array could be created. So we’re missing enough information to give you a good explanation.

Can you please either post or send to PGI Customer Service (trs@pgroup.com) a reproducing example?

Thanks,
Mat

Thanks Mat. Here is a stripped down version:

program acc_error_test

  implicit none 

  integer :: nx
  integer :: j 
  integer :: k 
  real(SELECTED_REAL_KIND( P=12,R=60)) :: W(825,825)
  
  nx = 825
  
  k = 1
  W = 0.0
!$acc kernels
  do  j = 1, nx
     
     if ( j /= k) then
        W(k,1:nx) = W(j,1:nx)
     endif
     
     
  enddo
!$acc end kernels

end program acc_error_test

Compiling:

~/codes/sandbox> pgf90 -acc -Minfo=accel -lcublas -Mcuda -Mlarge_arrays -mcmodel=medium -fast -o acc_error_test acc_error_test.f90
PGF90-W-0155-Accelerator region ignored; see -Minfo messages (acc_error_test.f90: 18)
acc_error_test:
18, Accelerator region ignored
19, Accelerator restriction: function/procedure calls are not supported
22, Accelerator restriction: unsupported call to ‘pgf90_alloc04_i8’
0 inform, 1 warnings, 0 severes, 0 fatal for acc_error_test
~/codes/sandbox>

-Rob

Hi Rob,

The quick work around is to compile with “-i8” or declare “j” as “integer(kind=8)”.

I’ll need to ask why were generating the integer(8) temp array when j is an integer(4), but it looks to me to be due to address offsets for large array support. Though, let me get the definitive answer.

  • Mat

That works, but now as I try to unstrip down (or is it strip up?) my code, the following produces the same error (compiling with -i8 doesn’t help).

program acc_error_test

  implicit none 

  integer(kind = 8) :: nx
  integer(kind = 8) :: j 
  integer(kind = 8) :: k 
  integer(kind = 8) :: pivot(825)
  real(SELECTED_REAL_KIND( P=12,R=60)) :: W(825,825)
  
  
  
  nx = 825
  
  k = 1
  W = 0.0
  pivot = 1
!$acc kernels
  do  j = 1, nx
     
     if ( j /= k) then
        W(pivot(j),1:nx) = W(j,1:nx)
     endif
     
     
  enddo
!$acc end kernels

end program acc_error_test

I’ll put together a problem report to see if our compiler engineers can get the code generation cleaned up so this will accelerate easier. The work-around is to set the value of pivot to a temp variable.

program acc_error_test

   implicit none

   integer(kind = 8) :: nx
   integer(kind = 8) :: j
   integer(kind = 8) :: k, pv
   integer(kind = 8) :: pivot(825)
   real(SELECTED_REAL_KIND( P=12,R=60)) :: W(825,825)



   nx = 825

   k = 1
   W = 0.0
   pivot = 1
 !$acc kernels
 !$acc loop independent
   do  j = 1, nx

      if ( j /= k) then
         pv = pivot(j)
         W(pv,1:nx) = W(j,1:nx)
     !    W(pivot(j),1:nx) = W(j,1:nx)
      endif


   enddo
 !$acc end kernels

 end program acc_error_test
  • Mat