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

module 's2cnn.ops.gpu.lib_cufft' has no attribute 'destroy' #5

Closed
zhixuanli opened this issue Apr 28, 2018 · 9 comments
Closed

module 's2cnn.ops.gpu.lib_cufft' has no attribute 'destroy' #5

zhixuanli opened this issue Apr 28, 2018 · 9 comments

Comments

@zhixuanli
Copy link

zhixuanli commented Apr 28, 2018

This problem has been asked in issue 3, but I can't fix it.
After adding , encoding='utf-8', now the open() function in setup.py is like this:
long_description=open(os.path.join(os.path.dirname(__file__), "README.md"), encoding='utf-8').read(),

Then after runing python setup.py install, the encoding issue :
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1264: ordinal not in range(128)
is gone.
But when I want to run the example of shrec17, the following problem still remains:
module 's2cnn.ops.gpu.lib_cufft' has no attribute 'destroy'

I think may be the real problem occurs in the version of CUDA or pytorch.
Here's my system environment:

  • Python 3.6
  • CUDA 9.1.85
  • pytorch 0.4.0

Can you help me?
Thanks a lot!

@zhixuanli
Copy link
Author

zhixuanli commented Apr 28, 2018

I have made a clean install and here's the output:

running install
running bdist_egg
running egg_info
creating s2cnn.egg-info
writing s2cnn.egg-info/PKG-INFO
writing dependency_links to s2cnn.egg-info/dependency_links.txt
writing requirements to s2cnn.egg-info/requires.txt
writing top-level names to s2cnn.egg-info/top_level.txt
writing manifest file 's2cnn.egg-info/SOURCES.txt'
reading manifest file 's2cnn.egg-info/SOURCES.txt'
writing manifest file 's2cnn.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/s2cnn
copying s2cnn/init.py -> build/lib.linux-x86_64-3.6/s2cnn
creating build/lib.linux-x86_64-3.6/s2cnn/nn
copying s2cnn/nn/init.py -> build/lib.linux-x86_64-3.6/s2cnn/nn
creating build/lib.linux-x86_64-3.6/s2cnn/ops
copying s2cnn/ops/init.py -> build/lib.linux-x86_64-3.6/s2cnn/ops
copying s2cnn/ops/s2_localft.py -> build/lib.linux-x86_64-3.6/s2cnn/ops
copying s2cnn/ops/so3_localft.py -> build/lib.linux-x86_64-3.6/s2cnn/ops
creating build/lib.linux-x86_64-3.6/s2cnn/utils
copying s2cnn/utils/init.py -> build/lib.linux-x86_64-3.6/s2cnn/utils
copying s2cnn/utils/complex_utils.py -> build/lib.linux-x86_64-3.6/s2cnn/utils
copying s2cnn/utils/cuda_utils.py -> build/lib.linux-x86_64-3.6/s2cnn/utils
creating build/lib.linux-x86_64-3.6/s2cnn/nn/soft
copying s2cnn/nn/soft/init.py -> build/lib.linux-x86_64-3.6/s2cnn/nn/soft
copying s2cnn/nn/soft/s2_conv.py -> build/lib.linux-x86_64-3.6/s2cnn/nn/soft
copying s2cnn/nn/soft/so3_conv.py -> build/lib.linux-x86_64-3.6/s2cnn/nn/soft
copying s2cnn/nn/soft/so3_integrate.py -> build/lib.linux-x86_64-3.6/s2cnn/nn/soft
copying s2cnn/nn/soft/so3_rotation.py -> build/lib.linux-x86_64-3.6/s2cnn/nn/soft
creating build/lib.linux-x86_64-3.6/s2cnn/nn/soft/gpu
copying s2cnn/nn/soft/gpu/init.py -> build/lib.linux-x86_64-3.6/s2cnn/nn/soft/gpu
copying s2cnn/nn/soft/gpu/s2_fft.py -> build/lib.linux-x86_64-3.6/s2cnn/nn/soft/gpu
copying s2cnn/nn/soft/gpu/so3_fft.py -> build/lib.linux-x86_64-3.6/s2cnn/nn/soft/gpu
creating build/lib.linux-x86_64-3.6/s2cnn/ops/gpu
copying s2cnn/ops/gpu/init.py -> build/lib.linux-x86_64-3.6/s2cnn/ops/gpu
copying s2cnn/ops/gpu/s2_mm.py -> build/lib.linux-x86_64-3.6/s2cnn/ops/gpu
copying s2cnn/ops/gpu/so3_mm.py -> build/lib.linux-x86_64-3.6/s2cnn/ops/gpu
copying s2cnn/ops/gpu/torchcufft.py -> build/lib.linux-x86_64-3.6/s2cnn/ops/gpu
running build_ext
generating cffi module 'build/temp.linux-x86_64-3.6/s2cnn.ops.gpu.lib_cufft._lib_cufft.c'
creating build/temp.linux-x86_64-3.6
building 's2cnn.ops.gpu.lib_cufft._lib_cufft' extension
creating build/temp.linux-x86_64-3.6/build
creating build/temp.linux-x86_64-3.6/build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/home
creating build/temp.linux-x86_64-3.6/home/mlg
creating build/temp.linux-x86_64-3.6/home/mlg/try
creating build/temp.linux-x86_64-3.6/home/mlg/try/s2cnn
creating build/temp.linux-x86_64-3.6/home/mlg/try/s2cnn/s2cnn
creating build/temp.linux-x86_64-3.6/home/mlg/try/s2cnn/s2cnn/ops
creating build/temp.linux-x86_64-3.6/home/mlg/try/s2cnn/s2cnn/ops/gpu
gcc -pthread -B /home/mlg/anaconda3/envs/pytorch/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/mlg/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/mlg/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/mlg/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/mlg/anaconda3/envs/pytorch/include/python3.6m -c build/temp.linux-x86_64-3.6/s2cnn.ops.gpu.lib_cufft._lib_cufft.c -o build/temp.linux-x86_64-3.6/build/temp.linux-x86_64-3.6/s2cnn.ops.gpu.lib_cufft._lib_cufft.o
gcc -pthread -B /home/mlg/anaconda3/envs/pytorch/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/mlg/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/mlg/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/mlg/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/mlg/anaconda3/envs/pytorch/include/python3.6m -c /home/mlg/try/s2cnn/s2cnn/ops/gpu/plan_cufft.c -o build/temp.linux-x86_64-3.6/home/mlg/try/s2cnn/s2cnn/ops/gpu/plan_cufft.o
creating build/lib.linux-x86_64-3.6/s2cnn/ops/gpu/lib_cufft
gcc -pthread -shared -B /home/mlg/anaconda3/envs/pytorch/compiler_compat -L/home/mlg/anaconda3/envs/pytorch/lib -Wl,-rpath=/home/mlg/anaconda3/envs/pytorch/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.6/build/temp.linux-x86_64-3.6/s2cnn.ops.gpu.lib_cufft._lib_cufft.o build/temp.linux-x86_64-3.6/home/mlg/try/s2cnn/s2cnn/ops/gpu/plan_cufft.o -lcufft -o build/lib.linux-x86_64-3.6/s2cnn/ops/gpu/lib_cufft/_lib_cufft.abi3.so
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/s2cnn
copying build/lib.linux-x86_64-3.6/s2cnn/init.py -> build/bdist.linux-x86_64/egg/s2cnn
creating build/bdist.linux-x86_64/egg/s2cnn/nn
copying build/lib.linux-x86_64-3.6/s2cnn/nn/init.py -> build/bdist.linux-x86_64/egg/s2cnn/nn
creating build/bdist.linux-x86_64/egg/s2cnn/nn/soft
copying build/lib.linux-x86_64-3.6/s2cnn/nn/soft/init.py -> build/bdist.linux-x86_64/egg/s2cnn/nn/soft
copying build/lib.linux-x86_64-3.6/s2cnn/nn/soft/s2_conv.py -> build/bdist.linux-x86_64/egg/s2cnn/nn/soft
copying build/lib.linux-x86_64-3.6/s2cnn/nn/soft/so3_conv.py -> build/bdist.linux-x86_64/egg/s2cnn/nn/soft
copying build/lib.linux-x86_64-3.6/s2cnn/nn/soft/so3_integrate.py -> build/bdist.linux-x86_64/egg/s2cnn/nn/soft
copying build/lib.linux-x86_64-3.6/s2cnn/nn/soft/so3_rotation.py -> build/bdist.linux-x86_64/egg/s2cnn/nn/soft
creating build/bdist.linux-x86_64/egg/s2cnn/nn/soft/gpu
copying build/lib.linux-x86_64-3.6/s2cnn/nn/soft/gpu/init.py -> build/bdist.linux-x86_64/egg/s2cnn/nn/soft/gpu
copying build/lib.linux-x86_64-3.6/s2cnn/nn/soft/gpu/s2_fft.py -> build/bdist.linux-x86_64/egg/s2cnn/nn/soft/gpu
copying build/lib.linux-x86_64-3.6/s2cnn/nn/soft/gpu/so3_fft.py -> build/bdist.linux-x86_64/egg/s2cnn/nn/soft/gpu
creating build/bdist.linux-x86_64/egg/s2cnn/ops
copying build/lib.linux-x86_64-3.6/s2cnn/ops/init.py -> build/bdist.linux-x86_64/egg/s2cnn/ops
copying build/lib.linux-x86_64-3.6/s2cnn/ops/s2_localft.py -> build/bdist.linux-x86_64/egg/s2cnn/ops
copying build/lib.linux-x86_64-3.6/s2cnn/ops/so3_localft.py -> build/bdist.linux-x86_64/egg/s2cnn/ops
creating build/bdist.linux-x86_64/egg/s2cnn/ops/gpu
copying build/lib.linux-x86_64-3.6/s2cnn/ops/gpu/init.py -> build/bdist.linux-x86_64/egg/s2cnn/ops/gpu
copying build/lib.linux-x86_64-3.6/s2cnn/ops/gpu/s2_mm.py -> build/bdist.linux-x86_64/egg/s2cnn/ops/gpu
copying build/lib.linux-x86_64-3.6/s2cnn/ops/gpu/so3_mm.py -> build/bdist.linux-x86_64/egg/s2cnn/ops/gpu
copying build/lib.linux-x86_64-3.6/s2cnn/ops/gpu/torchcufft.py -> build/bdist.linux-x86_64/egg/s2cnn/ops/gpu
creating build/bdist.linux-x86_64/egg/s2cnn/ops/gpu/lib_cufft
copying build/lib.linux-x86_64-3.6/s2cnn/ops/gpu/lib_cufft/_lib_cufft.abi3.so -> build/bdist.linux-x86_64/egg/s2cnn/ops/gpu/lib_cufft
creating build/bdist.linux-x86_64/egg/s2cnn/utils
copying build/lib.linux-x86_64-3.6/s2cnn/utils/init.py -> build/bdist.linux-x86_64/egg/s2cnn/utils
copying build/lib.linux-x86_64-3.6/s2cnn/utils/complex_utils.py -> build/bdist.linux-x86_64/egg/s2cnn/utils
copying build/lib.linux-x86_64-3.6/s2cnn/utils/cuda_utils.py -> build/bdist.linux-x86_64/egg/s2cnn/utils
byte-compiling build/bdist.linux-x86_64/egg/s2cnn/init.py to init.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/s2cnn/nn/init.py to init.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/s2cnn/nn/soft/init.py to init.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/s2cnn/nn/soft/s2_conv.py to s2_conv.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/s2cnn/nn/soft/so3_conv.py to so3_conv.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/s2cnn/nn/soft/so3_integrate.py to so3_integrate.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/s2cnn/nn/soft/so3_rotation.py to so3_rotation.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/s2cnn/nn/soft/gpu/init.py to init.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/s2cnn/nn/soft/gpu/s2_fft.py to s2_fft.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/s2cnn/nn/soft/gpu/so3_fft.py to so3_fft.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/s2cnn/ops/init.py to init.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/s2cnn/ops/s2_localft.py to s2_localft.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/s2cnn/ops/so3_localft.py to so3_localft.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/s2cnn/ops/gpu/init.py to init.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/s2cnn/ops/gpu/s2_mm.py to s2_mm.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/s2cnn/ops/gpu/so3_mm.py to so3_mm.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/s2cnn/ops/gpu/torchcufft.py to torchcufft.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/s2cnn/utils/init.py to init.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/s2cnn/utils/complex_utils.py to complex_utils.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/s2cnn/utils/cuda_utils.py to cuda_utils.cpython-36.pyc
creating stub loader for s2cnn/ops/gpu/lib_cufft/_lib_cufft.abi3.so
byte-compiling build/bdist.linux-x86_64/egg/s2cnn/ops/gpu/lib_cufft/_lib_cufft.py to _lib_cufft.cpython-36.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying s2cnn.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying s2cnn.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying s2cnn.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying s2cnn.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying s2cnn.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents...
s2cnn.ops.gpu.lib_cufft.pycache._lib_cufft.cpython-36: module references file
creating dist
creating 'dist/s2cnn-1.0.0-py3.6-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing s2cnn-1.0.0-py3.6-linux-x86_64.egg
removing '/home/mlg/anaconda3/envs/pytorch/lib/python3.6/site-packages/s2cnn-1.0.0-py3.6-linux-x86_64.egg' (and everything under it)
creating /home/mlg/anaconda3/envs/pytorch/lib/python3.6/site-packages/s2cnn-1.0.0-py3.6-linux-x86_64.egg
Extracting s2cnn-1.0.0-py3.6-linux-x86_64.egg to /home/mlg/anaconda3/envs/pytorch/lib/python3.6/site-packages
s2cnn 1.0.0 is already the active version in easy-install.pth

