I have a PC that runs Ubuntu that has nvidia gpu(3080ti). I’ve installed CUDA.jl recently, and I believe pc has met all the requirements. It has Nvidia drivers installed. But when I enter
pkg> test CUDA
There was an error/warning which said LD_LIBRARY_PATH was changed eventhough I didn’t do anything with it. So I typed in code:
julia> ENV["LD_LIBRARY_PATH"] = ""
and then after I run test CUDA after a while my system freezes because of supposedly a memory leak? Why is this happening?
┌ Warning: CUDA runtime library `libcublasLt.so.12` was loaded from a system path, `/usr/local/cuda-12.3/lib64/libcublasLt.so.12`.
│
│ This may cause errors. Ensure that you have not set the LD_LIBRARY_PATH
│ environment variable, or that it does not contain paths to CUDA libraries.
│
│ In any other case, please file an issue.
└ @ CUDA ~/.julia/packages/CUDA/Tl08O/src/initialization.jl:219
┌ Warning: CUDA runtime library `libnvJitLink.so.12` was loaded from a system path, `/usr/local/cuda-12.3/lib64/libnvJitLink.so.12`.
│
│ This may cause errors. Ensure that you have not set the LD_LIBRARY_PATH
│ environment variable, or that it does not contain paths to CUDA libraries.
│
│ In any other case, please file an issue.
└ @ CUDA ~/.julia/packages/CUDA/Tl08O/src/initialization.jl:219
┌ Warning: CUDA runtime library `libcusparse.so.12` was loaded from a system path, `/usr/local/cuda-12.3/lib64/libcusparse.so.12`.
│
│ This may cause errors. Ensure that you have not set the LD_LIBRARY_PATH
│ environment variable, or that it does not contain paths to CUDA libraries.
│
│ In any other case, please file an issue.
└ @ CUDA ~/.julia/packages/CUDA/Tl08O/src/initialization.jl:219
Those are definitely problematic – do you have LD_LIBRARY_PATH set, and if so, why?
Why do you suppose this?
As @ufechner7 mentions, this may simply be because of too many parallel tests launching. The test suite is clear about this, and prints at the start:
[ Info: Running 23 tests in parallel. If this is too many, specify the `--jobs` argument to the tests, or set the `JULIA_CPU_THREADS` environment variable.
Sorry for late reply. I ran into this issue on my lab’s shared computer. I recently looked up online for LD_LIBRARY_PATH and I come across a general sentiment that I should be always avoid setting LD_LIBRARY_PATH variable link. I didn’t actually set the variable but the previous lab member who installed Ubuntu might have. So I’m asked him about it and he answered that it’s used for cuda library. And it’s true that:
The question I have is that how can I make my cuda lib work but not using LD_LIBRARY_PATH? I will definately look into it more when I’m less busy.
Regarding supposed memory leak, I kind of guessed that because after I ran the test, the computer screen was hard frozen on what it was doing. No mouse movement etc. And on a system monitor statistics on activity top bar in Ubuntu, the memory bar was filled to maximum.
I ran a test later with fewer parallel tasks (But I did’t copy the output and it was few weeks ago and I can’t remember. However I will try it with 1 thread later this week.) and it still caused a unrecoverable freeze(mem. leak?).
Lastly, I looked into z shell config file ~/.zshrc and found: