cudaMalloc returns unknown error

Hi,
I have an application that uses multiple shared libraries. The libraries contain some custom code as well as code from other static libraries. To avoid conflicts, I want to hide the symbols of theses static ibraries using the “-Wl,–exclude-libs,ALL” linker flags. Unfortunately, when I use these flags, the first call of cudaMalloc returns an unknown error. Without these flags, everything is working fine. I tried it also on a PC and there it works with and without the flags. cuda-memcheck and cuda-gdb also give no additional information. Any idea what could be the reason for this?

Hi,

Maybe the config causes some link error in CUDA.
Is it possible to list the library name rather than use “-Wl,–exclude-libs,ALL”?

Thanks.

Hi AastaLLL,
yes it works if I list the library names. Unfortunately I have to list a huge number of libs, therefore I would prefer to use “-Wl,–exclude-libs,ALL”. It is weird that it works on the PC. The only difference is, that I use libargus on the TX2. Could it be that this influences somehow the CUDA memory management?

Hi,

Do you mind to write a simple example for reproducing this issue?
We want to deliver it to our internal team to get some advice.

Thanks.