Debug version build failed
Created by: czhu15
The debug version always failed with below error.
/home/bobzhu/code/paddle/Paddle/paddle/fluid/operators/math/blas_impl.h:134: undefined reference to `paddle::platform::dynload::mkl_scsrmm'
../fused/libfused_embedding_seq_pool_op.a(fused_embedding_seq_pool_op.cc.o): In function `void paddle::operators::math::CBlas<double>::CSRMM<char const*, int const*, int const*, int const*, double const*, char const*, double const*, int const*, int const*, int const*, double const*, int const*, double const*, double*, int const*>(char const*, int const*, int const*, int const*, double const*, char const*, double const*, int const*, int const*, int const*, double const*, int const*, double const*, double*, int const*)':
/home/bobzhu/code/paddle/Paddle/paddle/fluid/operators/math/blas_impl.h:245: **undefined reference to `paddle::platform::dynload::mkl_dcsrmm'**
collect2: error: ld returned 1 exit status
paddle/fluid/operators/benchmark/CMakeFiles/op_tester.dir/build.make:576: recipe for target 'paddle/fluid/operators/benchmark/op_tester' failed
The cmake command line for debug version is like below. I highlighted the debug related flags.
cmake ..**-DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_C_FLAGS_DEBUG="-g -O0" -DCMAKE_CXX_FLAGS_DEBUG="-g -O0"** -DWITH_TESTING=ON -WITH_FLUID_ONLY=ON -DWITH_GPU=OFF -DWITH_MKL=ON -DWITH_INFERENCE_API_TEST=ON -DON_INFER=ON -DCMAKE_INSTALL_PREFIX=./tmp
The release version works correctly.
My build machine is based on Ubuntu16.04