CUDA datatype compatibility

Hi,

I have a FORTRAN function

foo(n1, n2, n3, COMPLEX*16 buff)

being passed to cuda function

extern “C” void fooc(int *m1, int *m2, int *m3, cufftComplex *B)

While executing, I am getting output : NaN

Could this be a problem with the precision ? Is there a workaround in CUDA considering I cannot change COMPLEX*16

Thanks

You are passing double precision complex numbers (COMPLEX*16).
Double precision is not supported on the current generation of GPUs.

You will need to convert them to single precision complex before handling them to CUDA. You could do it in Fortran or inside the fooc function.

Thanks for your reply.

Could you please suggest me some pointer/help on how to do on the fooc side since I cannot change on the FORTRAN side ?

Also wont the performance take a beat with use of CUDA since it doesnt support double precision at this time?