Installed /home/mlg/anaconda3/envs/pytorch/lib/python3.6/site-packages/s2cnn-1.0.0-py3.6-linux-x86_64.egg
Processing dependencies for s2cnn==1.0.0
Searching for cffi==1.11.5
Best match: cffi 1.11.5
Adding cffi 1.11.5 to easy-install.pth file

Using /home/mlg/anaconda3/envs/pytorch/lib/python3.6/site-packages
Searching for pycparser==2.18
Best match: pycparser 2.18
Adding pycparser 2.18 to easy-install.pth file

Using /home/mlg/anaconda3/envs/pytorch/lib/python3.6/site-packages
Finished processing dependencies for s2cnn==1.0.0

Everything seems right :(

@mariogeiger
Copy link
Collaborator

I have no clue from where the problem may come.
I added encoding='utf-8' in the setup script.

@zhixuanli
Copy link
Author

Can you tell us something about the installation environment, such as the version of pytorch and python and cuda and cudnn. The version of cuda and pytorch may affect a lot.

Thank you!

@mariogeiger
Copy link
Collaborator

  • Anaconda Python 3.6.4
  • pytorch 0.3.1.post2 (installed with conda)
  • I think that I installed cuda via conda and it was 8.0 when I compiled the sources but since I updated to 9.0 (I will try to be more precise about that)

@zhixuanli
Copy link
Author

Thank you so much!
I'll try it later and tell you the result!

@mariogeiger
Copy link
Collaborator

mariogeiger commented Apr 28, 2018

I created a new anaconda environment and I installed everything.
I didn't manage to install cupy with cuda9 so I did all with cuda8.

Create new env:
conda create --name s2cnn_test python=3.6
conda activate s2cnn_test
Compile s2cnn:
conda install pytorch torchvision -c pytorch (version0.4.0-py36_cuda8.0.61_cudnn7.1.2_1)
pip install cupy-cuda80 (version cupy-cuda80-4.0.0)
pip install pynvrtc
python setup.py install
Install lie_learn:
conda install -c anaconda cython
conda install -c anaconda requests
git clone https://github.com/AMLab-Amsterdam/lie_learn.git
python setup.py install
Run the equivariance_error example
conda install -c anaconda scipy
python main.py

@zhixuanli
Copy link
Author

I have tried at least 5 times, and the same problem still remains.
Even though I have changed three different ubuntu servers.

May be I'll read all of your codes carefully and rewrite it😂😂😂

@zhixuanli
Copy link
Author

zhixuanli commented May 2, 2018

I tried to reinstall for may be the sixth time, and it looks good now!

python main.py

main.py:38: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead.
x = torch.autograd.Variable(torch.randn(1, 12, 128, 128), volatile=True).cuda() # [batch, feature, beta, alpha]
relative error = 0.022134914994239807

But I have no idea why this time it works, everything is all the same to before😔

@zhixuanli
Copy link
Author

zhixuanli commented May 2, 2018

@antigol
Here's a summarization of how to install the s2cnn: How did I install S2CNN.
I recorded all the problems I encountered in it, and you may have to use the google translation because it's written in Chinese😜

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