Previously I had cuda toolkit version 4.0. Recently I installed 4.1 and got a linker error when recompiling existing code. I reinstalled 4.0 and all was ok again. Today I installed version 4.2 and it gives the same linker error too. The error is:
CUDAPACKAGE/ipdiagsolver/CG.o: In function cublasSdot': tmpxft_0000371e_00000000-1_CG.cudafe1.cpp:(.text+0x1c): undefined reference to cublasGetCurrentCtx’
tmpxft_0000371e_00000000-1_CG.cudafe1.cpp:(.text+0x5b): undefined reference to `cublasSetError’
collect2: ld returned 1 exit status
make: *** [lin_wacu] Error 1
Needless to say, my source code is unchanged. I checked in /usr/local/cuda/lib with readelf -Ws * | grep cublasSetError.
No symbol is reported at all. Neither in version 4.1 nor in version 4.2.
I removed /usr/local/cuda and re-installed 4.0 again. My code now compiles again and the above readelf command now displays:
164: 00052c40 101 FUNC GLOBAL DEFAULT 11 cublasSetError
164: 00052c40 101 FUNC GLOBAL DEFAULT 11 cublasSetError
164: 00052c40 101 FUNC GLOBAL DEFAULT 11 cublasSetError
Hi,
I’m no cublas developer but I just checked quickly the various cublas documentation I’ve got here and AFAICS, cublasSetError is never mentioned. Thus it looks like you used an undocumented function in your code, which has been removed from the library. AAMOF, since the new cublas API removes the need of getting error status using cublasGetError (but keeps the function for portability), removing the non-documented function cublasSetError seems like a natural choice.
Maybe you should consider adapting your code to the new API, extending its potential lifespan, or maybe you could open a bug to complain about it.