Segmentation fault after compiling from source in Linux
MatthewZalesak opened this issue · 2 comments
I have a Linux system that does not have a GPU so I tried compiling AQ from source (Fedora 27 64 bit if it helps). The only instruction provided is "see this instruction" which is a link to a website that compiles a C++ program with Tensorflow.
This is my best guess on how to use those instructions to build AQ (after some trial and error):
cd /opt
git clone --recursive https://github.com/tensorflow/tensorflow
git clone https://github.com/ymgaq/AQ
ln -s /opt/AQ /opt/tensorflow/tensorflow/AQ
cd /opt/tensorflow
./config
cd /opt/tensorflow/tensorflow/AQ/src
bazel build :AQ --config=monolithic
cp /opt/tensorflow/bazel-bin/tensorflow/AQ/src/AQ /opt/AQ/AQ
cp /opt/AQ/prob/* /opt/AQ/
Next, for the sake of testing I modify aq_config.txt to say "- self match =on". When I run the command ./AQ
I get a segmentation fault.
configuration loaded.
2018-01-27 20:36:36.306768: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX
Segmentation fault (core dumped)
I am not sure how to resolve this issue since the bazel build
step finished without error. Perhaps someone can see a problem with the way I compiled it?
I suspect that the problem is that I am missing a step somewhere but I am not sure since there is no list of steps for me to compare with. It could be a separate issue but I think it would be very useful to have a precise set of steps for compiling and setting up AQ so that people unfamiliar with the Tensorflow can figure out how to compile it.
Thanks in advance, I look forward to trying out AQ.
I have not actually built without a GPU on Linux, but your procedure looks perfect.
Did you add #define CPU_ONLY
in search.h? If CPU_ONLY
is not defined, AQ will try to get GPU devices and may cause a segmentation fault.
I missed that option. I uncommented the line and now the compiling works fine. Thank you very much!