Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

error: this ‘else’ clause does not guard. #202

Closed
PikachuHy opened this issue May 7, 2018 · 12 comments
Closed

error: this ‘else’ clause does not guard. #202

PikachuHy opened this issue May 7, 2018 · 12 comments

Comments

@PikachuHy
Copy link

more info

/home/pikachu/swcontest/intel_caffe/src/caffe/layers/mkldnn_inner_product_layer.cpp: In member function ‘void caffe::MKLDNNInnerProductLayer<Dtype>::InitInnerProductBwd(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<bool>&, const std::vector<caffe::Blob<Dtype>*>&)’:
/home/pikachu/swcontest/intel_caffe/src/caffe/layers/mkldnn_inner_product_layer.cpp:361:2: error: this ‘else’ clause does not guard... [-Werror=misleading-indentation]
  else
  ^~~~
/home/pikachu/swcontest/intel_caffe/src/caffe/layers/mkldnn_inner_product_layer.cpp:365:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘else’
     ipBwdData_desc.reset(new inner_product_backward_data::desc(init_bottom_md, init_weights_md, init_top_md));
     ^~~~~~~~~~~~~~
[ 40%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/mkldnn_relu_layer.cpp.o
[ 40%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/mkldnn_split_layer.cpp.o
cc1plus: all warnings being treated as errors
src/caffe/CMakeFiles/caffe.dir/build.make:1742: recipe for target 'src/caffe/CMakeFiles/caffe.dir/layers/mkldnn_inner_product_layer.cpp.o' failed
make[2]: *** [src/caffe/CMakeFiles/caffe.dir/layers/mkldnn_inner_product_layer.cpp.o] Error 1
make[2]: *** 正在等待未完成的任务....
CMakeFiles/Makefile2:335: recipe for target 'src/caffe/CMakeFiles/caffe.dir/all' failed
make[1]: *** [src/caffe/CMakeFiles/caffe.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
@PikachuHy PikachuHy mentioned this issue May 8, 2018
@hshen14
Copy link
Contributor

hshen14 commented May 15, 2018

May I know which compiler did you use? I cannot reproduce the issue although the patch is fine.

@hufangjian
Copy link

@reazulhoque
Copy link

I am getting the same error with gcc 7.2.1

@peteruhrig
Copy link

Same error with gcc 7.3.0 on Ubuntu 18.04

@hshen14
Copy link
Contributor

hshen14 commented Jun 12, 2018

Fixed it internally and will push to Github soon.

@cgaspart
Copy link

@hshen14 Soon ?

@hshen14
Copy link
Contributor

hshen14 commented Jul 3, 2018

Yes.

@juliebuquet
Copy link

juliebuquet commented Jul 20, 2018

@hshen14 Hello I have the same problem. Any News ?

@ghost
Copy link

ghost commented Sep 7, 2018

How soon is soon? Caffe doesn't compile on Ubuntu 18.04 unless I turn the warning off ;-)

@psyhtest
Copy link

Hi everyone,

You can now build Intel-Caffe from master with GCC using the following simple instructions from Intel's ReQuEST artifact:

Install Collective Knowledge

$ git clone http://github.com/ctuning/ck
$ export PATH=$PWD/ck/bin:$PATH
$ export PYTHONPATH=$PWD/ck:$PYTHONPATH

or simply:

$ sudo pip install ck

Install Intel Caffe from master

$ ck pull repo:ck-request-asplos18-caffe-intel
$ ck install package:lib-caffe-intel-master-cpu

Tested with 3 GCC versions:

$ ck show env --tags=lib,intel,caffe
Env UID:         Target OS: Bits: Name:                        Version:       Tags:

2d58784a07aa1192   linux-64    64 BVLC Caffe framework (intel) master-a3d5b02 64bits,bvlc,caffe,compiled-by-gcc,compiled-by-gcc-8.1.0,host-os-linux-64,intel,lib,target-os-linux-64,v0,v0.0,vcpu,vmaster
18bd3430d346fabe   linux-64    64 BVLC Caffe framework (intel) master-a3d5b02 64bits,bvlc,caffe,compiled-by-gcc,compiled-by-gcc-6.4.0,host-os-linux-64,intel,lib,target-os-linux-64,v0,v0.0,vcpu,vmaster
5b9202a1f26b4107   linux-64    64 BVLC Caffe framework (intel) master-a3d5b02 64bits,bvlc,caffe,compiled-by-gcc,compiled-by-gcc-7.3.0,host-os-linux-64,intel,lib,target-os-linux-64,v0,v0.0,vcpu,vmaster

Hope this helps! Shout if you have any problems.

@Albert1990
Copy link

Albert1990 commented Nov 11, 2018

Hey Guys regarding this issue it has been fixed by turning the flag USE_MKL to be off while generating the files using cmake like the following:
first i installed python cafe:
pip3 install ck
then i reconfigured cmake like the following:
cd <to your openpose dir>
mkdir build
cd build
cmake .. -DGPU_MODE="CPU_ONLY" -DDOWNLOAD_BODY_COCO_MODEL=ON -DDOWNLOAD_BODY_MPI_MODEL=ON -DPROFILER_ENABLED=ON -DWITH_OPENCV_WITH_OPENCL=ON -DWITH_OPENCV_WITH_OPENCL=ON -DUSE_MKL=OFF

@ftian1
Copy link
Contributor

ftian1 commented Nov 28, 2018

@Albert1990 your proposal is not related with the issue reported by poster.

@ALL, this in fact has been solved in 1.1.2 release. I would close this issue

@ftian1 ftian1 closed this as completed Nov 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants