PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

CUDA Fortran: supported methods for data transfer

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
ink



Joined: 25 Nov 2008
Posts: 8

PostPosted: Tue Sep 29, 2009 10:22 am    Post subject: CUDA Fortran: supported methods for data transfer Reply with quote

hello,
i'm playing with the matrix multiplication example given in CUDA Fortran Programming Guide & Ref, p. 43-44 and i can't get the data back from the device. what methods are currently supported?

btw, i had to add "device" to line 8 (p.43)
real, device :: A(N,M), B(M,L), C(N,L)
to compile the example. Unfortunately when run it it breaks with
copyout Memcpy FAILED:4
i tried using cudaMemcpy2D to do explicit data transfer but still get errors (stat > 0)

thanks
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Sep 29, 2009 12:34 pm    Post subject: Reply with quote

Hi ink,

Looks like our docs people missed some updates. Try using the matrix multiply example found the "etc/samples" instead.

Thanks,
Mat
Back to top
View user's profile
TheMatt



Joined: 06 Jul 2009
Posts: 317
Location: Greenbelt, MD

PostPosted: Wed Sep 30, 2009 5:38 am    Post subject: Reply with quote

mkcolg wrote:
Hi ink,

Looks like our docs people missed some updates. Try using the matrix multiply example found the "etc/samples" instead.
Mat,

I just tried the sgemm example and I got:
Code:
> pgfortran sgemm.cuf
/usr/bin/ld: skipping incompatible /opt/cuda/lib/libcudart.so when searching for -lcudart
/usr/bin/ld: cannot find -lcudart
I currently have CUDA 2.3 installed. Does CUDA Fortran require a different version?
Back to top
View user's profile
MRA



Joined: 29 Sep 2009
Posts: 2

PostPosted: Wed Sep 30, 2009 6:52 am    Post subject: Reply with quote

Hi TheMatt,

You are probably using a 64bit OS. You need to point the CUDALIB variable (located inside the sitenvrc) to the lib64 path of CUDA. In your case, it's should be /opt/cuda/lib64.

Mathieu
Back to top
View user's profile
TheMatt



Joined: 06 Jul 2009
Posts: 317
Location: Greenbelt, MD

PostPosted: Wed Sep 30, 2009 8:54 am    Post subject: Reply with quote

MRA wrote:
Hi TheMatt,

You are probably using a 64bit OS. You need to point the CUDALIB variable (located inside the sitenvrc) to the lib64 path of CUDA. In your case, it's should be /opt/cuda/lib64.
You are absolutely right.

Now I'm wondering why this error never popped up while using the accelerators...

Thanks,
Matt
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
Page 1 of 1

 
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