PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Calling C programs from Fortran global/device code?

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



Joined: 13 Oct 2004
Posts: 4

PostPosted: Wed Apr 28, 2010 10:56 pm    Post subject: Calling C programs from Fortran global/device code? Reply with quote

Someone may have already the same question, but I cannot find any in this forum.

Please give a simple example.

Thanks in advance.

Takao
Back to top
View user's profile
mkcolg



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

PostPosted: Thu Apr 29, 2010 9:38 am    Post subject: Reply with quote

Hi Takao,

There isn't a linker for device code, hence there is no way to associate external symbols between objects. Currently, calling external procedures from device code is not possible.

However, CUDA C and CUDA Fortan can share device data provided that a pointer to the device data is passed via the host. For an example of this, please see my PGInsider article Tuning a Monte Carlo Algorithm on GPUs.

Hope this helps,
Mat
Back to top
View user's profile
tthh



Joined: 13 Oct 2004
Posts: 4

PostPosted: Thu Apr 29, 2010 10:48 am    Post subject: thanks Reply with quote

Mat,

thanks a lot for quick reply! The article helps a lot, too.

Takao
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