-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeOps error: ld cannot find -lnvrtc #318
Comments
Hi @kayween , Thanks for your interest in this library! For reference, our main Docker image is based on Ubuntu and documents how to install CUDA from the official nvidia channel, etc. You may find it helpful. What do you think? P.S.: I do not know why the full error description appear on some configurations and not on others (such as yours). This is certainly something that we should fix. |
Hi @jeanfeydy , My cuda is installed in
The cuda path is configured correctly as '/usr/local/cuda', but keops still has trouble finding NVRTC.
|
Hi @kayween , I see. Since the linker (ld) seems to be the issue, could you try to also add your CUDA folder to the ls /usr/local/cuda/lib | grep nvrtc returns a non-empty output that contains something like export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib |
Hi @jeanfeydy , Yeah I have tried that. The
The path has already been added
But the linker still cannot find the The weird thing is that I can compile and run the example on the NVRTC's documentation. So I guess the CUDA path has been configured correctly, but somehow keops cannot find the correct CUDA path. |
Hi @jeanfeydy , The issue seems to be the python version. I realized that the dockerfile uses python 3.8, which seems to be crucial. I have been using python 3.9. Downgrading to python 3.8 resolves the issue. |
Hi @kayween In the conda env, if just install cudatoolkit, then it does not provide you the cuda.h, nvrtc.h, etc. So one option is to additionally install cudatoolkit-dev from the conda-forge channel, and followed by After installing cudatoolkit-dev, you will notice that required .h files are present under Hope this helps! |
To add for anyone still having this issue. I installed cuda-toolkit from https://anaconda.org/nvidia/cuda-toolkit so I knew that "cuda.h" and "nvrtc.h" were present in my mamba environment's include folder at "/home/zach/mambaforge/envs/myproject/include" but using
Did not set the path correctly (unknown reason). I had to invoke it using CONDA:
I hope this helps anyone that runs into this minor issue. Make sure you reactivate the env. As a side note, the reason for calling conda / mamba for the environment variable is to keep all of my changes (even setting environment variables) isolated from the OS. |
I had the same issue (“cannot find -lcuda, -lnvrtc”). Adding path variables didn’t help, because it turns out I have two cuda installation directories: “cuda” and “cuda-12.1”. I added a symbolic links with the simple suffix at the corresponding directories and it worked well. I found the actual paths by tracing the build command generated by the pykeops import. |
Hi,
I am trying to install the latest keops but got an error. Specifically, pykeops cannot find
nvrtc
in compilation. Any advice resolving this issue?Ubuntu 20.04.5 LTS
Cuda 11.6
Pykeops 2.1
The text was updated successfully, but these errors were encountered: