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

Fail when installing #8

Open
SkyeFromKindergarten opened this issue Oct 12, 2020 · 3 comments
Open

Fail when installing #8

SkyeFromKindergarten opened this issue Oct 12, 2020 · 3 comments

Comments

@SkyeFromKindergarten
Copy link

SkyeFromKindergarten commented Oct 12, 2020

Sorry to disturb, I failed when install.
These are error messages, could you please help me find where is wrong?
Ubuntu 16.04 Pytorch1.6.1 CUDA9.0

Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
1.10.1
g++ -pthread -shared -B /home/gy/anaconda3/envs/pvc/compiler_compat -L/home/gy/anaconda3/envs/pvc/lib -Wl,-rpath=/home/gy/anaconda3/envs/pvc/lib -Wl,--no-as-needed -Wl,--sysroot=/ /home/gy/pvc0922/PyTorchEMD/build/temp.linux-x86_64-3.8/cuda/emd.o /home/gy/pvc0922/PyTorchEMD/build/temp.linux-x86_64-3.8/cuda/emd_kernel.o -L/home/gy/anaconda3/envs/pvc/lib/python3.8/site-packages/torch/lib -L//usr/local/cuda-9.0/lib64 -lc10 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda -o build/lib.linux-x86_64-3.8/emd_cuda.cpython-38-x86_64-linux-gnu.so
g++: error: /home/gy/pvc0922/PyTorchEMD/build/temp.linux-x86_64-3.8/cuda/emd.o: 没有那个文件或目录
g++: error: /home/gy/pvc0922/PyTorchEMD/build/temp.linux-x86_64-3.8/cuda/emd_kernel.o: 没有那个文件或目录
error: command 'g++' failed with exit status 1

@SkyeFromKindergarten
Copy link
Author

SkyeFromKindergarten commented Oct 13, 2020

I reinstall my Pytorch to 1.5.1 with CUDA10.1/9.0
Still have this question.

running install
running bdist_egg
running egg_info
writing emd_ext.egg-info/PKG-INFO
writing dependency_links to emd_ext.egg-info/dependency_links.txt
writing top-level names to emd_ext.egg-info/top_level.txt
reading manifest file 'emd_ext.egg-info/SOURCES.txt'
writing manifest file 'emd_ext.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_ext
building 'emd_cuda' extension
Emitting ninja build file /home/gy/pvc0922/PyTorchEMD/build/temp.linux-x86_64-3.8/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
1.10.1
g++ -pthread -shared -B /home/gy/anaconda3/envs/pvc/compiler_compat -L/home/gy/anaconda3/envs/pvc/lib -Wl,-rpath=/home/gy/anaconda3/envs/pvc/lib -Wl,--no-as-needed -Wl,--sysroot=/ /home/gy/pvc0922/PyTorchEMD/build/temp.linux-x86_64-3.8/cuda/emd.o /home/gy/pvc0922/PyTorchEMD/build/temp.linux-x86_64-3.8/cuda/emd_kernel.o -L/home/gy/anaconda3/envs/pvc/lib/python3.8/site-packages/torch/lib -L//usr/local/cuda-10.1/lib64 -lc10 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda -o build/lib.linux-x86_64-3.8/emd_cuda.cpython-38-x86_64-linux-gnu.so
g++: error: /home/gy/pvc0922/PyTorchEMD/build/temp.linux-x86_64-3.8/cuda/emd_kernel.o: 没有那个文件或目录
error: command 'g++' failed with exit status 1

@SkyeFromKindergarten
Copy link
Author

SkyeFromKindergarten commented Oct 13, 2020

Okay~ I chage my enviornment to: Pytorch1.1.0 CUDA9.0 and seem to sucessfully compiled.
But it report an error when using it

Traceback (most recent call last):
File "test_emd_loss.py", line 4, in
from emd import earth_mover_distance
File "/home/gy/pvc0922/PyTorchEMD/emd.py", line 2, in
import emd_cuda
ImportError: /home/gy/pvc0922/PyTorchEMD/emd_cuda.cpython-36m-x86_64-linux-gnu.so: undefined symbol: __cudaRegisterFatBinaryEnd

I googled this error, it says this error may be caused by a version inconsistency. But my CUDA version is 9.0 in the all time.
Could you please help with this? :)

@hangjiaqi1
Copy link

it is very important to change the torch and cuda version to 1.1.0 and 9.0 respectively, or it would not be correctly install

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