Build and test SyntaxNet

Today, I tried to build and test SyntaxNet by installing all the dependencies. Testing of SyntaxNet takes one-two hours by using bazel. Bazel should complete reporting all tests passed. Here is the given below command.

bazel test syntaxnet/... util/utf8/...

But when I run the above command it gave an error.

ERROR: /home/ambu/.cache/bazel/_bazel_root/e2272cbf3f6b78513eb1686f9629a1cd/external/tf/tensorflow/core/kernels/BUILD:934:1: C++ compilation of rule '@tf//tensorflow/core/kernels:argmax_op' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wl,-z,-relro,-z,now -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 ... (remaining 91 argument(s) skipped): Process exited with status 4.
gcc: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.

The above error came after one hour when I run the above command. My laptop hanged and temperature of my laptop increases upto 59.0 degrees C. Then, I run the same above command, again and again, it gave the same error. Then I discuss the above error with Mandeep and he gave me a small hint and told that above same error came when he complied FreeCAD from source code. Some initial search lead to several threads that said it’s because GCC doesn’t have enough memory, so I can try following some of their advice to see if it’ll help (e.g.
When I searched it on the internet and found that how to fix this error. By adding this flag --local_resources 2048,.5,1.0 in the above command we can reducing a number of parallel builds by passing which would instruct bazel to spawn no more than one compiler process at the time. Then after adding the --local_resources 2048,.5,1.0 the above command looks like this
sudo bazel test --local_resources 2048,.5,1.0 syntaxnet/... util/utf8/... . After the run, this command SyntaxNet executed 12 out of 12 tests and 10 tests pass and 2 tests fails.
Here is the output of the above command.

INFO: Elapsed time: 2104.407s, Critical Path: 2085.13s
//syntaxnet:arc_standard_transitions_test                                PASSED in 0.0s
//syntaxnet:beam_reader_ops_test                                         PASSED in 20.0s
//syntaxnet:graph_builder_test                                           PASSED in 15.4s
//syntaxnet:lexicon_builder_test                                         PASSED in 6.4s
//syntaxnet:parser_features_test                                         PASSED in 0.1s
//syntaxnet:sentence_features_test                                       PASSED in 0.1s
//syntaxnet:shared_store_test                                            PASSED in 0.6s
//syntaxnet:tagger_transitions_test                                      PASSED in 0.5s
//syntaxnet:text_formats_test                                            PASSED in 1.8s
//util/utf8:unicodetext_unittest                                         PASSED in 0.1s
//syntaxnet:parser_trainer_test                                          FAILED in 0.1s
//syntaxnet:reader_ops_test                                              FAILED in 5.1s

Executed 12 out of 12 tests: 10 tests pass and 2 fail locally.

During whole the process, my laptop temperature increased up to 70.0 degrees C. However many errors came but at the end of the, I fixed all the errors.


FollowFollow on FacebookFollow on Google+Email this to someone

Leave a Reply

Your email address will not be published. Required fields are marked *