hey guys,

so i’ve read a lot about using cuda with fortran and I’ve read through the nVidia manuals and everything but i’m learning on my own and am having trouble getting the hang of it. What i want to do is simply run some FORTRAN code and call a (eventually multiple) functions in it, but using cuda. So a simple example:

we’ll call it main.f90

PROGRAM runme

IMPLICIT NONE

INTEGER a,b

a=12

b=10

CALL addition(a,b)

END PROGRAM runme

SUBROUTINE addition(a,b)

INTEGER a,b,c

c = a+b

PRINT *, ‘FORTRAN computation:’

PRINT *, c

END SUBROUTINE addition

So what would be the easiest way to execute the main section (the addition) on the GPU? giving code examples would be helpful if you could, since i’m trying to learn the cuda code.

thanks so much.

also if there are errors in this little code segment please point them out since Fortran is new to me :) adios