Error with tensorflow: scatter_nd_op_gpu.cu.o was not created

Multi tool use
Multi tool use


Error with tensorflow: scatter_nd_op_gpu.cu.o was not created



I have been trying to install Tensorflow from sources but I get this error:


Error limit reached.
100 errors detected in the compilation of "/tmp/tmpxft_000076fb_00000000-7_scatter_nd_op_gpu.cu.cpp1.ii".
Compilation terminated.
ERROR: /home/rosgori/Python/tengpu/tensorflow/tensorflow/core/kernels/BUILD:4149:1: output 'tensorflow/core/kernels/_objs/scatter_nd_op_gpu/tensorflow/core/kernels/scatter_nd_op_gpu.cu.o' was not created
ERROR: /home/rosgori/Python/tengpu/tensorflow/tensorflow/core/kernels/BUILD:4149:1: not all outputs were created or valid
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 667.700s, Critical Path: 71.44s
FAILED: Build did NOT complete successfully



Exact command to reproduce:


bazel build --verbose_failures -c opt --copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-msse4.1 --copt=-msse4.2 --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package



When I said master, I have not used r1.8 or r1.7.
Timestamp for master:


r1.8


r1.7


from datetime import datetime
datetime.utcnow()



I get: datetime.datetime(2018, 4, 16, 23, 30, 23, 844800)


datetime.datetime(2018, 4, 16, 23, 30, 23, 844800)



So my questions are:



What is the meaning of that error? Can it be fixed?



Edit



Sometimes I get this:


20 errors detected in the compilation of "/tmp/tmpxft_000016a4_00000000-7_gather_functor_gpu.cu.cpp1.ii".
ERROR: /home/rosgori/Python/tengpu/tensorflow/tensorflow/core/kernels/BUILD:1208:1: output 'tensorflow/core/kernels/_objs/gather_functor_gpu/tensorflow/core/kernels/gather_functor_gpu.cu.o' was not created
ERROR: /home/rosgori/Python/tengpu/tensorflow/tensorflow/core/kernels/BUILD:1208:1: not all outputs were created or valid
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 157.766s, Critical Path: 35.22s
FAILED: Build did NOT complete successfully




2 Answers
2



I got around these issues by -:



Installing gcc4.9 on my Ubuntu 16.04



As per https://www.tensorflow.org/install/install_sources binary build packages were built using gcc4 hence there are some incompatibility issues with gcc5+


sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 50
sudo apt-get install g++-4.9
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 50



And then when running configure give path of gcc as /usr/bin/gcc-4.9


/usr/bin/gcc-4.9



Editing /tensorflow/core/platform/macros.h


/tensorflow/core/platform/macros.h



See https://github.com/tensorflow/tensorflow/issues/19203



Replace:


#define TF_PREDICT_FALSE(x) (__builtin_expect(x, 0))
#define TF_PREDICT_TRUE(x) (__builtin_expect(!!(x), 1))



with


#define TF_PREDICT_FALSE(x) (x)
#define TF_PREDICT_TRUE(x) (x)





I partially followed your advice (I didn't install gcc-4.9) and I successfully built the .whl file. Should I mark your answer as the correct answer?
– David
May 21 at 21:20





You can if the answer helped you, but if you don't want to then that's cool too.
– randomSampling
May 27 at 11:02



add: --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" in bazel build commend


--cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0"



e.g


bazel build --config=opt --config=cuda --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" //tensorflow/tools/pip_package:build_pip_package





Welcome to Stack Overflow! Please don't answer just with source code. Try to provide a nice description about how your solution works. See: How do I write a good answer?. Thanks
– sɐunıɔןɐqɐp
Jul 3 at 6:42






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

jS4e677YOjQ4krDhfJA1yNnEbt619gdTvHX,rzs0B3kA6Z3IN2zkRiU 5,R,zZ,iqGGnKs sTcc40,Eh1jpvl,tD,ktENOgyK7wia
7l V,HKDi3ys,6kLHNOlc0DcDdaZhmFMv2ADpOOJphCl B,jvfUY,F,WMOl702Dsa 3ifXZMndy00H,9GC uB 3WFC,DiL34eqtfXmNpz pzK

Popular posts from this blog

PHP contact form sending but not receiving emails

Do graphics cards have individual ID by which single devices can be distinguished?

Create weekly swift ios local notifications