PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Compute four precision on GPU but Permission denied why?
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
SWL_EGGBABY



Joined: 16 Dec 2009
Posts: 31

PostPosted: Wed Mar 10, 2010 2:17 am    Post subject: Compute four precision on GPU but Permission denied why? Reply with quote

The code is too long of ddmodule ,I cut it here.

module mmul_mod
use ddmodule
use cudafor
contains
attributes(global) subroutine mmul_kernel( A, B, C, N, M, L )
type (dd_real) A(N,M), B(M,L), C(N,L)
integer, value :: N, M, L
integer :: i, j, kb, k, tx, ty
type (dd_real), shared :: Asub(16,16), Bsub(16,16)
type (dd_real) :: Cij
tx = threadidx%x
ty = threadidx%y
i = (blockidx%x-1) * 16 + tx
j = (blockidx%y-1) * 16 + ty
Cij = 0.d0
do kb = 1, M, 16
Asub(tx,ty) = A(i,kb+ty-1)
Bsub(tx,ty) = B(kb+tx-1,j)
call syncthreads()
do k = 1,16
Cij = Cij + Asub(tx,k) * Bsub(k,ty)
enddo
call syncthreads()
enddo
C(i,j) = Cij
end subroutine mmul_kernel

subroutine mmul( A, B, C )
use ddmodule
type (dd_real), dimension(:,:) :: A, B, C
type (dd_real), device, allocatable, dimension(:,:) :: Adev,Bdev,Cdev
type(dim3) :: dimGrid, dimBlock
integer :: errCode
N = size( A, 1 )
M = size( A, 2 )
L = size( B, 2 )
allocate( Adev(N,M), Bdev(M,L), Cdev(N,L) )
Adev = A(1:N,1:M)
Bdev(:,:) = B(1:M,1:L)
dimGrid = dim3( N/16, M/16, 1 )
dimBlock = dim3( 16, 16, 1 )
call mmul_kernel<<<dimGrid,dimBlock>>>( Adev, Bdev, Cdev, &
N, M, L )
errCode = cudaGetLastError()
print *, cudaGetErrorString(errCode)
C(1:N,1:L) = Cdev
errCode = cudaGetLastError()
print *, cudaGetErrorString(errCode)
deallocate( Adev, Bdev, Cdev )
end subroutine mmul
end module mmul_mod


program swl_eggbaby
use ddmodule
use cudafor
use mmul_mod
implicit none
integer,parameter :: N=16,M=16,L=16
integer :: i,j, istat
type (dd_real) A(N,M),B(M,L),C(N,L)
type(cudaDeviceProp) :: prop
do i=1,16
do j=1,16
A(i,j)=0.d0,B(i,j)=ddpi()
end do
end do
istat = cudaSetDevice(1)
call mmul(A,B,C)
write(*,*) "Results:"
do i=1,16
do j=1,4
call ddwrite(6,C(i,j))
end do
end do
end program [list]

Compiling Project ...
ConsoleApp.f90
failed: Permission denied
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Mar 10, 2010 10:40 am    Post subject: Reply with quote

Hi SWL_EGGBABY,

Quote:
failed: Permission denied
Check that you have permissions to write in the Project directories.

- Mat
Back to top
View user's profile
SWL_EGGBABY



Joined: 16 Dec 2009
Posts: 31

PostPosted: Wed Mar 10, 2010 7:08 pm    Post subject: Compute four precision on GPU but Permission denied why? Reply with quote

Hi Mat,

Sorry I don't understand how to check the permission in project directories.
Back to top
View user's profile
mkcolg



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

PostPosted: Thu Mar 11, 2010 11:09 am    Post subject: Reply with quote

Hi SWL_EGGBABY,

Open Windows Explorer and find your project folders. Right-mouse click on the folder and select "properties". In the properties windows, the 'Security' tab shows the permissions.

- Mat
Back to top
View user's profile
SWL_EGGBABY



Joined: 16 Dec 2009
Posts: 31

PostPosted: Thu Mar 11, 2010 6:59 pm    Post subject: Reply with quote

Hi Mat,

Thank you but I can't find the 'Security'tab in my project "properties".
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 1, 2, 3, 4  Next
Page 1 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