PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

PGI generates kernel that couldn't be launched
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
MuellerM



Joined: 04 Apr 2013
Posts: 46

PostPosted: Tue Apr 23, 2013 8:26 pm    Post subject: Reply with quote

mkcolg wrote:

Quote:

I remember there was a limit for size of kernel arguments (256 byte). Could it be the reason of launch failure in this case?
No, for kernels with larger number of arguments we work around this limitation by packing the arguments into a struct, copy the struct to the device, and then only pass a pointer to the struct as the kernel argument.


Hey Mat, may I ask whether you've got any bug reports hanging on this feature? I may be able to create you one - I have a program that fails when relying on this feature, but runs fine when I pack certain arguments manually. I haven't constructed a minimal example yet, but I could do that in case that would be helpful to you - hence my question.
Back to top
View user's profile
AROM



Joined: 03 Apr 2013
Posts: 39

PostPosted: Tue Apr 23, 2013 9:11 pm    Post subject: Reply with quote

Hi Mat!

I split the kernel into two parts. The first part works Ok while the second one result in "Launch failure". Cuda-memcheck shows a lot of errors with this part.

My code structure for the second part is the following:
Code:
!$acc kernels
!$acc loop independent collapse(2)
do i=its,ite
do j=jts,jte
!$acc loop seq
    do k=kts,kte
! do something
    end do
!-------------
    k = kte
    arr1(k) = ...(k)
    ....
    arrn(k)..
!--------------
!$acc loop seq
    do k=kte-1,kts, -1
       ....
    end do
    ....
end do
end do
!$acc end kernels


my workaround was to substitute 'k' with 'kte' in the middle part of the kernel
Back to top
View user's profile
MuellerM



Joined: 04 Apr 2013
Posts: 46

PostPosted: Tue Apr 23, 2013 10:34 pm    Post subject: Reply with quote

Hey Arom, your case looks very similar to the problem I had. In my case the passing of too many arguments into a CUDA Fortran kernel lead to an integer argument to be corrupted, which lead to invalid read/writes when using arrays that were declared with that integer as a dimension. Reducing the amount of arguments by packing them into an array manually solved my problem.
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Apr 24, 2013 1:33 am    Post subject: Reply with quote

Hi AROM, MuellerM,

Would it be possible for you both to send to PGI Customer Service (trs@pgroup.com) or post a reproducing example?

Thanks,
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