You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bazel GPU build error with fatal error: external/nccl_archive/src/nccl.h: No such file or directory #327
cd serving && bazel build -c opt --config=cuda tensorflow_serving/...
ERROR: /root/.cache/bazel/_bazel_root/f8d1071c69ea316497c31e40fe0160
8c/external/org_tensorflow/tensorflow/contrib/nccl/BUILD:23:1: C++ c
ompilation of rule '@org_tensorflow//tensorflow/contrib/nccl:python/
ops/_nccl_ops.so' failed: crosstool_wrapper_driver_is_not_gcc failed
: error executing command external/local_config_cuda/crosstool/clang
/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTI
FY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-paramete
r ... (remaining 76 argument(s) skipped): com.google.devtools.build.
lib.shell.BadExitStatusException: Process exited with status 1.
In file included from external/org_tensorflow/tensorflow/contrib/ncc
l/kernels/nccl_manager.cc:15:0:
external/org_tensorflow/tensorflow/contrib/nccl/kernels/nccl_manager
.h:23:44: fatal error: external/nccl_archive/src/nccl.h: No such fil
e or directory
#include "external/nccl_archive/src/nccl.h"
^
compilation terminated.
INFO: Elapsed time: 147.378s, Critical Path: 107.11s
I'm able to find nccl.h, but it can't be found during bazel build. Any suggestions? Thanks in advanced.
ERROR: /root/.cache/bazel/_bazel_root/f8d1071c69ea316497c31e40fe01608c/external/org_tensorflow/tensorflow/contrib/nccl/BUILD:23:1: C++ compilation of rule '@org_tensorflow//tensorflow/contrib/nccl:python/ops/_nccl_ops.so' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter ... (remaining 77 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
In file included from external/org_tensorflow/tensorflow/contrib/nccl/kernels/nccl_manager.cc:15:0:
external/org_tensorflow/tensorflow/contrib/nccl/kernels/nccl_manager.h:23:44: fatal error: external/nccl_archive/src/nccl.h: No such file or directory
compilation terminated.
I verified that nccl_Archive is fetched and unzipped correctly under .cache dir and from what I see
-iquote external/nccl_archive should do the work to include all stuff needed.
@skonto removing prefix /external/nccl_archive in files nccl_ops.cc and nccl_manager.h which in folder tensorflow/tensorflow/contrib/nccl/kernels, fix the issue
Reacted by Jason Lee Ertle, Stavros Kontopoulos, Kunal Lad, Xingyuan Bu, Yanqing Jing and ALevitskyy
Reacted by emamurho, Jason Lee Ertle, tomodachi21, Dominic Bou-Samra, Jay Yang, suryafyi, Fedor Tokarev, Ales Tamchyna, Fabrizio Milo, Xie Chen-Wei and 17 more
Reacted by Jason Lee Ertle, penetrode, Dominic Bou-Samra, mpmX, suryafyi, Mohit Rathore, Simon, abcdvzz, intenseG, kobofare and 1 more
@cjhkeep
I dont have any problem with nccl.h 1.3 or 2.xx at all. I don't need a guide
However if you install "NCCL2" using the ".deb" version your nccl.h will be far away from where tensorflow expect to find it! That's why a suggested installing from the tar file here .
I was trying to diagnose the problem of our colleague above, asking him what the process he had installed nccl on his machine.
Wouldn't it be the right way to tensorflow to just look at the right directories? /usr/include/ is the place for header files in linux, I don't get why it looks somewhere else..?
NVIDIA in times to times change the locations of its packages (because they think its funny) :)
If you investigate a little, depending on your cuda version some files go to some places others go to another places... I believe NVidia doesn't have a stable ideia where to put this things exacly and tensorflow cannot enter on their hell.
Reacted by pseudofunizer
Reacted by Henrique Zambon, Stavros Kontopoulos and pseudofunizer
@gautamvasudevan This is still a bug when trying to do macOS GPU builds. Since your Docker example doesn't work on Mac, I think this issue should still be open.
Hi @praeclarum I am sorry to see your question only now, sadlly I am not using Tensorflow anymore, but I believe that since the Docker Tensorflow rely on the abstract install from Ubuntu you can change it for the exact problem you having. Can you post exact what problem are you getting on your MAC ?
Another question... If you are using Docker on your Mac to build TFServing... how do you make the GPU Passthrow to Docker Engine ? Since the X11 forwarding does not exist on MacOS (instead apple uses Quartz). So your GPU will never be recognized inside docker because Apple does not allow it formally.
I believe your only strategy is to translate the commands from Docker file into commands in your Homebrew.
We don't have any official support for macOS and nccl builds currently, though feel free to file a new issue specifically for macOS, we welcome any community support here!
seems that now there's a --config=nonccl option you can add to a bazel command, e.g. bazel build --config=opt --config=cuda --config=nonccl //tensorflow/tools/pip_package:build_pip_package (dunno if this will work entirely, but it seems to get me past this error ...)
Activity
tvkpz commentedon Feb 19, 2017
Same error here.
cuda 8.0
cudnn 5.1
bazel 4.2
ERROR: /root/.cache/bazel/_bazel_root/f8d1071c69ea316497c31e40fe01608c/external/org_tensorflow/tensorflow/contrib/nccl/BUILD:23:1: C++ compilation of rule '@org_tensorflow//tensorflow/contrib/nccl:python/ops/_nccl_ops.so' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter ... (remaining 77 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
In file included from external/org_tensorflow/tensorflow/contrib/nccl/kernels/nccl_manager.cc:15:0:
external/org_tensorflow/tensorflow/contrib/nccl/kernels/nccl_manager.h:23:44: fatal error: external/nccl_archive/src/nccl.h: No such file or directory
compilation terminated.
Any solutions?
cheyang commentedon Feb 23, 2017
@ kirilg,can you help take a quick look at this issue? Thank you.
kinhunt commentedon Feb 24, 2017
same here

jlertle commentedon Feb 24, 2017
To get around it you can comment out the DEP for nccl in: tensorflow/tensorflow/contrib/BUILD
Line 42 iirc
cheyang commentedon Feb 25, 2017
Thanks, @jlertle
sskgit commentedon Feb 25, 2017
Thanks @jlertle.
cosastro commentedon Mar 24, 2017
which line in: tensorflow/tensorflow/contrib/BUILD is the DEP for nccl? i can't find it, thanks.
perdasilva commentedon Mar 24, 2017
65: "//tensorflow/contrib/nccl:nccl_py",
I believe...
jlertle commentedon Mar 24, 2017
It was moved into a Windows check but the referenced path is still having issues resolving during Serving build process on Ubuntu. Bazel stuff.
cosastro commentedon Mar 27, 2017
I tried a script provided by #318, it works fine
skonto commentedon Apr 10, 2017
If you comment it out examples fail, I managed to built it as well but... I get
ImportError: cannot import name ncclwith a minst example.Here is the task that fails:
I verified that nccl_Archive is fetched and unzipped correctly under .cache dir and from what I see
-iquote external/nccl_archive should do the work to include all stuff needed.
skonto commentedon Apr 11, 2017
I solved it by removing the prefix /external/nccl_archive.
Lukeisme commentedon Apr 14, 2017
@skonto removing prefix /external/nccl_archive in files nccl_ops.cc and
nccl_manager.h which in folder tensorflow/tensorflow/contrib/nccl/kernels, fix the issue
perdasilva commentedon Jun 2, 2017
git clone https://github.com/NVIDIA/nccl.git
cd nccl/
make CUDA_HOME=/usr/local/cuda
sudo make install
sudo mkdir -p /usr/local/include/external/nccl_archive/src
sudo ln -s /usr/local/include/nccl.h /usr/local/include/external/nccl_archive/src/nccl.h
16 remaining items
cyberwillis commentedon May 12, 2018
Tell me what version of Cuda do you have and what version of Nccl do you have and also any thing else I can replicate your environtment.
rickragv commentedon May 12, 2018
cudda 9, and latest nccl
cyberwillis commentedon May 12, 2018
How did you set up your nccl2 ?
cjhkeep commentedon May 14, 2018
@cyberwillis
nccl-install-guide
which is the install link,
https://blog.csdn.net/hanchan94/article/details/80265922
cyberwillis commentedon May 14, 2018
@cjhkeep
I dont have any problem with nccl.h 1.3 or 2.xx at all. I don't need a guide
However if you install "NCCL2" using the ".deb" version your nccl.h will be far away from where tensorflow expect to find it! That's why a suggested installing from the tar file here .
I was trying to diagnose the problem of our colleague above, asking him what the process he had installed nccl on his machine.
[UPDATED]
discordianfish commentedon May 31, 2018
Wouldn't it be the right way to tensorflow to just look at the right directories?
/usr/include/is the place for header files in linux, I don't get why it looks somewhere else..?cyberwillis commentedon May 31, 2018
NVIDIA in times to times change the locations of its packages (because they think its funny) :)
If you investigate a little, depending on your cuda version some files go to some places others go to another places... I believe NVidia doesn't have a stable ideia where to put this things exacly and tensorflow cannot enter on their hell.
gautamvasudevan commentedon Jun 29, 2018
Closing - please see the latest Docker examples for bringing up a build environment. The GPU build addresses the NCCL dependency.
praeclarum commentedon Sep 10, 2018
@gautamvasudevan This is still a bug when trying to do macOS GPU builds. Since your Docker example doesn't work on Mac, I think this issue should still be open.
cyberwillis commentedon Sep 10, 2018
Hi @praeclarum I am sorry to see your question only now, sadlly I am not using Tensorflow anymore, but I believe that since the Docker Tensorflow rely on the abstract install from Ubuntu you can change it for the exact problem you having. Can you post exact what problem are you getting on your MAC ?
Another question... If you are using Docker on your Mac to build TFServing... how do you make the GPU Passthrow to Docker Engine ? Since the X11 forwarding does not exist on MacOS (instead apple uses Quartz). So your GPU will never be recognized inside docker because Apple does not allow it formally.
I believe your only strategy is to translate the commands from Docker file into commands in your Homebrew.
cyberwillis commentedon Sep 10, 2018
In case you really want to try make the GPU available inside docker (macOS only) you can try use XQuartz take a look on this Gist https://gist.github.com/cschiewek/246a244ba23da8b9f0e7b11a68bf3285
gautamvasudevan commentedon Sep 10, 2018
We don't have any official support for macOS and nccl builds currently, though feel free to file a new issue specifically for macOS, we welcome any community support here!
gatoatigrado commentedon Dec 12, 2018
seems that now there's a
--config=nonccloption you can add to a bazel command, e.g.bazel build --config=opt --config=cuda --config=nonccl //tensorflow/tools/pip_package:build_pip_package(dunno if this will work entirely, but it seems to get me past this error ...)praeclarum commentedon Dec 13, 2018
@gatoatigrado thanks for the tip, that's exactly what I was looking for