cherubicXN / afm_cvpr2019

Official implementation of paper "Learning Attraction Field Map for Robust Line Segment Detection" (CVPR 2019)
MIT License
297 stars 66 forks source link

undefined symbol: __cudaPopCallConfiguration #3

Closed quan-meng closed 5 years ago

quan-meng commented 5 years ago

image I followed your steps in INSTALL.md, but I met the error above every time. Could you tell me what the problem and what I should do? A thousand thanks for your help!

My installation procedures: (base) root@mq-ubuntu:/home/mq/Project/Afm/afm_cvpr2019-master# conda create --name afm python=3.5 Collecting package metadata: done Solving environment: done

Package Plan

environment location: /home/mq/anaconda3/envs/afm

added / updated specs:

The following NEW packages will be INSTALLED:

ca-certificates pkgs/main/linux-64::ca-certificates-2019.1.23-0 certifi pkgs/main/linux-64::certifi-2018.8.24-py35_1 libedit pkgs/main/linux-64::libedit-3.1.20181209-hc058e9b_0 libffi pkgs/main/linux-64::libffi-3.2.1-hd88cf55_4 libgcc-ng pkgs/main/linux-64::libgcc-ng-8.2.0-hdf63c60_1 libstdcxx-ng pkgs/main/linux-64::libstdcxx-ng-8.2.0-hdf63c60_1 ncurses pkgs/main/linux-64::ncurses-6.1-he6710b0_1 openssl pkgs/main/linux-64::openssl-1.0.2r-h7b6447c_0 pip pkgs/main/linux-64::pip-10.0.1-py35_0 python pkgs/main/linux-64::python-3.5.6-hc3d631a_0 readline pkgs/main/linux-64::readline-7.0-h7b6447c_5 setuptools pkgs/main/linux-64::setuptools-40.2.0-py35_0 sqlite pkgs/main/linux-64::sqlite-3.27.2-h7b6447c_0 tk pkgs/main/linux-64::tk-8.6.8-hbc83047_0 wheel pkgs/main/linux-64::wheel-0.31.1-py35_0 xz pkgs/main/linux-64::xz-5.2.4-h14c3975_4 zlib pkgs/main/linux-64::zlib-1.2.11-h7b6447c_3

Proceed ([y]/n)? y

Preparing transaction: done Verifying transaction: done Executing transaction: done # # To activate this environment, use # # $ conda activate afm # # To deactivate an active environment, use # # $ conda deactivate

(base) root@mq-ubuntu:/home/mq/Project/Afm/afm_cvpr2019-master# conda activate afm (afm) root@mq-ubuntu:/home/mq/Project/Afm/afm_cvpr2019-master# pip install -r requirements.txt Collecting yacs (from -r requirements.txt (line 1)) Using cached https://files.pythonhosted.org/packages/2f/51/9d613d67a8561a0cdf696c3909870f157ed85617fea3cff769bb7de09ef7/yacs-0.1.6-py3-none-any.whl Collecting cython (from -r requirements.txt (line 2)) Using cached https://files.pythonhosted.org/packages/c2/34/99ced126b3f41a908d8883570a67fbf900f10eea3cfdd11e388eb8ae9aac/Cython-0.29.6-cp35-cp35m-manylinux1_x86_64.whl Collecting matplotlib (from -r requirements.txt (line 3)) Using cached https://files.pythonhosted.org/packages/89/61/465fb3bfba684b0f53b5c4829c3c89e86e6fe9fdcdfda93e38f1788090f0/matplotlib-3.0.3-cp35-cp35m-manylinux1_x86_64.whl Collecting tqdm (from -r requirements.txt (line 4)) Using cached https://files.pythonhosted.org/packages/6c/4b/c38b5144cf167c4f52288517436ccafefe9dc01b8d1c190e18a6b154cd4a/tqdm-4.31.1-py2.py3-none-any.whl Collecting scikit-image (from -r requirements.txt (line 5)) Using cached https://files.pythonhosted.org/packages/82/73/4fbb789c741daf2530a96c74d37f2143162c30d512e68ac6cf3bbb9bf3dc/scikit_image-0.14.2-cp35-cp35m-manylinux1_x86_64.whl Collecting opencv-python (from -r requirements.txt (line 6)) Using cached https://files.pythonhosted.org/packages/59/de/208f66a8f57a8b32536c5f7ca5e883cb15ddae8032164ea192fa103d50f6/opencv_python-4.0.0.21-cp35-cp35m-manylinux1_x86_64.whl Collecting PyYAML (from yacs->-r requirements.txt (line 1)) Collecting kiwisolver>=1.0.1 (from matplotlib->-r requirements.txt (line 3)) Using cached https://files.pythonhosted.org/packages/7e/31/d6fedd4fb2c94755cd101191e581af30e1650ccce7a35bddb7930fed6574/kiwisolver-1.0.1-cp35-cp35m-manylinux1_x86_64.whl Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 (from matplotlib->-r requirements.txt (line 3)) Using cached https://files.pythonhosted.org/packages/de/0a/001be530836743d8be6c2d85069f46fecf84ac6c18c7f5fb8125ee11d854/pyparsing-2.3.1-py2.py3-none-any.whl Collecting numpy>=1.10.0 (from matplotlib->-r requirements.txt (line 3)) Using cached https://files.pythonhosted.org/packages/e3/18/4f013c3c3051f4e0ffbaa4bf247050d6d5e527fe9cb1907f5975b172f23f/numpy-1.16.2-cp35-cp35m-manylinux1_x86_64.whl Collecting python-dateutil>=2.1 (from matplotlib->-r requirements.txt (line 3)) Using cached https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl Collecting cycler>=0.10 (from matplotlib->-r requirements.txt (line 3)) Using cached https://files.pythonhosted.org/packages/f7/d2/e07d3ebb2bd7af696440ce7e754c59dd546ffe1bbe732c8ab68b9c834e61/cycler-0.10.0-py2.py3-none-any.whl Collecting cloudpickle>=0.2.1 (from scikit-image->-r requirements.txt (line 5)) Using cached https://files.pythonhosted.org/packages/47/d5/efa7cacef5d3bdcd71d7053a698fb9b64a20fff5cb3c592efefa53ea5578/cloudpickle-0.8.0-py2.py3-none-any.whl Collecting dask[array]>=1.0.0 (from scikit-image->-r requirements.txt (line 5)) Using cached https://files.pythonhosted.org/packages/b9/bc/0d747625c18397ed548c7890bf984a40d931b9ebac236c570a07565b0cc8/dask-1.1.4-py2.py3-none-any.whl Collecting six>=1.10.0 (from scikit-image->-r requirements.txt (line 5)) Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl Collecting pillow>=4.3.0 (from scikit-image->-r requirements.txt (line 5)) Using cached https://files.pythonhosted.org/packages/8b/e9/5c47710fe383f0582da668302a80a6355fe15c2ce2dde89b50fe34acefa6/Pillow-5.4.1-cp35-cp35m-manylinux1_x86_64.whl Collecting networkx>=1.8 (from scikit-image->-r requirements.txt (line 5)) Collecting PyWavelets>=0.4.0 (from scikit-image->-r requirements.txt (line 5)) Using cached https://files.pythonhosted.org/packages/74/58/962c64db493e164ad46dc862bdffd823037536f2884f1c59be442f06a42d/PyWavelets-1.0.2-cp35-cp35m-manylinux1_x86_64.whl Collecting scipy>=0.17.0 (from scikit-image->-r requirements.txt (line 5)) Using cached https://files.pythonhosted.org/packages/f0/30/526bee2ce18c066f9ff13ba89603f6c2b96c9fd406b57a21a7ba14bf5679/scipy-1.2.1-cp35-cp35m-manylinux1_x86_64.whl Requirement already satisfied: setuptools in /home/mq/anaconda3/envs/afm/lib/python3.5/site-packages (from kiwisolver>=1.0.1->matplotlib->-r requirements.txt (line 3)) (40.2.0) Collecting toolz>=0.7.3; extra == "array" (from dask[array]>=1.0.0->scikit-image->-r requirements.txt (line 5)) Collecting decorator>=4.3.0 (from networkx>=1.8->scikit-image->-r requirements.txt (line 5)) Using cached https://files.pythonhosted.org/packages/f1/cd/7c8240007e9716b14679bc217a1baefa4432aa30394f7e2ec40a52b1a708/decorator-4.3.2-py2.py3-none-any.whl Installing collected packages: PyYAML, yacs, cython, kiwisolver, pyparsing, numpy, six, python-dateutil, cycler, matplotlib, tqdm, cloudpickle, toolz, dask, pillow, decorator, networkx, PyWavelets, scipy, scikit-image, opencv-python Successfully installed PyWavelets-1.0.2 PyYAML-5.1 cloudpickle-0.8.0 cycler-0.10.0 cython-0.29.6 dask-1.1.4 decorator-4.3.2 kiwisolver-1.0.1 matplotlib-3.0.3 networkx-2.2 numpy-1.16.2 opencv-python-4.0.0.21 pillow-5.4.1 pyparsing-2.3.1 python-dateutil-2.8.0 scikit-image-0.14.2 scipy-1.2.1 six-1.12.0 toolz-0.9.0 tqdm-4.31.1 yacs-0.1.6 You are using pip version 10.0.1, however version 19.0.3 is available. You should consider upgrading via the 'pip install --upgrade pip' command. (afm) root@mq-ubuntu:/home/mq/Project/Afm/afm_cvpr2019-master# conda install pytorch torchvision cudatoolkit=9.0 -c pytorch Collecting package metadata: done Solving environment: done

## Package Plan ##

environment location: /home/mq/anaconda3/envs/afm

added / updated specs:

The following NEW packages will be INSTALLED:

blas pkgs/main/linux-64::blas-1.0-mkl cffi pkgs/main/linux-64::cffi-1.11.5-py35he75722e_1 cudatoolkit pkgs/main/linux-64::cudatoolkit-9.0-h13b8566_0 freetype pkgs/main/linux-64::freetype-2.9.1-h8a8886c_1 intel-openmp pkgs/main/linux-64::intel-openmp-2019.1-144 jpeg pkgs/main/linux-64::jpeg-9b-h024ee3a_2 libgfortran-ng pkgs/main/linux-64::libgfortran-ng-7.3.0-hdf63c60_0 libpng pkgs/main/linux-64::libpng-1.6.36-hbc83047_0 libtiff pkgs/main/linux-64::libtiff-4.0.10-h2733197_2 mkl pkgs/main/linux-64::mkl-2018.0.3-1 mkl_fft pkgs/main/linux-64::mkl_fft-1.0.6-py35h7dd41cf_0 mkl_random pkgs/main/linux-64::mkl_random-1.0.1-py35h4414c95_1 ninja pkgs/main/linux-64::ninja-1.8.2-py35h6bb024c_1 numpy pkgs/main/linux-64::numpy-1.15.2-py35h1d66e8a_0 numpy-base pkgs/main/linux-64::numpy-base-1.15.2-py35h81de0dd_0 olefile pkgs/main/linux-64::olefile-0.46-py35_0 pillow pkgs/main/linux-64::pillow-5.2.0-py35heded4f4_0 pycparser pkgs/main/linux-64::pycparser-2.19-py35_0 pytorch pytorch/linux-64::pytorch-1.0.1-py3.5_cuda9.0.176_cudnn7.4.2_2 six pkgs/main/linux-64::six-1.11.0-py35_1 torchvision pytorch/noarch::torchvision-0.2.2-py_3 zstd pkgs/main/linux-64::zstd-1.3.7-h0b5b093_0

Proceed ([y]/n)? y

Preparing transaction: done Verifying transaction: done Executing transaction: done (afm) root@mq-ubuntu:/home/mq/Project/Afm/afm_cvpr2019-master# cd lib (afm) root@mq-ubuntu:/home/mq/Project/Afm/afm_cvpr2019-master/lib# make cd afm_op; python setup.py build_ext --inplace; rm -rf build; cd ../../ /home/mq/anaconda3/envs/afm/lib/python3.5/distutils/extension.py:132: UserWarning: Unknown Extension options: 'defined_macros' warnings.warn(msg) running build_ext building 'CUDA' extension creating build creating build/temp.linux-x86_64-3.5 creating build/temp.linux-x86_64-3.5/cuda gcc -pthread -B /home/mq/anaconda3/envs/afm/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -I/home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/torch/lib/include -I/home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/torch/lib/include/torch/csrc/api/include -I/home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/torch/lib/include/TH -I/home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/home/mq/anaconda3/envs/afm/include/python3.5m -c ./vision.cpp -o build/temp.linux-x86_64-3.5/./vision.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=CUDA -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++ /usr/local/cuda/bin/nvcc -I. -I/home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/torch/lib/include -I/home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/torch/lib/include/torch/csrc/api/include -I/home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/torch/lib/include/TH -I/home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/home/mq/anaconda3/envs/afm/include/python3.5m -c ./cuda/afm.cu -o build/temp.linux-x86_64-3.5/./cuda/afm.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=CUDA -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 creating build/lib.linux-x86_64-3.5 g++ -pthread -shared -L/home/mq/anaconda3/envs/afm/lib -B /home/mq/anaconda3/envs/afm/compiler_compat -Wl,-rpath=/home/mq/anaconda3/envs/afm/lib,--no-as-needed build/temp.linux-x86_64-3.5/./vision.o build/temp.linux-x86_64-3.5/./cuda/afm.o -L/usr/local/cuda/lib64 -lcudart -o build/lib.linux-x86_64-3.5/CUDA.cpython-35m-x86_64-linux-gnu.so copying build/lib.linux-x86_64-3.5/CUDA.cpython-35m-x86_64-linux-gnu.so -> cd squeeze/; python setup.py build_ext --inplace; rm -rf build; cd ../../ running build_ext skipping 'squeeze.cpp' Cython extension (up-to-date) building 'squeeze' extension creating build creating build/temp.linux-x86_64-3.5 gcc -pthread -B /home/mq/anaconda3/envs/afm/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/numpy/core/include -I/home/mq/anaconda3/envs/afm/include/python3.5m -c kernel.cpp -o build/temp.linux-x86_64-3.5/kernel.o -Wno-unused-function cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ kernel.cpp: In function ‘void region_grow(int, int, float, float&, std::vector&, std::vector&, std::vector&, PoLsMap&, float)’: kernel.cpp:132:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int id = 0; id < map(x,y).size(); ++id) {


kernel.cpp:154:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0; i < reg_int.size(); ++i)
                    ~~^~~~~~~~~~~~~~~~
kernel.cpp:164:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for(int k = 0; k < map(xx,yy).size(); ++k) {
                                ~~^~~~~~~~~~~~~~~~~~~
kernel.cpp: In function ‘bool region2rect(const std::vector<Point>&, const std::vector<float>&, float, float, float, Rectangle&)’:
kernel.cpp:199:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i=0; i<reg_int.size(); ++i)
                  ~^~~~~~~~~~~~~~~
kernel.cpp:218:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i=0; i<reg_int.size(); ++i)
                  ~^~~~~~~~~~~~~~~
kernel.cpp: In function ‘void refine(std::vector<Point>&, Rectangle&, std::vector<float>&, PoLsMap&)’:
kernel.cpp:277:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0; i < reg_int.size(); ++i)
                    ~~^~~~~~~~~~~~~~~~
kernel.cpp:291:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0; i < reg_rot.size(); ++i)
                    ~~^~~~~~~~~~~~~~~~
kernel.cpp:312:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i = 0; i < local_ind.size();++i)
                        ~~^~~~~~~~~~~~~~~~~~
kernel.cpp:317:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for(int n = 0; n < map(x,y).size();++n)
                            ~~^~~~~~~~~~~~~~~~~
kernel.cpp:267:11: warning: unused variable ‘x1’ [-Wunused-variable]
     float x1 = rect.l_min*dx - rect.w_min*dy;
           ^~
kernel.cpp:268:11: warning: unused variable ‘y1’ [-Wunused-variable]
     float y1 = rect.l_min*dy + rect.w_min*dx;
           ^~
kernel.cpp:269:11: warning: unused variable ‘x2’ [-Wunused-variable]
     float x2 = rect.l_max*dx - rect.w_min*dy;
           ^~
kernel.cpp:270:11: warning: unused variable ‘y2’ [-Wunused-variable]
     float y2 = rect.l_max*dy + rect.w_min*dx;
           ^~
kernel.cpp:271:11: warning: unused variable ‘x3’ [-Wunused-variable]
     float x3 = rect.l_max*dx - rect.w_max*dy;
           ^~
kernel.cpp:272:11: warning: unused variable ‘y3’ [-Wunused-variable]
     float y3 = rect.l_max*dy + rect.w_max*dx;
           ^~
kernel.cpp:273:11: warning: unused variable ‘x4’ [-Wunused-variable]
     float x4 = rect.l_min*dx - rect.w_max*dy;
           ^~
kernel.cpp:274:11: warning: unused variable ‘y4’ [-Wunused-variable]
     float y4 = rect.l_min*dy + rect.w_max*dx;
           ^~
kernel.cpp: In function ‘void _region_grow(int, int, const float*, const float*, const float*, int, float*, int*)’:
kernel.cpp:364:15: warning: unused variable ‘length’ [-Wunused-variable]
         float length = sqrt((vec_rects[i].x1-vec_rects[i].x2)*(vec_rects[i].x1-vec_rects[i].x2) +
               ^~~~~~
gcc -pthread -B /home/mq/anaconda3/envs/afm/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/numpy/core/include -I/home/mq/anaconda3/envs/afm/include/python3.5m -c squeeze.cpp -o build/temp.linux-x86_64-3.5/squeeze.o -Wno-unused-function
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/numpy/core/include/numpy/ndarraytypes.h:1823:0,
                 from /home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
                 from /home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from squeeze.cpp:581:
/home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it by " \
  ^~~~~~~
g++ -pthread -shared -L/home/mq/anaconda3/envs/afm/lib -B /home/mq/anaconda3/envs/afm/compiler_compat -Wl,-rpath=/home/mq/anaconda3/envs/afm/lib,--no-as-needed build/temp.linux-x86_64-3.5/kernel.o build/temp.linux-x86_64-3.5/squeeze.o -o /home/mq/Project/Afm/afm_cvpr2019-master/lib/squeeze/squeeze.cpython-35m-x86_64-linux-gnu.so
(afm) root@mq-ubuntu:/home/mq/Project/Afm/afm_cvpr2019-master/lib# **conda develop . ./lib**
added /home/mq/Project/Afm/afm_cvpr2019-master/lib
completed operation for: /home/mq/Project/Afm/afm_cvpr2019-master/lib
added /home/mq/Project/Afm/afm_cvpr2019-master/lib/lib
completed operation for: /home/mq/Project/Afm/afm_cvpr2019-master/lib/lib
(afm) root@mq-ubuntu:/home/mq/Project/Afm/afm_cvpr2019-master/lib# cd ..
(afm) root@mq-ubuntu:/home/mq/Project/Afm/afm_cvpr2019-master# **python test.py --config-file experiments/afm_atrous.yaml --gpu 0**
Traceback (most recent call last):
  File "test.py", line 2, in <module>
    from modeling.afm import AFM
  File "/home/mq/Project/Afm/afm_cvpr2019-master/modeling/afm.py", line 3, in <module>
    from dataset.build import build_train_dataset, build_test_dataset
  File "/home/mq/Project/Afm/afm_cvpr2019-master/dataset/build.py", line 3, in <module>
    from .afmDataset import AFMTrainDataset, AFMTestDataset, collect_fn
  File "/home/mq/Project/Afm/afm_cvpr2019-master/dataset/afmDataset.py", line 10, in <module>
    from .cache import AfmTrainCache
  File "/home/mq/Project/Afm/afm_cvpr2019-master/dataset/cache.py", line 6, in <module>
    from lib.afm_op import afm
  File "/home/mq/Project/Afm/afm_cvpr2019-master/lib/afm_op/__init__.py", line 2, in <module>
    from .CUDA import afm
ImportError: /home/mq/Project/Afm/afm_cvpr2019-master/lib/afm_op/CUDA.cpython-35m-x86_64-linux-gnu.so: undefined symbol: __cudaPopCallConfiguration
cherubicXN commented 5 years ago

Is your CUDA version correct?

quan-meng commented 5 years ago

image

quan-meng commented 5 years ago

I have found what the problem is image