cublas linker error 4.1 and 4.2

Hello all,

I have 64-bit Linux Ubuntu 10.04.

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

This seems a bug to me.

Anyone has the same problem? (and solved it?)

Cheers, Anneke

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.

I have the same problem on mac os 16.6.8 on cuda toolkit version 4.1.

I get:

[i]Undefined symbols:

“_cublasSetError”

“_cublasGetCurrentCtx”

ld: symbol(s) not found[/i]

I don’t really want to update to cuda toolkit version 4.2 yet.

Did you manage to solve this Anneke?