CUDA fortran : dble function is undefined


I took the matrix multiplication sample provided with the PGI 9.0-4 package and change the single precision operation with double precision. If all real matrices are transform into real*8, everything works fine, but if i want to mix both precision (Matrix A and B = single and C = double) within the same sentence, the compiler complain:

pgcudafor2pncI-n7T0jQ.gpu(7): error: identifier “dble” is undefined

I’ve check the ‘gpu’ file, and it seems to be some C (or C++) code that call a "dble’ function:
(double)((_pc+(-8))+(i_a8)) = (dble(((float*)(_pa))((float*)((_pb+(-4))+(i_a4)))))+((double*)((_pc+(-8))+(i_a*8)));

dble is a function in fortran used to cast into double. It may be a bug that this function isnt implemented or not correctly analysed as a casting function…

To reproduce this problem, simply change the type of the matrix C, dC and gold for real*8 inside the sample


Hi Mathieu,

It’s most likely a bug. I was able to reproduce the error and sent a report on to our engineers (TPR#16180).

Thanks for the report,