Internal compiler error. max_ili_ili argument error 0

Hello,

I’m trying to parallelize a function of a program. This function is defined in a module of the program. The code below is from the function

        do ic = 1,nc
          imp = endpht(ip-1) + ic
          i = lstpht(imp)
          il = ilocal(i)
          iu = indxuo(i)
          ia = iaorb(i)
          is = isa(ia)
          iop = listp2(imp)
!  Generate or retrieve phi values
          if (DirectPhi) then
            if (ia.ne.lasta .or. iop.ne.lastop) then
              lasta = ia
              lastop = iop
              do isp = 1,nsp
                dxsp(:) = xdsp(:,isp) + xdop(:,iop) - dxa(:,ia)
                r2sp = sum(dxsp**2)
                if (r2sp.lt.r2cut(is)) then
                  call all_phi( is, +1, dxsp, nphiloc, phia(:,isp) )
                else
                  phia(:,isp) = 0.0_dp
                endif
              enddo
            endif
            iphi = iphorb(i)
            Clocal(:,ic) = phia(iphi,:)
          else
          Clocal(:,ic) = phi(:,imp)
          endif
        enddo

When I tried to apply the parallel directive to this loop, in the compilation stage, compiler PGI 12.6 said

298, Accelerator restriction: function/procedure calls are not supported
300, sum reduction inlined
302, Accelerator restriction: function/procedure calls are not supported
0 inform, 1 warnings, 0 severes, 0 fatal for rhoofd

This warning was caused by calling function all_phi. I commented out the first part of the IF statement like this:

do ic = 1,nc
          imp = endpht(ip-1) + ic
          i = lstpht(imp)
          il = ilocal(i)
          iu = indxuo(i)
          ia = iaorb(i)
          is = isa(ia)
          iop = listp2(imp)
!  Generate or retrieve phi values
!          if (DirectPhi) then
!            if (ia.ne.lasta .or. iop.ne.lastop) then
!              lasta = ia
!              lastop = iop
!              do isp = 1,nsp
!                dxsp(:) = xdsp(:,isp) + xdop(:,iop) - dxa(:,ia)
!                r2sp = sum(dxsp**2)
!                if (r2sp.lt.r2cut(is)) then
!                  call all_phi( is, +1, dxsp, nphiloc, phia(:,isp) )
!                else
!                  phia(:,isp) = 0.0_dp
!                endif
!              enddo
!            endif
!            iphi = iphorb(i)
!            Clocal(:,ic) = phia(iphi,:)
!          else
          Clocal(:,ic) = phi(:,imp)
!          endif
        enddo

When I tried to compile the module, I got the following error:

pgfortran -c -g -acc -ta=nvidia -Minfo=all,ccff FoX/FoX-config --fcflags <path_to_the_module>
PGF90-F-0000-Internal compiler error. max_ili_ili argument error 0
(<path_to_the_module>:<error_line>)
make: *** [rhoofd.o] Error 2

What should I do to fix this internal compiler error?
Thank you.

Hi Minh Duc Nguyen,

What should I do to fix this internal compiler error?

An internal compiler error (ICE) means there’s a problem with the compiler itself. Unfortunately, the exact cause of the ICE is context sensitive so we would need a reproducing example to determine the cause. Can you send an example to PGI Customer Service (trs@pgroup.com)?

Note that we do have an open problem report (TPR#18857) which has the same ICE. It doesn’t mean that your error is the same, but there is a good chance.

Best Regards,
Mat