PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Course

Used of shared memory in device function
Goto page Previous  1, 2, 3, 4
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
DAVID-SPH



Joined: 23 May 2011
Posts: 28

PostPosted: Wed Sep 05, 2012 9:43 am    Post subject: Reply with quote

Thanks for the heads up Mat.
A very important one is ibits, just in case priorities are been asigned.


Best Regards,
Back to top
View user's profile
jtull



Joined: 30 Jun 2004
Posts: 601

PostPosted: Tue May 21, 2013 6:53 pm    Post subject: TPR 18883 is fixed. Reply with quote

Late notice.

TPR 18883 - CUDA Fortran: Full implementation of Fortran elemental functions

was corrected as of the 12.9 release.

thanks,
dave
Back to top
View user's profile
egodfred



Joined: 23 Sep 2014
Posts: 23

PostPosted: Thu Sep 17, 2015 8:38 am    Post subject: Reply with quote

I will like to know if its possible to copy data from one shared array to another? In my code I passed two fixed size shared arrays to a device subroutine in which I copy some of potions of the array from one to another, something like:
Code:

sXconf(j1,:,:) = spXconf(j1,:,:)

where j1 is the threadid, the code compiles well but at runtime I get a memcpy error which using cuda-memcheck I get the following:
Code:

========= Invalid __global__ write of size 8
=========     at 0x00001098 in /home/godfred/bio/Godfred/papers/2014/qmc/Codes/CUDA4-5/host_subs_m.CUF:798:host_subs_m_d_pmetropolis_
=========     by thread (0,0,0) in block (0,0,0)
=========     Address 0x3f4d77f200000001 is misaligned
=========     Device Frame:/home/godfred/bio/Godfred/papers/2014/qmc/Codes/CUDA4-5/host_subs_m.CUF:1080:host_subs_m_kernel1_ (host_subs_m_kernel1_ : 0x2ce0)
=========     Saved host backtrace up to driver entry point at kernel launch time
=========     Host Frame:/usr/lib64/libcuda.so.1 (cuLaunchKernel + 0x2c5) [0x14ad95]
=========     Host Frame:/state/partition1/pgitest/linux86-64/2015/cuda/6.5/lib64/libcudart.so.6.5 [0xf5d8]
=========     Host Frame:/state/partition1/pgitest/linux86-64/2015/cuda/6.5/lib64/libcudart.so.6.5 (cudaLaunch + 0x143) [0x36833]
=========     Host Frame:./gpuqmc [0xb5bc]
=========     Host Frame:./gpuqmc [0xf239]
=========     Host Frame:./gpuqmc [0x4a14]
=========     Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf4) [0x1d994]
=========     Host Frame:./gpuqmc (malloc + 0x1ed) [0x4925]
=========
========= Program hit cudaErrorLaunchFailure (error 4) due to "unspecified launch failure" on CUDA API call to cudaMemcpy.
=========     Saved host backtrace up to driver entry point at error
=========     Host Frame:/usr/lib64/libcuda.so.1 [0x2ef613]
=========     Host Frame:/state/partition1/pgitest/linux86-64/2015/cuda/6.5/lib64/libcudart.so.6.5 (cudaMemcpy + 0x1df) [0x3370f]
=========     Host Frame:/state/partition1/pgitest/linux86-64/15.7/lib/libcudafor.so [0x1a0d8]
=========     Host Frame:/state/partition1/pgitest/linux86-64/15.7/lib/libcudafor.so (pgf90_dev_copyout + 0x58) [0x1a194]
=========     Host Frame:./gpuqmc [0xf26b]
0: copyout Memcpy (host=0x200d00200, dev=0x1302080400, size=8) FAILED: 4(unspecified launch failure)
=========     Host Frame:./gpuqmc [0x4a14]
=========     Host Frame:/lib64/libc.so.6 (__libc_start_main + 0xf4) [0x1d994]
=========     Host Frame:./gpuqmc (malloc + 0x1ed) [0x4925]
=========
========= ERROR SUMMARY: 2 errors

where host_subs_m.CUF:798 refers to the line with the code above.
Back to top
View user's profile
mkcolg



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

PostPosted: Thu Sep 17, 2015 2:15 pm    Post subject: Reply with quote

It should be ok to do this.

PGI Customer Support sent me your code and once I can get it built (I sent you the compile error I have), I'll try to determine where the error is.

- 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, 3, 4
Page 4 of 4

 
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