dividiti / ck-caffe

Collective Knowledge workflow for Caffe to automate installation across diverse platforms and to collaboratively evaluate and optimize Caffe-based workloads across diverse hardware, software and data sets (compilers, libraries, tools, models, inputs):
http://cKnowledge.org
BSD 3-Clause "New" or "Revised" License
193 stars 40 forks source link

"ck install package:lib-caffe-intel-master-cpu" fails with ICC 18.0.1 #134

Closed psyhtest closed 6 years ago

psyhtest commented 6 years ago
$ ck detect soft:compiler.icc
$ ck install package:lib-caffe-intel-master-cpu
...
[  5%] Performing install step for 'MKLDNN_Build'
[  5%] Linking CXX static library libgmock.a
Error running link command: No such file or directory
src/gmock/CMakeFiles/gmock.dir/build.make:120: recipe for target 'src/gmock/libgmock.a' failed
make[2]: *** [src/gmock/libgmock.a] Error 2
CMakeFiles/Makefile2:188: recipe for target 'src/gmock/CMakeFiles/gmock.dir/all' failed
make[1]: *** [src/gmock/CMakeFiles/gmock.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  5%] Linking CXX static library libgtest.a
Error running link command: No such file or directory
src/gmock/gtest/CMakeFiles/gtest.dir/build.make:94: recipe for target 'src/gmock/gtest/libgtest.a' failed
make[2]: *** [src/gmock/gtest/libgtest.a] Error 2
CMakeFiles/Makefile2:243: recipe for target 'src/gmock/gtest/CMakeFiles/gtest.dir/all' failed
make[1]: *** [src/gmock/gtest/CMakeFiles/gtest.dir/all] Error 2
[  7%] Linking CXX static library ../../lib/libproto.a
Error running link command: No such file or directory
src/caffe/CMakeFiles/proto.dir/build.make:106: recipe for target 'lib/libproto.a' failed
make[2]: *** [lib/libproto.a] Error 2
CMakeFiles/Makefile2:302: recipe for target 'src/caffe/CMakeFiles/proto.dir/all' failed
make[1]: *** [src/caffe/CMakeFiles/proto.dir/all] Error 2
psyhtest commented 6 years ago

Unfortunately, it's not possible now even to get to this stage (with any compiler!):

$ ck install package:lib-caffe-intel-master-cpu
...
-- Build files have been written to: /home/anton/CK_TOOLS/lib-caffe-intel-master-cpu-master-gcc-6.3.0-linux-64/obj

Building package ...
Scanning dependencies of target gmock
[  0%] Running C++/Python protocol buffer compiler on /home/anton/CK_TOOLS/lib-caffe-intel-master-cpu-master-gcc-6.3.0-linux-64/src/src/caffe/proto/caffe.proto
Scanning dependencies of target gtest
[  0%] Performing update step for 'MKLDNN_Build'
[  1%] Building CXX object src/gmock/CMakeFiles/gmock.dir/__/gtest/src/gtest-all.cpp.o
[  2%] Building CXX object src/gmock/gtest/CMakeFiles/gtest.dir/src/gtest-all.cpp.o
[  2%] Building CXX object src/gmock/CMakeFiles/gmock.dir/src/gmock-all.cpp.o
fatal: bad object ae00102be506ed0fe2099c6557df2aa88ad57ec1
Scanning dependencies of target proto
[  2%] Building CXX object src/caffe/CMakeFiles/proto.dir/__/__/include/caffe/proto/caffe.pb.cc.o
fatal: reference is not a tree: ae00102be506ed0fe2099c6557df2aa88ad57ec1
CMake Error at /home/anton/CK_TOOLS/lib-caffe-intel-master-cpu-master-gcc-6.3.0-linux-64/obj/MKLDNN_Build-prefix/tmp/MKLDNN_Build-gitupdate.cmake:147 (message):
  Failed to checkout tag: 'ae00102be506ed0fe2099c6557df2aa88ad57ec1'

CMakeFiles/MKLDNN_Build.dir/build.make:94: recipe for target 'MKLDNN_Build-prefix/src/MKLDNN_Build-stamp/MKLDNN_Build-update' failed
make[2]: *** [MKLDNN_Build-prefix/src/MKLDNN_Build-stamp/MKLDNN_Build-update] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/MKLDNN_Build.dir/all' failed
make[1]: *** [CMakeFiles/MKLDNN_Build.dir/all] Error 2

The culprit is the src/mkldnn.commit file which references commit ae00102be506ed0fe2099c6557df2aa88ad57ec1:

