double precision problem in Calling cuda from Fortran

I used this example:…ortran_Cuda.tgz

I couldn’t get it compiled in visual studio 2005. So I changed some part of the code: use !DEC$ ATTRIBUTES C, DECORATE, ALIAS: “cudafunction_c” :: cudafunction_f.

If someone had it compiled on visual studio, can you share your way with me? Thanks.

cudafunction_c contains calling cuda kernels. cudafunction_f is the fortran code.

I got it compiled and got right result. However, the example used single precision. When I tried double precision, it’s not working. Even I just created a double device variable, in the kernel I set some fixed value to it, then transfered it back to host. There is always 0 in the variable. Seems like cuda kernel is not executed.

Anyone had this problem before? Please help me.