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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem about install the torch-scatter #288

Closed
denny402 opened this issue May 11, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@denny402
Copy link

commented May 11, 2019

馃摎 Installation

Environment

  • OS:Ubuntu 18.04
  • Python version:3.7.1
  • PyTorch version:1.0.1
  • CUDA/cuDNN version:9.0
  • GCC version:5.5.0
  • How you tried to install PyTorch Geometric and its extensions (pip, source):pip
  • Any other relevant information:
    I tried the GCC version(7.5.0, 5.5.0, 4.8.0), all of them didn't work!

Checklist

  • [ YES ] I followed the installation guide.
  • [ YES ] I cannot find my error message in the FAQ.
  • [ YES ] I set up CUDA correctly and can compile CUDA code via nvcc.
  • [ YES ] I have cloned the repository and tried a manual installation from source.
  • [ NO ] I do have multiple CUDA versions on my machine.
  • [ YES ] I checked if the official extension example runs on my machine.
  • [ NO ] The offical extension example runs on my machine.

Additional context

Collecting torch-scatter
Downloading https://files.pythonhosted.org/packages/07/c0/f7ac424496f4a3bcb31aa993fba29077a6d42fc2624c66e90b58a566a98e/torch_scatter-1.2.0.tar.gz
Installing collected packages: torch-scatter
Running setup.py install for torch-scatter ... error
Complete output from command /home/xu/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-p6brehcf/torch-scatter/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-1yl60_1e/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/torch_scatter
copying torch_scatter/add.py -> build/lib.linux-x86_64-3.7/torch_scatter
copying torch_scatter/sub.py -> build/lib.linux-x86_64-3.7/torch_scatter
copying torch_scatter/mean.py -> build/lib.linux-x86_64-3.7/torch_scatter
copying torch_scatter/std.py -> build/lib.linux-x86_64-3.7/torch_scatter
copying torch_scatter/min.py -> build/lib.linux-x86_64-3.7/torch_scatter
copying torch_scatter/max.py -> build/lib.linux-x86_64-3.7/torch_scatter
copying torch_scatter/mul.py -> build/lib.linux-x86_64-3.7/torch_scatter
copying torch_scatter/init.py -> build/lib.linux-x86_64-3.7/torch_scatter
copying torch_scatter/div.py -> build/lib.linux-x86_64-3.7/torch_scatter
creating build/lib.linux-x86_64-3.7/test
copying test/utils.py -> build/lib.linux-x86_64-3.7/test
copying test/test_multi_gpu.py -> build/lib.linux-x86_64-3.7/test
copying test/test_backward.py -> build/lib.linux-x86_64-3.7/test
copying test/test_forward.py -> build/lib.linux-x86_64-3.7/test
copying test/init.py -> build/lib.linux-x86_64-3.7/test
copying test/test_std.py -> build/lib.linux-x86_64-3.7/test
creating build/lib.linux-x86_64-3.7/torch_scatter/utils
copying torch_scatter/utils/ext.py -> build/lib.linux-x86_64-3.7/torch_scatter/utils
copying torch_scatter/utils/init.py -> build/lib.linux-x86_64-3.7/torch_scatter/utils
copying torch_scatter/utils/gen.py -> build/lib.linux-x86_64-3.7/torch_scatter/utils
running build_ext
/home/xu/anaconda3/lib/python3.7/site-packages/torch/utils/cpp_extension.py:191: UserWarning:

                               !! WARNING !!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (g++ 4.8) may be ABI-incompatible with PyTorch!
Please use a compiler that is ABI-compatible with GCC 4.9 and above.
See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html.

See https://gist.github.com/goldsborough/d466f43e8ffc948ff92de7486c5216d6
for instructions on how to install GCC 4.9 or higher.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

                              !! WARNING !!

  warnings.warn(ABI_INCOMPATIBILITY_WARNING.format(compiler))
building 'torch_scatter.scatter_cpu' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/cpu
gcc -pthread -B /home/xu/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include -I/home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include -I/home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/TH -I/home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/THC -I/home/xu/anaconda3/include/python3.7m -c cpu/scatter.cpp -o build/temp.linux-x86_64-3.7/cpu/scatter.o -Wno-unused-variable -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=scatter_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option 鈥-Wstrict-prototypes鈥 is valid for C/ObjC but not for C++ [enabled by default]
In file included from /home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:9:0,
                 from /home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include/torch/types.h:3,
                 from /home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                 from /home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                 from /home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include/torch/data.h:3,
                 from /home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include/torch/all.h:4,
                 from /home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:4,
                 from cpu/scatter.cpp:1:
