PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

difference between cuda fortran & PGI accelerator
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
kuldeep gupta



Joined: 11 Oct 2011
Posts: 41

PostPosted: Wed Mar 14, 2012 7:43 am    Post subject: difference between cuda fortran & PGI accelerator Reply with quote

i am using PGI compiler

i am confused that when i should use "CUDA FORTRAN" programming for parallelization & when i should use "PGI accelerator directives" for parallelization
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Mar 14, 2012 1:13 pm    Post subject: Reply with quote

Depends on your project. The PGI Accelerator model is more portable and easier to use while CUDA Fortran gives you more explicit control.

What are goals of your project?

- Mat
Back to top
View user's profile
kuldeep gupta



Joined: 11 Oct 2011
Posts: 41

PostPosted: Thu Mar 15, 2012 11:08 am    Post subject: Reply with quote

my program is of newton-raphson method for solving non linear equations using iterations.

it contains 1 array which has different values, for each value i want to run my code in parallel

ex. array=[2.2 3.6 4.5 8.4 .....]

code takes value from it & use it in solution
so for each value i will get different answer.

so i want parallelization like; i will run my solution for each value in parallel.
& i want all answer(for each different value) in a array.
Back to top
View user's profile
mkcolg



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

PostPosted: Fri Mar 16, 2012 11:16 am    Post subject: Reply with quote

It's usually easier to start with the PGI Accelerator model. Directives are easier to use, give you portability with your original host code, and can give you good performance.

However, if your goal here is to better understand how an NVIDIA GPU works, then CUDA Fortran might be the better route. CUDA forces you to think parallel and give you more explicit access to the device.

- Mat
Back to top
View user's profile
kuldeep gupta



Joined: 11 Oct 2011
Posts: 41

PostPosted: Fri Mar 16, 2012 10:22 pm    Post subject: difference between cuda fortran & PGI accelerator Reply with quote

ok..so in one of my source code i am using both "PGI acclerator directives" & "CUDA FORTRAN" code.but it is showing error

error LNK2019: unresolved external symbol _MAIN referenced in function _MAIN_

is it possible to use both in a same project.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 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