linking difficulty with cuda fortran 11.6


I have a code which compiles (and executes) correctly with de 11.1 version of the cuda fortran compiler. When I try not compile it with the 11.6 version, I get the following message:

/opt/pgi/linux86-64/11.6/libso/ undefined reference to cublasAlloc' /opt/pgi/linux86-64/11.6/libso/ undefined reference to cublasFree’

I installed the cuda 4.0 toolkit, before AND after the 11.6 version, to no avail.

To my knowledge, my code is not using CUBLAS.

Any clues?


Can you send the source files that demonstrate your problem?

Does it fail with the 3.2 CUDA or just 4.0?

Please send them to


We were able to build your example when we removed the ‘-mcmodel=medium’
from your Makefile. We have filed TPR 17972 to address -mcmodel=medium.

If you do not need -mcmodel=medium to compile and link your program
(because the statically declared data is <2Gb collectively), you are better off
without it. Better optimizations and more flexible linkage follows.