linuxbrew在集群上安装了cmake,在/ usr / lib64中找不到lib

时间:2016-01-19 17:55:54

标签: cmake caffe atlas linuxbrew

我正在尝试在GGPU群集上构建caffe。我已经使用linuxbrew在我家的子文件夹中安装了很多依赖项。其中一个依赖项是cmake的更新版本(需要)。

当我启动命令

cmake ..

我得到了这个输出

-- Boost version: 1.59.0
-- Found the following Boost libraries:
--   system
--   thread
--   filesystem
-- Found gflags  (include: /home/cgvg/.linuxbrew/include, library: /home/cgvg/.linuxbrew/lib/libgflags.so)
-- Found glog    (include: /home/cgvg/.linuxbrew/include, library: /home/cgvg/.linuxbrew/lib/libglog.so)
-- Found PROTOBUF Compiler: /home/cgvg/.linuxbrew/bin/protoc
-- Found lmdb    (include: /home/cgvg/.linuxbrew/include, library: /home/cgvg/.linuxbrew/lib/liblmdb.a)
-- Found LevelDB (include: /home/cgvg/.linuxbrew/include, library: /home/cgvg/.linuxbrew/lib/libleveldb.so)
-- Found Snappy  (include: /home/cgvg/.linuxbrew/include, library: /home/cgvg/.linuxbrew/lib/libsnappy.so)
-- CUDA detected: 7.5
-- Automatic GPU detection failed. Building for all known architectures.
-- Added CUDA NVCC flags for: sm_20 sm_21 sm_30 sm_35 sm_50
-- OpenCV found (/home/cgvg/sottile/opencv/share/OpenCV)
CMake Error at /home/cgvg/.linuxbrew/Cellar/cmake/3.4.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find Atlas (missing: Atlas_LAPACK_LIBRARY)
Call Stack (most recent call first):
  /home/cgvg/.linuxbrew/Cellar/cmake/3.4.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  cmake/Modules/FindAtlas.cmake:42 (find_package_handle_standard_args)
  cmake/Dependencies.cmake:88 (find_package)
  CMakeLists.txt:38 (include)


-- Configuring incomplete, errors occurred!
See also "/home/cgvg/sottile/caffe/build/CMakeFiles/CMakeOutput.log".
See also "/home/cgvg/sottile/caffe/build/CMakeFiles/CMakeError.log".

似乎我无法正确链接ATLAS库。 缺少的库位于

之下
/usr/lib64/atlas-sse3

是否有可能存在限制,以至于我的linuxbrewed cmake无法链接到上层文件夹?

在错误消息中,它说:

cmake/Modules/FindAtlas.cmake:42

我尝试修改该文件,添加正确的路径:

set(Atlas_INCLUDE_SEARCH_PATHS
  /usr/include
  $ENV{Atlas_ROOT_DIR}
  $ENV{Atlas_ROOT_DIR}/include
)

set(Atlas_LIB_SEARCH_PATHS
  /usr/lib64/atlas
  /usr/lib64/atlas-sse3 
  $ENV{Atlas_ROOT_DIR}
  $ENV{Atlas_ROOT_DIR}/lib
)

什么也没发生。

我试图更改PATH和LD_LIBRARY_PATH:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/atlas-sse3
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/include/atlas-x86_64-base-sse3/

并没有发生任何事情。

我不是Linux老手,所以如果我错过了一些重要信息,我会道歉。任何建议都表示赞赏。

编辑: 这是/ usr / lib64 / atlas3-sse3的内容:

libatlas.a       libcblas.so.3.0    libf77blas.so.3.0  libptcblas.so.3
libatlas.so      libclapack.so      liblapack.a        libptcblas.so.3.0
libatlas.so.3    libclapack.so.3    liblapack.so       libptf77blas.a
libatlas.so.3.0  libclapack.so.3.0  liblapack.so.3     libptf77blas.so
libcblas.a       libf77blas.a       liblapack.so.3.0   libptf77blas.so.3
libcblas.so      libf77blas.so      libptcblas.a       libptf77blas.so.3.0
libcblas.so.3    libf77blas.so.3    libptcblas.so
libatlas.a       libcblas.so.3.0    libf77blas.so.3.0  libptcblas.so.3
libatlas.so      libclapack.so      liblapack.a        libptcblas.so.3.0
libatlas.so.3    libclapack.so.3    liblapack.so       libptf77blas.a
libatlas.so.3.0  libclapack.so.3.0  liblapack.so.3     libptf77blas.so
libcblas.a       libf77blas.a       liblapack.so.3.0   libptf77blas.so.3
libcblas.so      libf77blas.so      libptcblas.a       libptf77blas.so.3.0
libcblas.so.3    libf77blas.so.3    libptcblas.so

1 个答案:

答案 0 :(得分:0)

似乎lapack捆绑在地图集中,因此FindAtlas.cmake无法找到alapack_r,alapck或lapack_atlas。

编辑caffe_folder / cmake / Module / FindAtlas.cmake就足够了,查找Atlas_LAPACK_LIBRARY NAMES并将clapack添加到lib列表中。

它彻底解决了这个问题。