PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

unspecified launch failure
Goto page Previous  1, 2
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
mkcolg



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

PostPosted: Mon Feb 07, 2011 4:47 pm    Post subject: Reply with quote

Hi Bingray,

Sometimes you see these types of unexplained errors when the Kernel launch before this memCopy failed. Are you checking the return status of your kernel launches? If not, try adding the following code after each one.

Code:
istat = cudathreadsynchronize()
errCode = cudaGetLastError()
if (errCode .gt. 0) then
       print *, 'ERROR in B12_dev:', errCode
       stop 'Error! Kernel failed!'
endif


Let me know if this finds anything.

- Mat
Back to top
View user's profile
cu239



Joined: 20 Mar 2009
Posts: 14

PostPosted: Wed Feb 09, 2011 10:34 pm    Post subject: Reply with quote

Hi Mat,


I detected the failed kernel launch by monitoring the kernel's running time. Checking the return status is a better way.

The failed code

Code:
   ELSEIF (UVM_dev(J)==0.5) THEN
      If(FSR_dev(I_S_dev(1,J))==1.0) Then
         I=I_S_dev(1,J)
      Else
         I=I_S_dev(2,J)
      Endif
      M1 = M_T_dev(1,I)
      M2 = M_T_dev(2,I)
      M3 = M_T_dev(3,I)
      J1 = J_T_dev(1,I)
      J2 = J_T_dev(2,I)
      J3 = J_T_dev(3,I)
      UX_dev(J,K) = ( UA_dev(J3,K)*(YN_dev(M2)-YN_dev(M1))      &
&        + UA_dev(J1,K)*(YN_dev(M3)-YN_dev(M2))                &
&        + UA_dev(J2,K)*(YN_dev(M1)-YN_dev(M3)) ) / ART_dev(I)
   ENDIF

was replaced by

Code:
   ELSEIF (UVM_dev(J)==0.5) THEN
      UX_dev(J,K) = 0.0
   ENDIF

and then it's running fine.

But I can't see why the original code fails. Under "release" configuration, the new code can run when compiled by PVF 11.1 with cuda toolkit 3.2, while it still fails when compiled by PVF 10.8 with cuda toolkit 3.1. Under "debug" configuration, the program can't run and immediately finishes without a warning.

I'll check the return status and look for other errors.

Thanks a lot!


Bingray
Back to top
View user's profile
mkcolg



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

PostPosted: Fri Feb 11, 2011 3:29 pm    Post subject: Reply with quote

Hi Bingray,

My best guess is that you're getting an access violation when indexing the UA_dev, YN_dev, or ART_dev arrays. What I would do first, is compile the code in emulation mode with array bounds checking enabled (-Mcuda=emu -Mbounds). If that didn't show anything, I would then break up your "UX_dev=" expression and then comment out each line in turn until you can determine which array is causing the fault.

- 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
Goto page Previous  1, 2
Page 2 of 2

 
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