getkeops / keops

KErnel OPerationS, on CPUs and GPUs, with autodiff and without memory overflows
https://www.kernel-operations.io
MIT License
1.04k stars 64 forks source link

Can't detect cuda compiler if g++ version > 9 #208

Open pzpzpzp1 opened 2 years ago

pzpzpzp1 commented 2 years ago

I installed each dependency with recent versions, but every time I tried to build the kernels, I get errors saying cuda compiler not detected even though nvcc --version returned 11.2. I saw an old version of this in 2020 (link below) where someone ran into the same issue and had to downgrade their g++ to 8.4. That worked for me as well but given that it's been 2 years since, it seems problematic to require such an old g++ version. Besides that, the error message is entirely mysterious and doesn't suggest anything to do with g++ version.

https://github.com/getkeops/keops/issues/128

jeanfeydy commented 2 years ago

Hi @pzpzpzp1 ,

Thanks for your interest in the library! You’re right of course: our error messages are nowhere near being informative enough. This is evidenced by the fact that so many of the issues here are related to PATH and configuration issues.

In order to tackle this problem, we have decided to re-write our compilation engine entirely with much simpler dependencies. Notably, with CUDA, our new engine should rely directly on “NVRTC” instead of nvcc and avoid the version clash with gcc.

You can try this with:

pip install git+https://github.com/getkeops/keops.git@python_engine

Could you maybe tell us if this version works “out of the box” on your machine? Your feedback would be really appreciated, since we are in the process of releasing this new branch as KeOps v2.0 and hope to make the transition as smooth as possible for everyone :-)

Best regards, Jean

gjhuizing commented 2 years ago

@jeanfeydy I had the same issue and this seems to fix it, thank you!

Best,

GJ

jeanfeydy commented 2 years ago

Hi @gjhuizing , That’s nice to hear, thank you :-) I’ll leave the issue open for a few weeks until we get enough feedback - but hopefully, these PATH issues will soon be a thing of the past. Best regards, Jean

Louis-Pujol commented 2 years ago

Hi,

It has worked well for me on a fresh install of Ubuntu (with gcc11.2 and cuda11.6). On a first try, I have encountered an issue with an output looking like "GLIBCXX_3.4.29 not found", I solved it following https://askubuntu.com/questions/575505/glibcxx-3-4-20-not-found-how-to-fix-this-error/764572#764572 . The issue seems to be more related to anaconda than to KeOps, I mention it in case it could be helpful for other users.

Thanks a lot, Best regards, Louis