Coder Social home page Coder Social logo

Comments (10)

Qianli-ion avatar Qianli-ion commented on July 29, 2024 1

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.

fitsumreda avatar fitsumreda commented on July 29, 2024

@Zhuysheng , can you give more information about your environment where you run the install.sh?

from flownet2-pytorch.

clarkren avatar clarkren commented on July 29, 2024

Hi , fitsumreda! I meet the same problem. My system is ubuntu14.04, with cuda8.0,cudnn6.0.

from flownet2-pytorch.

fitsumreda avatar fitsumreda commented on July 29, 2024

@clarkren, @Zhuysheng,
Did you try to use the dockerfile in the repo?
That may help debug the cuda environment issue.

from flownet2-pytorch.

clarkren avatar clarkren commented on July 29, 2024

@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.

clarkren avatar clarkren commented on July 29, 2024

Hi @Qianli-ion
I have tried that,but it seems not effective.

from flownet2-pytorch.

clarkren avatar clarkren commented on July 29, 2024

@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.

Zhuysheng avatar Zhuysheng commented on July 29, 2024

@Qianli-ion it solved my install problem,thanks

from flownet2-pytorch.

Qianli-ion avatar Qianli-ion commented on July 29, 2024

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.

ShashiAdhikari avatar ShashiAdhikari commented on July 29, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.