Skip to content
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

Is it necessary to use CUDA10 and gcc7? #116

Open
95AliceHong opened this issue Sep 27, 2024 · 3 comments
Open

Is it necessary to use CUDA10 and gcc7? #116

95AliceHong opened this issue Sep 27, 2024 · 3 comments

Comments

@95AliceHong
Copy link

Hello, thank you for your work!
My system is Ubuntu 22, and I want to add spatial-correction-sampler to the virtual environment of the project. However, I cannot directly use 'pip install spatial-correction-sampler'. Then I tried to find a solution and finally used the command 'CC=/var/bin/gcc-11 CXX=/var/bin/g++-11 CUDA-HOME=usr/local/CUDA-12.4/pip install spatial-correction-sampler' to complete the installation.
However, when I was running my project, the terminal reported an error saying: 'ImportError:/home/hp/anaconda3/env/Ivy/lib/python3.8/site-packagingsampler_backend.cpyton-38-x86_64-linux-gnu.so: undefined symbol: _ZN3c104impl8GPUTrace13gpuTraceStateE'. This may be because it is not compatible with certain library versions. I noticed that the homepage recommends using the specified versions of CUDA and gcc, such as CUDA10.0 requiring gcc7. However, some library packages in the project depend on higher versions of gcc and pytorch. I really hope that spatial correction sampler can coexist harmoniously with other libraries. Do you have any good suggestions on this? Looking forward to your reply, thank you!

@ClementPinard
Copy link
Owner

Hi, thank you for your interest in this repo.

Yes you are right, this comment on the README is totally outdated, dates back from 2019 where it was an actual issue. I will remove it to avoid confusion.

Now for your problem, I would suggest using the --no-build-isolation option with pip, to make sure you link against the right function. Otherwise, it will link against the last version of pytorch, which may not be the one you are using.

Try this command and see where we go from there.

pip install spatial-correlation-sampler --no-build-isolation

@95AliceHong
Copy link
Author

Hi, thank you for your interest in this repo.您好,感谢您对此 repo 的关注。

Yes you are right, this comment on the README is totally outdated, dates back from 2019 where it was an actual issue. I will remove it to avoid confusion.是的,你是对的,README 上的这条评论完全过时了,可以追溯到 2019 年,当时它是一个实际问题。为了避免混淆,我会删除它。

Now for your problem, I would suggest using the --no-build-isolation option with pip, to make sure you link against the right function. Otherwise, it will link against the last version of pytorch, which may not be the one you are using.现在对于您的问题,我建议在 pip 中使用 --no-build-isolation 选项,以确保您链接到正确的函数。否则,它将链接到最新版本的 pytorch,该版本可能不是您正在使用的版本。

Try this command and see where we go from there.试试这个命令,看看我们从那里开始做什么。

pip install spatial-correlation-sampler --no-build-isolation

Well, I added '-- no build dissolution', but running the project reported the same error 'ImportError:/home/hp/anaconda3/env/Ivy/lib/python3.8/site-packagingsampler_backend.cpyton-38-x86_64-linux-gnu.so: undefined symbol: _ZN3c104impl8GPUTrace13gpuTraceStateE'. I tried to lower Pytorch to 10.0 and gcc to 7.0, but some of the library packages on my virtual environment no longer work. I can't think of a better way. Thank you still for your help!

@ClementPinard
Copy link
Owner

From the comments, I suppose you could build the package, but the link did not happen against the right pytorch.

If you have a mismatch between the running pytorch version and the version used for building, you will have this kind of error messages.

I cannot help you much with only this info, but you probably want to investigate if you have multiple version of pytorch installed in your sessions, and which one is used a build time and at run time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants