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

Make Error #2

Closed
sherleens opened this issue Oct 19, 2017 · 12 comments
Closed

Make Error #2

sherleens opened this issue Oct 19, 2017 · 12 comments

Comments

@sherleens
Copy link

sherleens commented Oct 19, 2017

I got this error for the install, could you provide any solution?

sdy@vig101799:~/SPN.pytorch/spnlib$ bash make.sh
Compiling cuda kernels...
rm: cannot remove 'libspn_kernel.cu.o': No such file or directory
make.sh: line 6: nvcc: command not found
Installing extension...
Including CUDA code.
running clean
removing 'build/temp.linux-x86_64-3.6' (and everything under it)
Including CUDA code.
running install
running bdist_egg
running egg_info
writing spn.egg-info/PKG-INFO
writing dependency_links to spn.egg-info/dependency_links.txt
writing requirements to spn.egg-info/requires.txt
writing top-level names to spn.egg-info/top_level.txt
reading manifest file 'spn.egg-info/SOURCES.txt'
writing manifest file 'spn.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
copying spn/_ext/libspn/init.py -> build/lib.linux-x86_64-3.6/spn/_ext/libspn
running build_ext
generating cffi module 'build/temp.linux-x86_64-3.6/spn._ext.libspn._libspn.c'
creating build/temp.linux-x86_64-3.6
building 'spn._ext.libspn._libspn' 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/sdy
creating build/temp.linux-x86_64-3.6/home/sdy/SPN.pytorch
creating build/temp.linux-x86_64-3.6/home/sdy/SPN.pytorch/spnlib
creating build/temp.linux-x86_64-3.6/home/sdy/SPN.pytorch/spnlib/spn
creating build/temp.linux-x86_64-3.6/home/sdy/SPN.pytorch/spnlib/spn/src
gcc -pthread -B /home/sdy/anaconda3/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -Ispn/src -I/home/sdy/anaconda3/include/python3.6m -c build/temp.linux-x86_64-3.6/spn._ext.libspn._libspn.c -o build/temp.linux-x86_64-3.6/build/temp.linux-x86_64-3.6/spn._ext.libspn._libspn.o -fopenmp
gcc -pthread -B /home/sdy/anaconda3/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -Ispn/src -I/home/sdy/anaconda3/include/python3.6m -c /home/sdy/SPN.pytorch/spnlib/spn/src/libspn.c -o build/temp.linux-x86_64-3.6/home/sdy/SPN.pytorch/spnlib/spn/src/libspn.o -fopenmp
gcc -pthread -B /home/sdy/anaconda3/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -Ispn/src -I/home/sdy/anaconda3/include/python3.6m -c /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c -o build/temp.linux-x86_64-3.6/home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.o -fopenmp
In file included from generic/SoftProposalGenerator.cu:1:0,
from /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c:14:
spn/src/generic/SoftProposalGenerator.cu: In function ‘cuspn_Float_SP_Generate’:
spn/src/generic/SoftProposalGenerator.cu:67:11: warning: unused variable ‘sumOver_debug’ [-Wunused-variable]
float sumOver_debug;
^
In file included from generic/SoftProposalGenerator.cu:1:0,
from /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c:17:
spn/src/generic/SoftProposalGenerator.cu: In function ‘cuspn_Double_SP_Generate’:
spn/src/generic/SoftProposalGenerator.cu:107:17: warning: passing argument 6 of ‘THCudaBlas_Sgemv’ from incompatible pointer type [-Wincompatible-pointer-types]
transferMatrix_data,
^
In file included from /home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THC.h:6:0,
from /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c:1:
/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THCBlas.h:15:14: note: expected ‘float *’ but argument is of type ‘double *’
THC_API void THCudaBlas_Sgemv(THCState *state, char trans, long m, long n, floa
^
In file included from generic/SoftProposalGenerator.cu:1:0,
from /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c:17:
spn/src/generic/SoftProposalGenerator.cu:109:17: warning: passing argument 8 of ‘THCudaBlas_Sgemv’ from incompatible pointer type [-Wincompatible-pointer-types]
proposal_data,
^
In file included from /home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THC.h:6:0,
from /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c:1:
/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THCBlas.h:15:14: note: expected ‘float *’ but argument is of type ‘double *’
THC_API void THCudaBlas_Sgemv(THCState *state, char trans, long m, long n, floa
^
In file included from generic/SoftProposalGenerator.cu:1:0,
from /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c:17:
spn/src/generic/SoftProposalGenerator.cu:112:17: warning: passing argument 11 of ‘THCudaBlas_Sgemv’ from incompatible pointer type [-Wincompatible-pointer-types]
proposalBuffer_data,
^
In file included from /home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THC.h:6:0,
from /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c:1:
/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THCBlas.h:15:14: note: expected ‘float *’ but argument is of type ‘double *’
THC_API void THCudaBlas_Sgemv(THCState *state, char trans, long m, long n, floa
^
In file included from generic/SoftProposalGenerator.cu:1:0,
from /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c:17:
spn/src/generic/SoftProposalGenerator.cu:67:11: warning: unused variable ‘sumOver_debug’ [-Wunused-variable]
float sumOver_debug;
^
gcc -pthread -shared -B /home/sdy/anaconda3/compiler_compat -L/home/sdy/anaconda3/lib -Wl,-rpath=/home/sdy/anaconda3/lib,--no-as-needed build/temp.linux-x86_64-3.6/build/temp.linux-x86_64-3.6/spn._ext.libspn._libspn.o build/temp.linux-x86_64-3.6/home/sdy/SPN.pytorch/spnlib/spn/src/libspn.o build/temp.linux-x86_64-3.6/home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.o spn/src/libspn_kernel.cu.o -L/home/sdy/anaconda3/lib -lpython3.6m -o build/lib.linux-x86_64-3.6/spn/_ext/libspn/_libspn.abi3.so
gcc: error: spn/src/libspn_kernel.cu.o: No such file or directory
error: command 'gcc' failed with exit status 1

@yeezhu
Copy link
Owner

yeezhu commented Oct 20, 2017

@sherleens
According to the error information "nvcc: command not found", I suggest you check whether the CUDA is correctly installed.

@AceCoooool
Copy link

I also meet a make error.
The error like:

In file included from generic/SoftProposalGenerator.cu:1:0,
                 from /home/ace/Code/paper_c_code/SPN/spnlib/spn/src/libspn_cuda.c:14:
spn/src/generic/SoftProposalGenerator.cu: In function ‘cuspn_Float_SP_Generate’:
spn/src/generic/SoftProposalGenerator.cu:67:11: warning: unused variable ‘sumOver_debug’ [-Wunused-variable]
     float sumOver_debug;
           ^
In file included from generic/SoftProposalGenerator.cu:1:0,
                 from /home/ace/Code/paper_c_code/SPN/spnlib/spn/src/libspn_cuda.c:17:
spn/src/generic/SoftProposalGenerator.cu: In function ‘cuspn_Double_SP_Generate’:
spn/src/generic/SoftProposalGenerator.cu:107:17: warning: passing argument 6 of ‘THCudaBlas_Sgemv’ from incompatible pointer type [-Wincompatible-pointer-types]
                 transferMatrix_data,
                 ^
In file included from /home/ace/.pyenv/versions/anaconda3-4.4.0/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THC.h:6:0,
                 from /home/ace/Code/paper_c_code/SPN/spnlib/spn/src/libspn_cuda.c:1:
/home/ace/.pyenv/versions/anaconda3-4.4.0/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THCBlas.h:15:14: note: expected ‘float *’ but argument is of type ‘double *’
 THC_API void THCudaBlas_Sgemv(THCState *state, char trans, long m, long n, float alpha, float *a, long lda, float *x, long incx, float beta, float *y, long incy);
              ^
In file included from generic/SoftProposalGenerator.cu:1:0,
                 from /home/ace/Code/paper_c_code/SPN/spnlib/spn/src/libspn_cuda.c:17:
spn/src/generic/SoftProposalGenerator.cu:109:17: warning: passing argument 8 of ‘THCudaBlas_Sgemv’ from incompatible pointer type [-Wincompatible-pointer-types]
                 proposal_data,
                 ^
In file included from /home/ace/.pyenv/versions/anaconda3-4.4.0/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THC.h:6:0,
                 from /home/ace/Code/paper_c_code/SPN/spnlib/spn/src/libspn_cuda.c:1:
/home/ace/.pyenv/versions/anaconda3-4.4.0/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THCBlas.h:15:14: note: expected ‘float *’ but argument is of type ‘double *’
 THC_API void THCudaBlas_Sgemv(THCState *state, char trans, long m, long n, float alpha, float *a, long lda, float *x, long incx, float beta, float *y, long incy);
              ^
In file included from generic/SoftProposalGenerator.cu:1:0,
                 from /home/ace/Code/paper_c_code/SPN/spnlib/spn/src/libspn_cuda.c:17:
spn/src/generic/SoftProposalGenerator.cu:112:17: warning: passing argument 11 of ‘THCudaBlas_Sgemv’ from incompatible pointer type [-Wincompatible-pointer-types]
                 proposalBuffer_data,
                 ^
In file included from /home/ace/.pyenv/versions/anaconda3-4.4.0/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THC.h:6:0,
                 from /home/ace/Code/paper_c_code/SPN/spnlib/spn/src/libspn_cuda.c:1:
/home/ace/.pyenv/versions/anaconda3-4.4.0/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THCBlas.h:15:14: note: expected ‘float *’ but argument is of type ‘double *’
 THC_API void THCudaBlas_Sgemv(THCState *state, char trans, long m, long n, float alpha, float *a, long lda, float *x, long incx, float beta, float *y, long incy);
              ^
In file included from generic/SoftProposalGenerator.cu:1:0,
                 from /home/ace/Code/paper_c_code/SPN/spnlib/spn/src/libspn_cuda.c:17:
spn/src/generic/SoftProposalGenerator.cu:67:11: warning: unused variable ‘sumOver_debug’ [-Wunused-variable]
     float sumOver_debug;

Is this due to the #include <THC/THCGenerateFloatType.h> ?
And I also just run build.py to create this extension C, the problem is also exist.

@sherleens
Copy link
Author

sherleens commented Oct 20, 2017

@yeezhu Thanks, the problem is solved:).

@yeezhu
Copy link
Owner

yeezhu commented Oct 23, 2017

@AceCoooool
Please try to update your PyTorch to the latest version.

@AceCoooool
Copy link

AceCoooool commented Oct 24, 2017

I use the pytorch 0.2.0 (through conda)? (your version is installed through source? --- I will try it)

OK, I can run it in my own computer, (install through source --- but I am not sure whether it can run on a conda install version. )

Thank you @yeezhu 😀

I am sorry to ask again: (I have a question about the build process):
Why run python build.py with the error fatal error: generic/SoftProposalGenerator.c: No such file or directory (I think it may caused by do not include this files)
But bash make.sh is right. ~ !
As far as I know: just run python build.py can create the .so file in _ext.libspn files. Is there any "magic" in setup? 😂

@yeezhu
Copy link
Owner

yeezhu commented Nov 1, 2017

@AceCoooool
Haha, no magic...
We setup spn in two steps, firstly build C++/Cuda code to python extension, and then packaging the SoftProposal as python class.

@ZhouYanzhao
Copy link

@AceCoooool
You need to compile CUDA kernel functions with nvcc first (check here). That's the "magical" part :)

@AceCoooool
Copy link

AceCoooool commented Nov 1, 2017

No, I have already compile CUDA kernel before. It's my fault: If I only run python build.py, it cannot find the generic/SoftProposalGenerator.c (python setup.py can find it due to this line: packages=find_packages(exclude=["build"])), so just add this file in python build.py can solve it. (I am so boring to ask this silly question 😂 , just do not want to add a package in python's site-package)

Thank you @yeezhu @ZhouYanzhao . You are so warmhearted ❤️

@sherleens , you can close this issue.

@emigmo
Copy link

emigmo commented Nov 26, 2017

I have install Pytorch (through pip install, not from source or conda)
But "bash make.sh" there are:
Compiling cuda kernels... rm: cannot remove 'libspn_kernel.cu.o': No such file or directory Installing extension... Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
compilation terminated.
`
Should I uninstall Pytorch and install from conda or from source?

@yeezhu
Copy link
Owner

yeezhu commented Jan 3, 2018

@emigmo
I provided a file named environment.yml which can help you check the environment :)

@zouxuelian
Copy link

@yeezhu Thanks, the problem is solved:).

I got this error for the install, could you provide any solution?

sdy@vig101799:~/SPN.pytorch/spnlib$ bash make.sh
Compiling cuda kernels...
rm: cannot remove 'libspn_kernel.cu.o': No such file or directory
make.sh: line 6: nvcc: command not found
Installing extension...
Including CUDA code.
running clean
removing 'build/temp.linux-x86_64-3.6' (and everything under it)
Including CUDA code.
running install
running bdist_egg
running egg_info
writing spn.egg-info/PKG-INFO
writing dependency_links to spn.egg-info/dependency_links.txt
writing requirements to spn.egg-info/requires.txt
writing top-level names to spn.egg-info/top_level.txt
reading manifest file 'spn.egg-info/SOURCES.txt'
writing manifest file 'spn.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
copying spn/_ext/libspn/init.py -> build/lib.linux-x86_64-3.6/spn/_ext/libspn
running build_ext
generating cffi module 'build/temp.linux-x86_64-3.6/spn._ext.libspn._libspn.c'
creating build/temp.linux-x86_64-3.6
building 'spn._ext.libspn._libspn' 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/sdy
creating build/temp.linux-x86_64-3.6/home/sdy/SPN.pytorch
creating build/temp.linux-x86_64-3.6/home/sdy/SPN.pytorch/spnlib
creating build/temp.linux-x86_64-3.6/home/sdy/SPN.pytorch/spnlib/spn
creating build/temp.linux-x86_64-3.6/home/sdy/SPN.pytorch/spnlib/spn/src
gcc -pthread -B /home/sdy/anaconda3/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -Ispn/src -I/home/sdy/anaconda3/include/python3.6m -c build/temp.linux-x86_64-3.6/spn._ext.libspn._libspn.c -o build/temp.linux-x86_64-3.6/build/temp.linux-x86_64-3.6/spn._ext.libspn._libspn.o -fopenmp
gcc -pthread -B /home/sdy/anaconda3/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -Ispn/src -I/home/sdy/anaconda3/include/python3.6m -c /home/sdy/SPN.pytorch/spnlib/spn/src/libspn.c -o build/temp.linux-x86_64-3.6/home/sdy/SPN.pytorch/spnlib/spn/src/libspn.o -fopenmp
gcc -pthread -B /home/sdy/anaconda3/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -Ispn/src -I/home/sdy/anaconda3/include/python3.6m -c /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c -o build/temp.linux-x86_64-3.6/home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.o -fopenmp
In file included from generic/SoftProposalGenerator.cu:1:0,
from /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c:14:
spn/src/generic/SoftProposalGenerator.cu: In function ‘cuspn_Float_SP_Generate’:
spn/src/generic/SoftProposalGenerator.cu:67:11: warning: unused variable ‘sumOver_debug’ [-Wunused-variable]
float sumOver_debug;
^
In file included from generic/SoftProposalGenerator.cu:1:0,
from /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c:17:
spn/src/generic/SoftProposalGenerator.cu: In function ‘cuspn_Double_SP_Generate’:
spn/src/generic/SoftProposalGenerator.cu:107:17: warning: passing argument 6 of ‘THCudaBlas_Sgemv’ from incompatible pointer type [-Wincompatible-pointer-types]
transferMatrix_data,
^
In file included from /home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THC.h:6:0,
from /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c:1:
/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THCBlas.h:15:14: note: expected ‘float *’ but argument is of type ‘double *’
THC_API void THCudaBlas_Sgemv(THCState *state, char trans, long m, long n, floa
^
In file included from generic/SoftProposalGenerator.cu:1:0,
from /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c:17:
spn/src/generic/SoftProposalGenerator.cu:109:17: warning: passing argument 8 of ‘THCudaBlas_Sgemv’ from incompatible pointer type [-Wincompatible-pointer-types]
proposal_data,
^
In file included from /home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THC.h:6:0,
from /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c:1:
/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THCBlas.h:15:14: note: expected ‘float *’ but argument is of type ‘double *’
THC_API void THCudaBlas_Sgemv(THCState *state, char trans, long m, long n, floa
^
In file included from generic/SoftProposalGenerator.cu:1:0,
from /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c:17:
spn/src/generic/SoftProposalGenerator.cu:112:17: warning: passing argument 11 of ‘THCudaBlas_Sgemv’ from incompatible pointer type [-Wincompatible-pointer-types]
proposalBuffer_data,
^
In file included from /home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THC.h:6:0,
from /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c:1:
/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THCBlas.h:15:14: note: expected ‘float *’ but argument is of type ‘double *’
THC_API void THCudaBlas_Sgemv(THCState *state, char trans, long m, long n, floa
^
In file included from generic/SoftProposalGenerator.cu:1:0,
from /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c:17:
spn/src/generic/SoftProposalGenerator.cu:67:11: warning: unused variable ‘sumOver_debug’ [-Wunused-variable]
float sumOver_debug;
^
gcc -pthread -shared -B /home/sdy/anaconda3/compiler_compat -L/home/sdy/anaconda3/lib -Wl,-rpath=/home/sdy/anaconda3/lib,--no-as-needed build/temp.linux-x86_64-3.6/build/temp.linux-x86_64-3.6/spn._ext.libspn._libspn.o build/temp.linux-x86_64-3.6/home/sdy/SPN.pytorch/spnlib/spn/src/libspn.o build/temp.linux-x86_64-3.6/home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.o spn/src/libspn_kernel.cu.o -L/home/sdy/anaconda3/lib -lpython3.6m -o build/lib.linux-x86_64-3.6/spn/_ext/libspn/_libspn.abi3.so
gcc: error: spn/src/libspn_kernel.cu.o: No such file or directory
error: command 'gcc' failed with exit status 1

please how do you make do well ? because I also meet issue.

@ltc576935585
Copy link

@yeezhu Thanks, the problem is solved:).

I got this error for the install, could you provide any solution?
sdy@vig101799:~/SPN.pytorch/spnlib$ bash make.sh
Compiling cuda kernels...
rm: cannot remove 'libspn_kernel.cu.o': No such file or directory
make.sh: line 6: nvcc: command not found
Installing extension...
Including CUDA code.
running clean
removing 'build/temp.linux-x86_64-3.6' (and everything under it)
Including CUDA code.
running install
running bdist_egg
running egg_info
writing spn.egg-info/PKG-INFO
writing dependency_links to spn.egg-info/dependency_links.txt
writing requirements to spn.egg-info/requires.txt
writing top-level names to spn.egg-info/top_level.txt
reading manifest file 'spn.egg-info/SOURCES.txt'
writing manifest file 'spn.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
copying spn/_ext/libspn/init.py -> build/lib.linux-x86_64-3.6/spn/_ext/libspn
running build_ext
generating cffi module 'build/temp.linux-x86_64-3.6/spn._ext.libspn._libspn.c'
creating build/temp.linux-x86_64-3.6
building 'spn._ext.libspn._libspn' 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/sdy
creating build/temp.linux-x86_64-3.6/home/sdy/SPN.pytorch
creating build/temp.linux-x86_64-3.6/home/sdy/SPN.pytorch/spnlib
creating build/temp.linux-x86_64-3.6/home/sdy/SPN.pytorch/spnlib/spn
creating build/temp.linux-x86_64-3.6/home/sdy/SPN.pytorch/spnlib/spn/src
gcc -pthread -B /home/sdy/anaconda3/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -Ispn/src -I/home/sdy/anaconda3/include/python3.6m -c build/temp.linux-x86_64-3.6/spn._ext.libspn._libspn.c -o build/temp.linux-x86_64-3.6/build/temp.linux-x86_64-3.6/spn._ext.libspn._libspn.o -fopenmp
gcc -pthread -B /home/sdy/anaconda3/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -Ispn/src -I/home/sdy/anaconda3/include/python3.6m -c /home/sdy/SPN.pytorch/spnlib/spn/src/libspn.c -o build/temp.linux-x86_64-3.6/home/sdy/SPN.pytorch/spnlib/spn/src/libspn.o -fopenmp
gcc -pthread -B /home/sdy/anaconda3/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -Ispn/src -I/home/sdy/anaconda3/include/python3.6m -c /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c -o build/temp.linux-x86_64-3.6/home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.o -fopenmp
In file included from generic/SoftProposalGenerator.cu:1:0,
from /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c:14:
spn/src/generic/SoftProposalGenerator.cu: In function ‘cuspn_Float_SP_Generate’:
spn/src/generic/SoftProposalGenerator.cu:67:11: warning: unused variable ‘sumOver_debug’ [-Wunused-variable]
float sumOver_debug;
^
In file included from generic/SoftProposalGenerator.cu:1:0,
from /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c:17:
spn/src/generic/SoftProposalGenerator.cu: In function ‘cuspn_Double_SP_Generate’:
spn/src/generic/SoftProposalGenerator.cu:107:17: warning: passing argument 6 of ‘THCudaBlas_Sgemv’ from incompatible pointer type [-Wincompatible-pointer-types]
transferMatrix_data,
^
In file included from /home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THC.h:6:0,
from /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c:1:
/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THCBlas.h:15:14: note: expected ‘float *’ but argument is of type ‘double *’
THC_API void THCudaBlas_Sgemv(THCState *state, char trans, long m, long n, floa
^
In file included from generic/SoftProposalGenerator.cu:1:0,
from /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c:17:
spn/src/generic/SoftProposalGenerator.cu:109:17: warning: passing argument 8 of ‘THCudaBlas_Sgemv’ from incompatible pointer type [-Wincompatible-pointer-types]
proposal_data,
^
In file included from /home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THC.h:6:0,
from /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c:1:
/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THCBlas.h:15:14: note: expected ‘float *’ but argument is of type ‘double *’
THC_API void THCudaBlas_Sgemv(THCState *state, char trans, long m, long n, floa
^
In file included from generic/SoftProposalGenerator.cu:1:0,
from /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c:17:
spn/src/generic/SoftProposalGenerator.cu:112:17: warning: passing argument 11 of ‘THCudaBlas_Sgemv’ from incompatible pointer type [-Wincompatible-pointer-types]
proposalBuffer_data,
^
In file included from /home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THC.h:6:0,
from /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c:1:
/home/sdy/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THCBlas.h:15:14: note: expected ‘float *’ but argument is of type ‘double *’
THC_API void THCudaBlas_Sgemv(THCState *state, char trans, long m, long n, floa
^
In file included from generic/SoftProposalGenerator.cu:1:0,
from /home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.c:17:
spn/src/generic/SoftProposalGenerator.cu:67:11: warning: unused variable ‘sumOver_debug’ [-Wunused-variable]
float sumOver_debug;
^
gcc -pthread -shared -B /home/sdy/anaconda3/compiler_compat -L/home/sdy/anaconda3/lib -Wl,-rpath=/home/sdy/anaconda3/lib,--no-as-needed build/temp.linux-x86_64-3.6/build/temp.linux-x86_64-3.6/spn._ext.libspn._libspn.o build/temp.linux-x86_64-3.6/home/sdy/SPN.pytorch/spnlib/spn/src/libspn.o build/temp.linux-x86_64-3.6/home/sdy/SPN.pytorch/spnlib/spn/src/libspn_cuda.o spn/src/libspn_kernel.cu.o -L/home/sdy/anaconda3/lib -lpython3.6m -o build/lib.linux-x86_64-3.6/spn/_ext/libspn/_libspn.abi3.so
gcc: error: spn/src/libspn_kernel.cu.o: No such file or directory
error: command 'gcc' failed with exit status 1

please how do you make do well ? because I also meet issue.

Did you solve this problem?I have the same.Please give some advice.Thank you.

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

7 participants