PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

How to use fft in PGI Fortran Accelerator?
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
mkcolg



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

PostPosted: Wed Mar 23, 2011 3:58 pm    Post subject: Reply with quote

While the CUFFT library does utilize a GPU in solving ffts, it can only be called from host code. So, no it can not be called from any device code including device code generated from an Accelerator region.

Here's an example of calling CUFFT from CUDA Fortran: http://cudamusing.blogspot.com/2010/05/calling-cufft-from-cuda-fortran.html


Can you please explain more about what you're trying to do? Maybe we can find a solution. A small example code would help.

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



Joined: 21 Mar 2011
Posts: 6

PostPosted: Wed Mar 23, 2011 6:47 pm    Post subject: Reply with quote

I cannot open your last link...

I am trying to simply use fft in calculation, but I do not know:
1. how to call cufft in my code, like which module to use or which file to include? Here I need a example.
2. how to compile, maybe use "pgfortran -I/opt/cuda2.3/include -L -L/opt/cuda2.3/lib64 source.c -lcufft"?

3. If I use cufft, do I need to do other things to run it on GPU? (like use !$acc region?)
Back to top
View user's profile
hzhcapricorn



Joined: 21 Mar 2011
Posts: 6

PostPosted: Wed Mar 23, 2011 7:01 pm    Post subject: Reply with quote

It's OK. I opened the link. The Great Fire Wall does not allow me to open that in China, so I find help from US. Thanks a lot!
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