facebookarchive / caffe2

Caffe2 is a lightweight, modular, and scalable deep learning framework.
https://caffe2.ai
Apache License 2.0
8.42k stars 1.94k forks source link

fatal error: math_functions.hpp: no such file #2494

Closed muninnan closed 6 years ago

muninnan commented 6 years ago

If this is a build issue, please fill out the template below.

System information

-- Caffe2: CUDA detected: 9.1 -- Found cuDNN: v7.1.2 (include: /usr/local/cuda/include, library: /usr/local/cuda/lib64/libcudnn.so) -- Automatic GPU detection returned 5.2. -- Added CUDA NVCC flags for: sm_52 -- Could NOT find NCCL (missing: NCCL_INCLUDE_DIRS NCCL_LIBRARIES) -- Could NOT find CUB (missing: CUB_INCLUDE_DIR) -- Could NOT find Gloo (missing: Gloo_INCLUDE_DIR Gloo_LIBRARY) -- MPI include path: /usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include/usr/lib/openmpi/include/usr/lib/openmpi/include/openmpi -- MPI libraries: /usr/lib/openmpi/lib/libmpi_cxx.so/usr/lib/openmpi/lib/libmpi.so -- CUDA detected: 9.1 -- Found libcuda: /usr/lib/x86_64-linux-gnu/libcuda.so -- Found libnvrtc: /usr/local/cuda/lib64/libnvrtc.so CMake Warning at cmake/Dependencies.cmake:467 (message): mobile opengl is only used in android or ios builds. Call Stack (most recent call first): CMakeLists.txt:103 (include)

CMake Warning at cmake/Dependencies.cmake:543 (message): Metal is only used in ios builds. Call Stack (most recent call first): CMakeLists.txt:103 (include)

-- GCC 5.4.0: Adding gcc and gcc_s libs to link line -- Include NCCL operators -- Including image processing operators -- Excluding video processing operators due to no opencv -- Excluding mkl operators as we are not using mkl -- Include Observer library -- Using lib/python2.7/dist-packages as python relative installation path -- Automatically generating missing init.py files. -- -- **** Summary **** -- General: -- CMake version : 3.5.1 -- CMake command : /usr/bin/cmake -- Git version : v0.8.1-1499-g409e96d-dirty -- System : Linux -- C++ compiler : /usr/bin/c++ -- C++ compiler version : 5.4.0 -- BLAS : Eigen -- CXX flags : -fvisibility-inlines-hidden -DONNX_NAMESPACE=onnx_c2 -O2 -fPIC -Wno-narrowing -Wno-invalid-partial-specialization -- Build type : Release -- Compile definitions : -- -- BUILD_BINARY : ON -- BUILD_CUSTOM_PROTOBUF : OFF -- Protobuf compiler : /usr/bin/protoc -- Protobuf includes : /usr/include -- Protobuf libraries : optimized;/usr/lib/x86_64-linux-gnu/libprotobuf.so;debug;/usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread -- BUILD_DOCS : OFF -- BUILD_PYTHON : ON -- Python version : 2.7.12 -- Python includes : /usr/include/python2.7 -- BUILD_SHARED_LIBS : ON -- BUILD_TEST : ON -- USE_ATEN : OFF -- USE_ASAN : OFF -- USE_CUDA : ON -- CUDA version : 9.1 -- CuDNN version : 7.1.2 -- CUDA root directory : /usr/local/cuda -- CUDA library : /usr/lib/x86_64-linux-gnu/libcuda.so -- CUDA NVRTC library : /usr/local/cuda/lib64/libnvrtc.so -- CUDA runtime library: /usr/local/cuda/lib64/libcudart.so -- CUDA include path : /usr/local/cuda/include -- NVCC executable : /usr/local/cuda/bin/nvcc -- CUDA host compiler : /usr/bin/cc -- USE_EIGEN_FOR_BLAS : 1 -- USE_FFMPEG : OFF -- USE_GFLAGS : ON -- USE_GLOG : ON -- USE_GLOO : ON -- USE_LEVELDB : ON -- LevelDB version : 1.18 -- Snappy version : 1.1.3 -- USE_LITE_PROTO : OFF -- USE_LMDB : ON -- LMDB version : 0.9.17 -- USE_METAL : OFF -- USE_MKL : -- USE_MOBILE_OPENGL : OFF -- USE_MPI : ON -- USE_NCCL : ON -- USE_NERVANA_GPU : OFF -- USE_NNPACK : ON -- USE_OBSERVERS : ON -- USE_OPENCV : ON -- OpenCV version : 2.4.9.1 -- USE_OPENMP : OFF -- USE_PROF : OFF -- USE_REDIS : OFF -- USE_ROCKSDB : OFF -- USE_ZMQ : OFF -- Configuring done -- Generating done -- Build files have been written to: /export/GitHub/caffe2/build

******** Summary ********
<please paste summary output here>

[ 62%] Building NVCC (Device) object caffe2/CMakeFiles/caffe2_gpu.dir/operators/caffe2_gpu_generated_summarize_op.cu.o /export/GitHub/caffe2/caffe2/operators/summarize_op.cu(37): warning: function "caffe2::::summary_stats_unary_op::operator() [with T=float]" was declared but never referenced

/export/GitHub/caffe2/caffe2/operators/summarize_op.cu(57): warning: function "caffe2::::summary_stats_binary_op::operator() [with T=float]" was declared but never referenced

[ 63%] Building NVCC (Device) object caffe2/CMakeFiles/caffe2_gpu.dir/operators/caffe2_gpu_generated_arg_ops.cu.o In file included from /export/GitHub/caffe2/caffe2/operators/arg_ops_eigen.h:7:0, from /export/GitHub/caffe2/caffe2/operators/arg_ops.cu:12: /usr/local/include/eigen3/Eigen/Core:42:34: fatal error: math_functions.hpp: 没有那个文件或目录 compilation terminated. CMake Error at caffe2_gpu_generated_arg_ops.cu.o.Release.cmake:215 (message): Error generating /export/GitHub/caffe2/build/caffe2/CMakeFiles/caffe2_gpu.dir/operators/./caffe2_gpu_generated_arg_ops.cu.o

caffe2/CMakeFiles/caffe2_gpu.dir/build.make:245: recipe for target 'caffe2/CMakeFiles/caffe2_gpu.dir/operators/caffe2_gpu_generated_arg_ops.cu.o' failed make[3]: [caffe2/CMakeFiles/caffe2_gpu.dir/operators/caffe2_gpu_generated_arg_ops.cu.o] Error 1 make[3]: Leaving directory '/export/GitHub/caffe2/build' CMakeFiles/Makefile2:2466: recipe for target 'caffe2/CMakeFiles/caffe2_gpu.dir/all' failed make[2]: [caffe2/CMakeFiles/caffe2_gpu.dir/all] Error 2 make[2]: Leaving directory '/export/GitHub/caffe2/build' Makefile:138: recipe for target 'all' failed make[1]: [all] Error 2 make[1]: Leaving directory '/export/GitHub/caffe2/build' Makefile:4: recipe for target 'all' failed make: [all] Error 2

well, actually there were other problems such as pybind11 not found and Eigen3 version not compatible. And I MANUALLY compiled and installed these two libraries and, everything went smoothly until I met the error above. Is there any thing wrong with my installation of Eigen3 ? The error shows in Chinese, it means the file is not found.

pjh5 commented 6 years ago

This is a duplicate of #2485 . Can you try the change in the bitbucket link on that thread?