cuMemGeIinfo undefined

Hi all

I am trying to get the remaining memory on the device using cuMemGetInfo, I included the header <cuda.h>.

I can allocate/free device memory and launch kernels fine.

But I get the following error when building if I try to use cuMemGetInfo:


obj/release/ In function `main':

tmpxft_0000757f_00000000-11_multisvm.ii:(.text+0x3e0c): undefined reference to `cuMemGetInfo'

collect2: ld returned 1 exit status

make: *** [../../bin/linux/release/multisvm] Error 1

am I missing something?

First this question has been answered in the forums, second it belongs to the linux forum.

That said - you should add the -lcuda to the link phase.


For other people that look into this thread…it was answered here:

First, what you answered it’s only 50% of the solution to my question. Thanks for that.

Second, yes, that 50% was considered in the forums, I found contradictory answers in the other 50%. Sorry about not using the linux forum. Will do next time.

That said - you can find the complete answer here