PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

APM PGI 10.5 - !$acc do kernel

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
Tuan



Joined: 11 Jun 2009
Posts: 233

PostPosted: Sat May 15, 2010 9:14 pm    Post subject: APM PGI 10.5 - !$acc do kernel Reply with quote

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

Code:
!$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
Quote:
-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
Quote:
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
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6208
Location: The Portland Group Inc.

PostPosted: Mon May 17, 2010 3:49 pm    Post subject: Reply with quote

Hi Tuan,

Quote:
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.

Quote:

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
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group