Comments (10)
Hi @Zhuysheng and @clarkren !
It seems like this issue can be addressed by creating a symbolic link from your cuda-8.0 directory to /usr/local/cuda. Try this (my cuda is installed at /usr/local/cuda-8.0 you can replace with yours),
sudo ln -s /usr/local/cuda-8.0 /usr/local/cuda
At least it addresses the installation problem for me.
from flownet2-pytorch.
@Zhuysheng , can you give more information about your environment where you run the install.sh?
from flownet2-pytorch.
Hi , fitsumreda! I meet the same problem. My system is ubuntu14.04, with cuda8.0,cudnn6.0.
from flownet2-pytorch.
@clarkren, @Zhuysheng,
Did you try to use the dockerfile in the repo?
That may help debug the cuda environment issue.
from flownet2-pytorch.
@fitsumreda
I think I have correctly installed the cuda env. I tested the env like this:
"
Python 2.7.14 |Anaconda, Inc.| (default, Oct 27 2017, 18:21:12)
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import torch
x = torch.randn(2, 3)
x = x.cuda()
x
tensor([[ 1.7644, 0.6340, 0.9584],
[ 0.2991, 0.5439, -0.9146]], device='cuda:0')
"
from flownet2-pytorch.
Hi @Qianli-ion
I have tried that,but it seems not effective.
from flownet2-pytorch.
@fitsumreda @Qianli-ion
Compiling correlation kernels by nvcc...
In file included from /home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THVector.h:5:0,
from /home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/TH.h:12,
from _correlation.c:492:
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function ‘TH_polevl’:
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:134:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (size_t i = 0; i <= len; i++) {
^
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:134:3: note: use option -std=c99 or -std=gnu99 to compile your code
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function ‘TH_polevlf’:
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:142:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (size_t i = 0; i <= len; i++) {
^
In file included from /home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THVector.h:5:0,
from /home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/TH.h:12,
from _correlation.c:492:
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function ‘TH_trigamma’:
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:260:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = 0; i < 6; ++i) {
^
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function ‘TH_trigammaf’:
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:278:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = 0; i < 6; ++i) {
^
Traceback (most recent call last):
File "build.py", line 31, in
ffi.build()
File "/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/init.py", line 184, in build
_build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
File "/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/init.py", line 108, in _build_extension
outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
File "/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/cffi/api.py", line 697, in compile
compiler_verbose=verbose, debug=debug, **kwds)
File "/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/cffi/recompiler.py", line 1520, in recompile
compiler_verbose, debug)
File "/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/cffi/ffiplatform.py", line 22, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
File "/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/cffi/ffiplatform.py", line 58, in _build
raise VerificationError('%s: %s' % (e.class.name, e))
cffi.error.VerificationError: CompileError: command 'gcc' failed with exit status 1
Compiling resample2d kernels by nvcc...
In file included from /home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THVector.h:5:0,
from /home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/TH.h:12,
from _resample2d.c:492:
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function ‘TH_polevl’:
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:134:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (size_t i = 0; i <= len; i++) {
^
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:134:3: note: use option -std=c99 or -std=gnu99 to compile your code
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function ‘TH_polevlf’:
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:142:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (size_t i = 0; i <= len; i++) {
^
In file included from /home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THVector.h:5:0,
from /home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/TH.h:12,
from _resample2d.c:492:
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function ‘TH_trigamma’:
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:260:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = 0; i < 6; ++i) {
^
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function ‘TH_trigammaf’:
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:278:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = 0; i < 6; ++i) {
^
Traceback (most recent call last):
File "build.py", line 31, in
ffi.build()
File "/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/init.py", line 184, in build
_build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
File "/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/init.py", line 108, in _build_extension
outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
File "/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/cffi/api.py", line 697, in compile
compiler_verbose=verbose, debug=debug, **kwds)
File "/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/cffi/recompiler.py", line 1520, in recompile
compiler_verbose, debug)
File "/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/cffi/ffiplatform.py", line 22, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
File "/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/cffi/ffiplatform.py", line 58, in _build
raise VerificationError('%s: %s' % (e.class.name, e))
cffi.error.VerificationError: CompileError: command 'gcc' failed with exit status 1
Compiling channelnorm kernels by nvcc...
In file included from /home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THVector.h:5:0,
from /home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/TH.h:12,
from _channelnorm.c:492:
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function ‘TH_polevl’:
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:134:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (size_t i = 0; i <= len; i++) {
^
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:134:3: note: use option -std=c99 or -std=gnu99 to compile your code
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function ‘TH_polevlf’:
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:142:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (size_t i = 0; i <= len; i++) {
^
In file included from /home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THVector.h:5:0,
from /home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/TH.h:12,
from _channelnorm.c:492:
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function ‘TH_trigamma’:
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:260:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = 0; i < 6; ++i) {
^
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function ‘TH_trigammaf’:
/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:278:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = 0; i < 6; ++i) {
^
Traceback (most recent call last):
File "build.py", line 31, in
ffi.build()
File "/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/init.py", line 184, in build
_build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
File "/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/torch/utils/ffi/init.py", line 108, in _build_extension
outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
File "/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/cffi/api.py", line 697, in compile
compiler_verbose=verbose, debug=debug, **kwds)
File "/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/cffi/recompiler.py", line 1520, in recompile
compiler_verbose, debug)
File "/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/cffi/ffiplatform.py", line 22, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
File "/home/li/anaconda2/envs/caf2/lib/python2.7/site-packages/cffi/ffiplatform.py", line 58, in _build
raise VerificationError('%s: %s' % (e.class.name, e))
cffi.error.VerificationError: CompileError: command 'gcc' failed with exit status 1
from flownet2-pytorch.
@Qianli-ion it solved my install problem,thanks
from flownet2-pytorch.
Hi @clarkren
It seems like the error you get right now is not the "cuda.h" problem. So I guess that symbolic link does solve your "cuda.h" problem?
Now regarding the new problem. From the error you get "‘for’ loop initial declarations are only allowed in C99 mode", it seems like to solve it you can try to add -std=c99 flag in your compilation script. I don't have this problem during my installation so I'm not 100% sure. Have you checked out this post, https://stackoverflow.com/questions/29338206/error-for-loop-initial-declarations-are-only-allowed-in-c99-mode?
from flownet2-pytorch.
@Qianli-ion it solved my install problem,thanks
Hi @Qianli-ion how did you solve the issue?
I try running the bash install.sh.
Error that is commands 'x86_64 -linux-gnc-gcc' failed with exit status 1
can you explain how to run it will be helpful.
Thank you
from flownet2-pytorch.
Related Issues (20)
- ValueError (inference) HOT 1
- inference error
- Error when running Inference: forward call is outdated and returns an error when called.
- Flownet2 model for faces HOT 1
- Thanks for this repository! could you please provide the pretrained model for FlowNet2ss or FlowNet2s (lower-case letters, pytorch)? HOT 2
- AttributeError: Module 'time' has no attribute 'clock'
- 想问下如何跑多个文件
- I cannot load the pretrained FlowNetS
- Training with MultiScale loss
- Should I extact "tar" for FlowNet2_checkpoint.pth.tar ?
- Groundtruth of my dataset!!!
- How to achieve the 3D version of correlation layer?
- CUDA error: the provided PTX was compiled with an unsupported toolchain
- start_epoch argument fix
- Error when training Flownet2S HOT 1
- Wrong calculation of EPE HOT 1
- Installation is a nightmare HOT 3
- TypeError: forward() takes 2 positional arguments but 3 were given,flownetc_flow2 = self.flownetc(x)[0].why!!!!
- cuda version HOT 2
- Segmentation fault
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flownet2-pytorch.