APM PGI 10.5 - !$acc do kernel

When I use the directive “!$acc do kernel” for my loops which is supposed to run on Accelerator, there is no output during the compiling process telling whether my code is parallelizable or not.

Example

!$acc do kernel
          DO i = 1,N
             Ab(i,1) = Ab(i,1) + 1/dt
             DO j=1, maxnklm+maxnklp-1
                compP(j,i) = compPdt(i,j)*dt + compP(j-1,i)
                IF (flag.EQ.1 .AND. compP(j,i) .GE. X(i)) THEN
	           isfu(i) = indexPdt(i,j)
                   flag = 0
                ENDIF
             ENDDO
          ENDDO

I used

-ta=nvidia,3.0,cc13 -Minfo=accel -v

However, when I try with “!$acc region do kernel”, it compile successfully. Nevertheless, it has runtime error

call to cuMemcpyDtoH returned error 700: Launch failed

I have no idea what cause this error, as the data is small, and they are all allocated. I hope

  • some one can give me a hint
  • the compiler should be able to tell which variable cause this error (in Debug mode).

Thanks,
Tuan

Hi Tuan,

When I use the directive “!$acc do kernel” for my loops which is supposed to run on Accelerator, there is no output during the compiling process telling whether my code is parallelizable or not.

The “acc do” directive will be ignored unless it’s within an accelerator region.

However, when I try with “!$acc region do kernel”, it compile successfully. Nevertheless, it has runtime error
Quote:
call to cuMemcpyDtoH returned error 700: Launch failed

I’m guessing that the code is seg faulting on the GPU due to the line “compP(j,i) = compPdt(i,j)*dt + compP(j-1,i)”. You’re reading past the bounds of the compP loop when “j” is 1 (assuming compP’s lower bound is 1).

Hope this helps,
Mat