anton@velociti:~/CK_TOOLS/lib-caffe-intel-master-cpu-master-gcc-6.3.0-linux-64$ grep ae00102be506ed0fe2099c6557df2aa88ad57ec1 * -R
obj/MKLDNN_Build-prefix/tmp/MKLDNN_Build-gitupdate.cmake:if("ae00102be506ed0fe2099c6557df2aa88ad57ec1" STREQUAL "")
obj/MKLDNN_Build-prefix/tmp/MKLDNN_Build-gitupdate.cmake:  COMMAND "/usr/bin/git" show-ref ae00102be506ed0fe2099c6557df2aa88ad57ec1
obj/MKLDNN_Build-prefix/tmp/MKLDNN_Build-gitupdate.cmake:if("${show_ref_output}" MATCHES "refs/remotes/ae00102be506ed0fe2099c6557df2aa88ad57ec1")
obj/MKLDNN_Build-prefix/tmp/MKLDNN_Build-gitupdate.cmake:  string(REGEX MATCH "^([^/]+)/(.+)$" _unused "ae00102be506ed0fe2099c6557df2aa88ad57ec1")
obj/MKLDNN_Build-prefix/tmp/MKLDNN_Build-gitupdate.cmake:  set(git_tag "ae00102be506ed0fe2099c6557df2aa88ad57ec1")
obj/MKLDNN_Build-prefix/tmp/MKLDNN_Build-gitupdate.cmake:  COMMAND "/usr/bin/git" rev-list --max-count=1 ae00102be506ed0fe2099c6557df2aa88ad57ec1
obj/MKLDNN_Build-prefix/tmp/MKLDNN_Build-gitupdate.cmake:      COMMAND "/usr/bin/git" checkout ae00102be506ed0fe2099c6557df2aa88ad57ec1
obj/MKLDNN_Build-prefix/tmp/MKLDNN_Build-gitupdate.cmake:      message(FATAL_ERROR "Failed to checkout tag: 'ae00102be506ed0fe2099c6557df2aa88ad57ec1'")
obj/MKLDNN_Build-prefix/tmp/MKLDNN_Build-gitclone.cmake:if("ae00102be506ed0fe2099c6557df2aa88ad57ec1" STREQUAL "")
obj/MKLDNN_Build-prefix/tmp/MKLDNN_Build-gitclone.cmake:  COMMAND "/usr/bin/git" checkout ae00102be506ed0fe2099c6557df2aa88ad57ec1
obj/MKLDNN_Build-prefix/tmp/MKLDNN_Build-gitclone.cmake:  message(FATAL_ERROR "Failed to checkout tag: 'ae00102be506ed0fe2099c6557df2aa88ad57ec1'")
src/mkldnn.commit:ae00102be506ed0fe2099c6557df2aa88ad57ec1

As a temporary workaround, try the ReQuEST artifact branch:

$ ck install package:lib-caffe-intel-request-cpu
ens-lg4 commented 6 years ago

I have addressed this issue in the following commits: https://github.com/ctuning/ck-env/commit/7ae2479b3947d5915fa580b2215b7b0c50fda981 and https://github.com/dividiti/ck-caffe/commit/62ca14cc72b7e6854d07b0a12cfaae3484036b5f

Could you please pull from both repositories and try again?

psyhtest commented 6 years ago

Cool, it works with a mix of dependencies (natively installed, compiled with GCC) and Boost compiled via ICC as well.

psyhtest commented 6 years ago

Building from the ReQuEST branch also works:

$ ck install package:lib-caffe-intel-request-cpu

Many thanks!

psyhtest commented 6 years ago

Very weird. On my laptop where checking out used to fail (with GCC-6.3), it now works (with GCC-7.2):

Building package ...
[  0%] Running C++/Python protocol buffer compiler on /home/anton/CK_TOOLS/lib-caffe-intel-master-cpu-master-gcc-7.2.0-linux-64/src/src/caffe/proto/caffe.proto
Scanning dependencies of target gtest
Scanning dependencies of target MKLDNN_Build
Scanning dependencies of target gmock
[  0%] Creating directories for 'MKLDNN_Build'
[  1%] Building CXX object src/gmock/gtest/CMakeFiles/gtest.dir/src/gtest-all.cpp.o
[  2%] Building CXX object src/gmock/CMakeFiles/gmock.dir/__/gtest/src/gtest-all.cpp.o
[  2%] Building CXX object src/gmock/CMakeFiles/gmock.dir/src/gmock-all.cpp.o
[  4%] Performing download step (git clone) for 'MKLDNN_Build'
Cloning into 'src'...
Scanning dependencies of target proto
[  4%] Building CXX object src/caffe/CMakeFiles/proto.dir/__/__/include/caffe/proto/caffe.pb.cc.o
[  4%] Linking CXX static library libgmock.a
[  4%] Built target gmock
[  4%] Linking CXX static library libgtest.a
[  4%] Built target gtest
Note: checking out 'ae00102be506ed0fe2099c6557df2aa88ad57ec1'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at ae00102... cpu: conv 1x1: bwd_w: fix assertion
[  4%] No patch step for 'MKLDNN_Build'