marius-team / marius

Large scale graph learning on a single machine.
https://marius-project.org
Apache License 2.0
160 stars 45 forks source link

Error with pip3 install #112

Closed calla212 closed 2 years ago

calla212 commented 2 years ago

I am trying to install Marius on a docker. It reports an error when Building wheel for Marius.

Building wheel for marius (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-nunpukwh/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-nunpukwh/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-ii3qnwan
       cwd: /tmp/pip-req-build-nunpukwh/
  Complete output (181 lines):
  ...
    -- /usr/local/cuda/lib64/libnvrtc.so shorthash is 6b8662e7
  CMake Error in /tmp/pip-req-build-nunpukwh/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeTmp/CMakeLists.txt:
    Target "cmTC_331b9" requires the language dialect "CUDA17" (with compiler
    extensions), but CMake does not know the compile flags to use to enable it.
  CMake Error at /usr/local/lib/python3.7/dist-packages/torch/share/cmake/Caffe2/Modules_CUDA_fix/upstream/FindCUDA/select_compute_arch.cmake:137 (try_run):
    Failed to generate test project build system.
  Call Stack (most recent call first):
    /usr/local/lib/python3.7/dist-packages/torch/share/cmake/Caffe2/Modules_CUDA_fix/upstream/FindCUDA/select_compute_arch.cmake:197 (CUDA_DETECT_INSTALLED_GPUS)
    /usr/local/lib/python3.7/dist-packages/torch/share/cmake/Caffe2/public/utils.cmake:401 (cuda_select_nvcc_arch_flags)
    /usr/local/lib/python3.7/dist-packages/torch/share/cmake/Caffe2/public/cuda.cmake:437 (torch_cuda_get_nvcc_gencode_flag)
    /usr/local/lib/python3.7/dist-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:88 (include)
    /usr/local/lib/python3.7/dist-packages/torch/share/cmake/Torch/TorchConfig.cmake:68 (find_package)
    CMakeLists.txt:99 (find_package)
  -- Configuring incomplete, errors occurred!
  See also "/tmp/pip-req-build-nunpukwh/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeOutput.log".
  See also "/tmp/pip-req-build-nunpukwh/build/temp.linux-x86_64-3.7/CMakeFiles/CMakeError.log".
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-req-build-nunpukwh/setup.py", line 91, in <module>
      cmdclass=dict(build_ext=CMakeBuild),
    File "/usr/local/lib/python3.7/dist-packages/setuptools-50.3.2-py3.7.egg/setuptools/__init__.py", line 153, in setup
    File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/local/lib/python3.7/dist-packages/wheel/bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.7/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/tmp/pip-req-build-nunpukwh/setup.py", line 29, in run
      self.build_extension(ext)
    File "/tmp/pip-req-build-nunpukwh/setup.py", line 73, in build_extension
      cwd=self.build_temp, env=env)
    File "/usr/lib/python3.7/subprocess.py", line 363, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-req-build-nunpukwh', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-req-build-nunpukwh/build/lib.linux-x86_64-3.7/marius', '-DPYTHON_EXECUTABLE=/usr/bin/python3.7', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE', '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE', '-DCMAKE_INSTALL_RPATH=$ORIGIN']' returned non-zero exit status 1.
  ----------------------------------------
  ERROR: Failed building wheel for marius

I ran the script in marius/src/python/ditribution/marius_env_info.py.

cmake:
  version: 3.16.0
cpu_info:
  num_cpus: 40
  total_memory: 502GB
cuda:
  version: '10.2'
gpu_info:
    memory: 31GB
    name: Tesla V100-SXM2-32GB
marius:
  bindings_installed: false
  install_path: N/A
  version: N/A
openmp:
  version: '201511'
operating_system:
  platform: Linux-4.14.0_1-0-0-46-x86_64-with-Ubuntu-18.04-bionic
pybind:
  PYBIND11_BUILD_ABI: _cxxabi1011
  PYBIND11_COMPILER_TYPE: _gcc
  PYBIND11_STDLIB: _libstdcpp
python:
  compiler: GCC 7.5.0
  deps:
    breathe_version: 4.34.0
    numpy_version: 1.21.6
    omegaconf_version: 2.2.3
    pandas_version: 1.3.5
    pip_version: 20.0.1
    pyspark_version: 3.3.0
    pytest_version: 7.1.2
    sphinx_rtd_theme_version: 1.0.0
    torch_version: !!python/object/new:torch.torch_version.TorchVersion
      - 1.12.1+cu102
    tox_version: 3.25.1
  version: 3.7.13
pytorch:
  install_path: /usr/local/lib/python3.7/dist-packages/torch
  version: !!python/object/new:torch.torch_version.TorchVersion
    - 1.12.1+cu102

I tried to fix the cmake error with this and this, but they don't work. I am wondering how to solve it. Thank you.

rogerwaleffe commented 2 years ago

Thanks for your question. I'm not sure exactly why this error is occurring immediately, but I did notice that you are using some older versions of GCC/CMake/CUDA than I normally use. Since you are using docker, it should be easy to try using newer versions. Can you try installing Marius using Docker by following the steps here?

calla212 commented 2 years ago

Thank you! It works.

But when running the example in the python folder, it occurs an error: RuntimeError: CUDA error: the provided PTX was compiled with an unsupported toolchain.

I will build the docker with a lower nvcc version later and try it again.