isl-org / isl-org/Open3D-ML

Cannot cmake Open3D-ML with PyTorch & CUDA 11.3

Open
#571 1 comment 0 reactions 0 assignees View on GitHub
build/install issue
Dominant language
Python
Stars
2.3k
Forks
365
Avg merge
4h 6m
Merged PRs (30d)
1

Description

### Checklist

- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D-ML/issues).
- [X] I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).

### Steps to reproduce the issue

I followed the instructions on http://www.open3d.org/docs/release/compilation.html#ubuntu-macos and http://www.open3d.org/docs/release/compilation.html#ml-module to build Open3D from source:
```
git clone https://github.com/isl-org/Open3D
cd Open3D
util/install_deps_ubuntu.sh
mkdir build
cd build
cmake -DBUILD_CUDA_MODULE=ON \
-DGLIBCXX_USE_CXX11_ABI=OFF \
-DBUILD_PYTORCH_OPS=ON \
-DBUNDLE_OPEN3D_ML=ON \
-DOPEN3D_ML_ROOT=https://github.com/isl-org/Open3D-ML.git \
-DPython3_ROOT=/home/rayne/anaconda3/envs/nf2/bin/python \
..

```
And the last sentence (cmake) introduce some errors.

### Error message

The content of `CMakeError.log` is shown below:

```
Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /home/rayne/code/NeuroFluid/Open3D/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make -f Makefile cmTC_ebb67/fast && /usr/bin/make -f CMakeFiles/cmTC_ebb67.dir/build.make CMakeFiles/cmTC_ebb67.dir/build
make[1]: 进入目录“/home/rayne/code/NeuroFluid/Open3D/build/CMakeFiles/CMakeTmp”
Building C object CMakeFiles/cmTC_ebb67.dir/src.c.o
/usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD -fPIE -o CMakeFiles/cmTC_ebb67.dir/src.c.o -c /home/rayne/code/NeuroFluid/Open3D/build/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_ebb67
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ebb67.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_ebb67.dir/src.c.o -o cmTC_ebb67
/usr/bin/ld: CMakeFiles/cmTC_ebb67.dir/src.c.o: in function `main':
src.c:(.text+0x3e): undefined reference to `pthread_create'
/usr/bin/ld: src.c:(.text+0x4a): undefined reference to `pthread_detach'
/usr/bin/ld: src.c:(.text+0x56): undefined reference to `pthread_cancel'
/usr/bin/ld: src.c:(.text+0x67): undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_ebb67.dir/build.make:99:cmTC_ebb67] 错误 1
make[1]: 离开目录“/home/rayne/code/NeuroFluid/Open3D/build/CMakeFiles/CMakeTmp”
make: *** [Makefile:127:cmTC_ebb67/fast] 错误 2

Source file was:
#include

static void* test_func(void* data)
{
return data;
}

int main(void)
{
pthread_t thread;
pthread_create(&thread, NULL, test_func, NULL);
pthread_detach(thread);
pthread_cancel(thread);
pthread_join(thread, NULL);
pthread_atfork(NULL, NULL, NULL);
pthread_exit(NULL);

return 0;
}

Compiling the CUDA compiler identification source file "CMakeCUDACompilerId.cu" failed.
Compiler: /usr/bin/nvcc
Build flags:
Id flags: --keep;--keep-dir;tmp;-gencode=arch=compute_86,code=sm_86 -v

The output was:
1
nvcc fatal : Unsupported gpu architecture 'compute_86'

Compiling the CUDA compiler identification source file "CMakeCUDACompilerId.cu" failed.
Compiler: /usr/bin/nvcc
Build flags:
Id flags: --keep;--keep-dir;tmp;-gencode=arch=compute_86,code=sm_86 -v

The output was:
1
nvcc fatal : Unsupported gpu architecture 'compute_86'

Compiling the CUDA compiler identification source file "CMakeCUDACompilerId.cu" failed.
Compiler: /usr/bin/nvcc
Build flags:
Id flags: --keep;--keep-dir;tmp;-gencode=arch=compute_86,code=sm_86 -v

The output was:
1
nvcc fatal : Unsupported gpu architecture 'compute_86'

Compiling the CUDA compiler identification source file "CMakeCUDACompilerId.cu" failed.
Compiler: /usr/bin/nvcc
Build flags:
Id flags: --keep;--keep-dir;tmp;-gencode=arch=compute_86,code=sm_86 -v

The output was:
1
nvcc fatal : Unsupported gpu architecture 'compute_86'

Compiling the CUDA compiler identification source file "CMakeCUDACompilerId.cu" failed.
Compiler: /usr/bin/nvcc
Build flags:
Id flags: --keep;--keep-dir;tmp;-gencode=arch=compute_86,code=sm_86 -v

The output was:
1
nvcc fatal : Unsupported gpu architecture 'compute_86'

Compiling the CUDA compiler identification source file "CMakeCUDACompilerId.cu" failed.
Compiler: /usr/bin/nvcc
Build flags:
Id flags: --keep;--keep-dir;tmp;-gencode=arch=compute_86,code=sm_86 -v

The output was:
1
nvcc fatal : Unsupported gpu architecture 'compute_86'

```

### Open3D, Python and System information

```markdown
- Operating system: Ubuntu 20.04
- Python version: Python 3.8.15
- Open3D version: (output from python: `print(open3d.__version__)`)
- System type: x86_64
- Is this remote workstation?: no
- How did you install Open3D?: build from source
- Compiler version (if built from source): GCC 11.2.0, cmake 3.20.0
```

### Additional information

This is my conda list if helpful:

```
# Name Version Build Channel
_libgcc_mutex 0.1 main
_openmp_mutex 5.1 1_gnu
ca-certificates 2022.10.11 h06a4308_0
certifi 2022.9.24 py38h06a4308_0
ld_impl_linux-64 2.38 h1181459_1
libffi 3.4.2 h295c915_4
libgcc-ng 11.2.0 h1234567_1
libgomp 11.2.0 h1234567_1
libstdcxx-ng 11.2.0 h1234567_1
ncurses 6.3 h5eee18b_3
openssl 1.1.1s h7f8727e_0
pip 22.2.2 py38h06a4308_0
python 3.8.15 h3fd9d12_0
readline 8.2 h5eee18b_0
setuptools 65.5.0 py38h06a4308_0
sqlite 3.39.3 h5082296_0
tk 8.6.12 h1ccaba5_0
wheel 0.37.1 pyhd3eb1b0_0
xz 5.2.6 h5eee18b_0
zlib 1.2.13 h5eee18b_0
```

Thank you for your help!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.