cpu/scatter.cpp: In lambda function:
cpu/scatter.cpp:8:41: error: invalid initialization of reference of type 鈥榗onst at::Type&鈥 from expression of type 鈥榗10::ScalarType鈥
   AT_DISPATCH_ALL_TYPES(src.scalar_type(), "scatter_mul", [&] {
                                         ^
/home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/ATen/Dispatch.h:70:32: note: in definition of macro 鈥楢T_DISPATCH_ALL_TYPES鈥
     const at::Type& the_type = TYPE;                                         \
                                ^
cpu/scatter.cpp: In lambda function:
cpu/scatter.cpp:21:41: error: invalid initialization of reference of type 鈥榗onst at::Type&鈥 from expression of type 鈥榗10::ScalarType鈥
   AT_DISPATCH_ALL_TYPES(src.scalar_type(), "scatter_div", [&] {
                                         ^
/home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/ATen/Dispatch.h:70:32: note: in definition of macro 鈥楢T_DISPATCH_ALL_TYPES鈥
     const at::Type& the_type = TYPE;                                         \
                                ^
cpu/scatter.cpp: In lambda function:
cpu/scatter.cpp:34:41: error: invalid initialization of reference of type 鈥榗onst at::Type&鈥 from expression of type 鈥榗10::ScalarType鈥
   AT_DISPATCH_ALL_TYPES(src.scalar_type(), "scatter_max", [&] {
                                         ^
/home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/ATen/Dispatch.h:70:32: note: in definition of macro 鈥楢T_DISPATCH_ALL_TYPES鈥
     const at::Type& the_type = TYPE;                                         \
                                ^
cpu/scatter.cpp: In lambda function:
cpu/scatter.cpp:51:41: error: invalid initialization of reference of type 鈥榗onst at::Type&鈥 from expression of type 鈥榗10::ScalarType鈥
   AT_DISPATCH_ALL_TYPES(src.scalar_type(), "scatter_min", [&] {
                                         ^
/home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/ATen/Dispatch.h:70:32: note: in definition of macro 鈥楢T_DISPATCH_ALL_TYPES鈥
     const at::Type& the_type = TYPE;                                         \
                                ^
cpu/scatter.cpp: In lambda function:
cpu/scatter.cpp:68:42: error: invalid initialization of reference of type 鈥榗onst at::Type&鈥 from expression of type 鈥榗10::ScalarType鈥
   AT_DISPATCH_ALL_TYPES(grad.scalar_type(), "index_backward", [&] {
                                          ^
/home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/ATen/Dispatch.h:70:32: note: in definition of macro 鈥楢T_DISPATCH_ALL_TYPES鈥
     const at::Type& the_type = TYPE;                                         \
                                ^
error: command 'gcc' failed with exit status 1

----------------------------------------

Command "/home/xu/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-p6brehcf/torch-scatter/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-1yl60_1e/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-p6brehcf/torch-scatter/

Any suggestion will be thankful!

@denny402

This comment has been minimized.

Copy link
Author

commented May 11, 2019

I changed the GCC version to 5.5.0
Errors are the same

(base) root@xusu:/pytorch_geometric/examples# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.5.0-12ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.5.0 20171010 (Ubuntu 5.5.0-12ubuntu1)
(base) root@xusu:
/pytorch_geometric/examples# pip install torch-scatter
The directory '/home/xu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/xu/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting torch-scatter
Downloading https://files.pythonhosted.org/packages/07/c0/f7ac424496f4a3bcb31aa993fba29077a6d42fc2624c66e90b58a566a98e/torch_scatter-1.2.0.tar.gz
Installing collected packages: torch-scatter
Running setup.py install for torch-scatter ... error
Complete output from command /home/xu/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-si6y275y/torch-scatter/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-4ktyilbu/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/torch_scatter
copying torch_scatter/add.py -> build/lib.linux-x86_64-3.7/torch_scatter
copying torch_scatter/sub.py -> build/lib.linux-x86_64-3.7/torch_scatter
copying torch_scatter/mean.py -> build/lib.linux-x86_64-3.7/torch_scatter
copying torch_scatter/std.py -> build/lib.linux-x86_64-3.7/torch_scatter
copying torch_scatter/min.py -> build/lib.linux-x86_64-3.7/torch_scatter
copying torch_scatter/max.py -> build/lib.linux-x86_64-3.7/torch_scatter
copying torch_scatter/mul.py -> build/lib.linux-x86_64-3.7/torch_scatter
copying torch_scatter/init.py -> build/lib.linux-x86_64-3.7/torch_scatter
copying torch_scatter/div.py -> build/lib.linux-x86_64-3.7/torch_scatter
creating build/lib.linux-x86_64-3.7/test
copying test/utils.py -> build/lib.linux-x86_64-3.7/test
copying test/test_multi_gpu.py -> build/lib.linux-x86_64-3.7/test
copying test/test_backward.py -> build/lib.linux-x86_64-3.7/test
copying test/test_forward.py -> build/lib.linux-x86_64-3.7/test
copying test/init.py -> build/lib.linux-x86_64-3.7/test
copying test/test_std.py -> build/lib.linux-x86_64-3.7/test
creating build/lib.linux-x86_64-3.7/torch_scatter/utils
copying torch_scatter/utils/ext.py -> build/lib.linux-x86_64-3.7/torch_scatter/utils
copying torch_scatter/utils/init.py -> build/lib.linux-x86_64-3.7/torch_scatter/utils
copying torch_scatter/utils/gen.py -> build/lib.linux-x86_64-3.7/torch_scatter/utils
running build_ext
building 'torch_scatter.scatter_cpu' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/cpu
gcc -pthread -B /home/xu/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include -I/home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include -I/home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/TH -I/home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/THC -I/home/xu/anaconda3/include/python3.7m -c cpu/scatter.cpp -o build/temp.linux-x86_64-3.7/cpu/scatter.o -Wno-unused-variable -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=scatter_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option 鈥-Wstrict-prototypes鈥 is valid for C/ObjC but not for C++
In file included from /home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:9:0,
from /home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include/torch/types.h:3,
from /home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
from /home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include/torch/data/dataloader.h:3,
from /home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include/torch/data.h:3,
from /home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include/torch/all.h:4,
from /home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:4,
from cpu/scatter.cpp:1:
cpu/scatter.cpp: In lambda function:
cpu/scatter.cpp:8:40: error: invalid initialization of reference of type 鈥榗onst at::Type&鈥 from expression of type 鈥榗10::ScalarType鈥
AT_DISPATCH_ALL_TYPES(src.scalar_type(), "scatter_mul", [&] {
^
/home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/ATen/Dispatch.h:70:32: note: in definition of macro 鈥楢T_DISPATCH_ALL_TYPES鈥
const at::Type& the_type = TYPE;
^
cpu/scatter.cpp: In lambda function:
cpu/scatter.cpp:21:40: error: invalid initialization of reference of type 鈥榗onst at::Type&鈥 from expression of type 鈥榗10::ScalarType鈥
AT_DISPATCH_ALL_TYPES(src.scalar_type(), "scatter_div", [&] {
^
/home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/ATen/Dispatch.h:70:32: note: in definition of macro 鈥楢T_DISPATCH_ALL_TYPES鈥
const at::Type& the_type = TYPE;
^
cpu/scatter.cpp: In lambda function:
cpu/scatter.cpp:34:40: error: invalid initialization of reference of type 鈥榗onst at::Type&鈥 from expression of type 鈥榗10::ScalarType鈥
AT_DISPATCH_ALL_TYPES(src.scalar_type(), "scatter_max", [&] {
^
/home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/ATen/Dispatch.h:70:32: note: in definition of macro 鈥楢T_DISPATCH_ALL_TYPES鈥
const at::Type& the_type = TYPE;
^
cpu/scatter.cpp: In lambda function:
cpu/scatter.cpp:51:40: error: invalid initialization of reference of type 鈥榗onst at::Type&鈥 from expression of type 鈥榗10::ScalarType鈥
AT_DISPATCH_ALL_TYPES(src.scalar_type(), "scatter_min", [&] {
^
/home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/ATen/Dispatch.h:70:32: note: in definition of macro 鈥楢T_DISPATCH_ALL_TYPES鈥
const at::Type& the_type = TYPE;
^
cpu/scatter.cpp: In lambda function:
cpu/scatter.cpp:68:41: error: invalid initialization of reference of type 鈥榗onst at::Type&鈥 from expression of type 鈥榗10::ScalarType鈥
AT_DISPATCH_ALL_TYPES(grad.scalar_type(), "index_backward", [&] {
^
/home/xu/anaconda3/lib/python3.7/site-packages/torch/lib/include/ATen/Dispatch.h:70:32: note: in definition of macro 鈥楢T_DISPATCH_ALL_TYPES鈥
const at::Type& the_type = TYPE;
^
error: command 'gcc' failed with exit status 1

----------------------------------------
@rusty1s

This comment has been minimized.

Copy link
Owner

commented May 11, 2019

Hi, the current version requires PyTorch 1.1.

@jazzmuesli

This comment has been minimized.

Copy link

commented May 14, 2019

Hi, the current version requires PyTorch 1.1.

I've implemented it in #301

rusty1s added a commit that referenced this issue May 15, 2019

Merge pull request #301 from jazzmuesli/288_pytorch110-docker
#288: use pytorch 1.1.0 cuda9.0.176_cudnn7.5.1_0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.