| View previous topic :: View next topic |
| Author |
Message |
MuellerM
Joined: 04 Apr 2013 Posts: 4
|
Posted: Tue Apr 23, 2013 8:26 pm Post subject: |
|
|
| 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 |
|
 |
AROM
Joined: 03 Apr 2013 Posts: 8
|
Posted: Tue Apr 23, 2013 9:11 pm Post subject: |
|
|
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 |
|
 |
MuellerM
Joined: 04 Apr 2013 Posts: 4
|
Posted: Tue Apr 23, 2013 10:34 pm Post subject: |
|
|
| 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 |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4996 Location: The Portland Group Inc.
|
Posted: Wed Apr 24, 2013 1:33 am Post subject: |
|
|
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 |
|
 |
|