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

build fail with nvcc_options? #3501

Closed
justdark opened this Issue Jul 26, 2016 · 8 comments

Comments

Projects
None yet
6 participants
@justdark

justdark commented Jul 26, 2016

I build tensorflow in virtualenv , it says :
gcc: error: unrecognized command line option '-nvcc_options=relaxed-constexpr'
gcc: error: unrecognized command line option '-nvcc_options=ftz=true'

gcc is 4.8.2
cuda is 7.0
cudnn is 4.0.7
more detail:

ERROR: /u01/qianming/tensorflow/tensorflow/core/kernels/BUILD:1575:1: C++ compilation of rule '//tensorflow/core/kernels:training_ops_gpu' failed: gcc failed: error executing command
(cd /home/hongpengfei.lhpf/.cache/bazel/_bazel_hongpengfei.lhpf/072f5a261c0f2d9a7bd6ffe5c05ae7b2/execroot/tensorflow && \
exec env - \
LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/lib:/usr/local/cuda/lib64:/usr/local/cuda-7.5/lib64::/usr/lib/toolchains/lib:/usr/local/lib:/usr/local/lib64:/usr/local/cuda/lib64:/usr/local/cuda/lib \
       PATH=/u01/qianming/tensor_env/bin:/home/hongpengfei.lhpf/.usr/local/bin/:/u01/mysql/bin:/usr/local/cuda-7.5/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/X11R6/bin:/opt/dell/srvadmin/bin:/home/hongpengfei.lhpf/bin:/home/mysql/bin:/usr/local/toolchains/bin:/usr/local/cuda/bin:/home/hongpengfei.lhpf/bin \
/home/hongpengfei.lhpf/.usr/local/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++11' -MD -MF bazel-out/local_linux-opt/bin/tensorflow/core/kernels/_objs/training_ops_gpu/tensorflow/core/kernels/training_ops_gpu.cu.d '-frandom-seed=bazel-out/local_linux-opt/bin/tensorflow/core/kernels/_objs/training_ops_gpu/tensorflow/core/kernels/training_ops_gpu.cu.o' -iquote . -iquote bazel-out/local_linux-opt/genfiles -iquote external/protobuf -iquote bazel-out/local_linux-opt/genfiles/external/protobuf -iquote external/bazel_tools -iquote bazel-out/local_linux-opt/genfiles/external/bazel_tools -iquote external/farmhash_archive -iquote bazel-out/local_linux-opt/genfiles/external/farmhash_archive -iquote external/jpeg_archive -iquote bazel-out/local_linux-opt/genfiles/external/jpeg_archive -iquote external/png_archive -iquote bazel-out/local_linux-opt/genfiles/external/png_archive -iquote external/highwayhash -iquote bazel-out/local_linux-opt/genfiles/external/highwayhash -iquote external/re2 -iquote bazel-out/local_linux-opt/genfiles/external/re2 -iquote external/eigen_archive -iquote bazel-out/local_linux-opt/genfiles/external/eigen_archive -isystem external/protobuf/src -isystem bazel-out/local_linux-opt/genfiles/external/protobuf/src -isystem external/bazel_tools/tools/cpp/gcc3 -isystem external/farmhash_archive/farmhash-34c13ddfab0e35422f4c3979f360635a8c050260 -isystem bazel-out/local_linux-opt/genfiles/external/farmhash_archive/farmhash-34c13ddfab0e35422f4c3979f360635a8c050260 -isystem external/jpeg_archive/jpeg-9a -isystem bazel-out/local_linux-opt/genfiles/external/jpeg_archive/jpeg-9a -isystem external/png_archive/libpng-1.2.53 -isystem bazel-out/local_linux-opt/genfiles/external/png_archive/libpng-1.2.53 -isystem external/highwayhash -isystem bazel-out/local_linux-opt/genfiles/external/highwayhash -isystem external/re2 -isystem bazel-out/local_linux-opt/genfiles/external/re2 -isystem third_party/eigen3 -isystem bazel-out/local_linux-opt/genfiles/third_party/eigen3 -isystem external/eigen_archive/eigen-eigen-d02e6a705c30 -isystem bazel-out/local_linux-opt/genfiles/external/eigen_archive/eigen-eigen-d02e6a705c30 -isystem third_party/gpus/cuda/include -isystem bazel-out/local_linux-opt/genfiles/third_party/gpus/cuda/include -isystem third_party/gpus/cuda -isystem bazel-out/local_linux-opt/genfiles/third_party/gpus/cuda -x cuda '-DGOOGLE_CUDA=1' '-nvcc_options=relaxed-constexpr' '-nvcc_options=ftz=true' -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -fno-canonical-system-headers -c tensorflow/core/kernels/training_ops_gpu.cu.cc -o bazel-out/local_linux-opt/bin/tensorflow/core/kernels/_objs/training_ops_gpu/tensorflow/core/kernels/training_ops_gpu.cu.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
gcc: error: unrecognized command line option '-nvcc_options=relaxed-constexpr'
gcc: error: unrecognized command line option '-nvcc_options=ftz=true'
@michaelisard

This comment has been minimized.

Show comment
Hide comment
@michaelisard

michaelisard Jul 26, 2016

Member

What is the OS? (It's helpful if you fill out the issue template you see when you click on 'new issue'!)

Member

michaelisard commented Jul 26, 2016

What is the OS? (It's helpful if you fill out the issue template you see when you click on 'new issue'!)

@justdark

This comment has been minimized.

Show comment
Hide comment
@justdark

justdark Jul 27, 2016

it's centOS 6.5

justdark commented Jul 27, 2016

it's centOS 6.5

@michaelisard

This comment has been minimized.

Show comment
Hide comment
@michaelisard

michaelisard Jul 27, 2016

Member

@martinwicke this probably needs more info to debug but I'm not sure what specifically to ask for.

Member

michaelisard commented Jul 27, 2016

@martinwicke this probably needs more info to debug but I'm not sure what specifically to ask for.

@martinwicke

This comment has been minimized.

Show comment
Hide comment
@martinwicke

martinwicke Jul 27, 2016

Member

How did you build it? With GPU support, I assume? Any other options, or just --config=cuda -c opt?

Member

martinwicke commented Jul 27, 2016

How did you build it? With GPU support, I assume? Any other options, or just --config=cuda -c opt?

@martinwicke martinwicke assigned zheng-xq and unassigned martinwicke Jul 27, 2016

@justdark

This comment has been minimized.

Show comment
Hide comment
@justdark

justdark Jul 28, 2016

I use bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer
to build tensorflow with GPU support.
it seems like problem of compiler.

gcc (GCC) 4.8.2

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Mon_Feb_16_22:59:02_CST_2015
Cuda compilation tools, release 7.0, V7.0.27

justdark commented Jul 28, 2016

I use bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer
to build tensorflow with GPU support.
it seems like problem of compiler.

gcc (GCC) 4.8.2

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Mon_Feb_16_22:59:02_CST_2015
Cuda compilation tools, release 7.0, V7.0.27
@wyli

This comment has been minimized.

Show comment
Hide comment
@wyli

wyli Aug 6, 2016

@justdark Hello, I had exactly the same error when accidentally change the gcc tool path in CROSSTOOL https://github.com/tensorflow/tensorflow/blob/v0.9.0/third_party/gpus/crosstool/CROSSTOOL#L49 to my own gcc. make sure clang/bin/crosstool_wrapper_driver_is_not_gcc and change the path in crosstool_wrapper_driver_is_not_gcc file if necessary-- it works for me (centos 6.7, tensorflow v0.9.0)

wyli commented Aug 6, 2016

@justdark Hello, I had exactly the same error when accidentally change the gcc tool path in CROSSTOOL https://github.com/tensorflow/tensorflow/blob/v0.9.0/third_party/gpus/crosstool/CROSSTOOL#L49 to my own gcc. make sure clang/bin/crosstool_wrapper_driver_is_not_gcc and change the path in crosstool_wrapper_driver_is_not_gcc file if necessary-- it works for me (centos 6.7, tensorflow v0.9.0)

@justdark

This comment has been minimized.

Show comment
Hide comment
@justdark

justdark Aug 8, 2016

@wyli thanks a lot.

justdark commented Aug 8, 2016

@wyli thanks a lot.

@gunan

This comment has been minimized.

Show comment
Hide comment
@gunan

gunan Dec 21, 2016

Member

Looks like the issue was resolved.
Closing the issue.

Member

gunan commented Dec 21, 2016

Looks like the issue was resolved.
Closing the issue.

@gunan gunan closed this Dec 21, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment