accelorator region

When I include a !$acc region do in my code and it generates a kernel I then get hundreds of messages like this below. If I put the !$acc region do ina wrong place and it doesnt generate a kernel then it continues to com[pile and run OK. Its something to do with a header file I think so maybe Ive got an envirnoment variable or PATH set wrong?

c:\program files\pgi\win64\2011\cuda\3.2\include\surface_functions.h(1355): erro
r: calling a host function from a device/global function is not allowed

Thanks for the help

Hi Mike,

Are you using 11.5? We messed up the Windows CUDA 3.2 header files in 11.5 when we added support for CUDA C X86. The default CUDA 3.1 header files should be fine so you can try compiling with “-ta=nvidia,cuda3.1”. This was fixed quickly so updating your compiler to the latest version will also work.

We do apologize for this error.


Thanks Mat, that was indeeed it. So I upgraded to 11.7 yesterday.
However, now having difficultys getting device recognised! Ho hum. Looks like I have a driver mismatch somewhere