Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
module load caffe/caffe

 

Installation

No Format
Installation errors out...Not complete

module         load cmake/3.5.0
module         load octave/3.8.0
module         load boost/1.60.0
module         load opencv/3.1.0
module         load library/hdf5/1.8.7
#module         load cuda/7.5.18
module         load caffe/gflags/gflags
module         load caffe/glog/0.3.3
module         load caffe/leveldb/leveldb
module         load caffe/lmdb/lmdb
module         load caffe/protobuf/protobuf
module         load caffe/snappy/snappy
module         load python/2.7.1-shared
module         load library/atlas/3.10.2
module         load matlab/2015b

cd /sw/caffe
unzip caffe-master.zip
cd /sw/caffe/caffe-master
mkdir build




...

No Format
vi /sw/caffe/caffe-master/CMakeLists.txt
Add the following at the bottom
>>>>>>
#target_link_libraries(filters ${OpenCV_LIBRARIES})
FIND_PACKAGE(OpenCV REQUIRED)
FIND_PACKAGE(Protobuf REQUIRED)
FIND_PACKAGE(Matlab REQUIRED)
>>>>>>>>
Also edit: vi /sw/caffe/caffe-master/src/caffe/CMakeLists.txt
Added ${OpenCV_LIBRARIES} as in:
target_link_libraries(caffe proto ${Caffe_LINKER_LIBS} ${OpenCV_LIBRARIES})
>>>>>>

 

 

...

Install libmpc-devel package

No Format
cd /sw/caffe/caffe-master/build
cmake -D CMAKE_INSTALL_PREFIX=/sw/caffe/caffe-master -DBUILD_SHARED_LIBS=ON -DAtlas_LAPACK_LIBRARY=/sw/library/atlas/3.10.2/lib/liblapack.so -DBUILD_matlab=ON -DMATLAB_DIR=/sw/Matlab/R2015b -DMatlab_mexext=/sw/Matlab/R2015b/toolbox/matlab/general -DMatlab_mex=/sw/Matlab/R2015b/toolbox/matlab/general -DOpenCV_DIR=/sw/opencv/opencv-3.1.0 -DOctave_DIR=/sw/octave/3.8.0  -DCUDNN_INCLUDE="/sw/cuda/cuda_7.5.18/include" -DCUDNN_LIBRARY="/sw/cuda/cuda_7.5.18/lib64/libcudnn.so" -DPROTOBUF_LIBRARY=/sw/caffe/protobuf/lib/libprotobuf.so  .. 2>&1 | tee cmakelog.txt

make
make install
No Format
>>>>>>>>>
cmake -D CMAKE_INSTALL_PREFIX=/sw/caffe/caffe-master -DBUILD_SHARED_LIBS=ON -DAtlas_LAPACK_LIBRARY=/sw/library/atlas/3.10.2/lib/liblapack.so -DBUILD_matlab=ON -DMATLAB_DIR=/sw/Matlab/R2015b -DMatlab_mexext=/sw/Matlab/R2015b/toolbox/matlab/general -DMatlab_mex=/sw/Matlab/R2015b/toolbox/matlab/general -DOpenCV_DIR=/sw/opencv/opencv-3.1.0 -DOctave_DIR=/sw/octave/3.8.0  -DCUDNN_INCLUDE="/sw/cuda/cuda_7.5.18/include" -DCUDNN_LIBRARY="/sw/cuda/cuda_7.5.18/lib64/libcudnn.so" -DPROTOBUF_LIBRARY=/sw/caffe/protobuf/lib/libprotobuf.so  .. 2>&1 | tee cmakelog.txtrpm -ivh /tmp/libmpc-devel-0.8-3.el6.x86_64.rpm  /tmp/libmpc-0.8-3.el6.x86_64.rpm
Preparing...                ########################################### [100%]
   1:libmpc                 ########################################### [ 50%]
   2:libmpc-devel           ########################################### [100%]

 

 

 

No Format
cd /sw/caffe/caffe-master/build
cmake -D CMAKE_INSTALL_PREFIX=/sw/caffe/caffe -DBUILD_SHARED_LIBS=ON  -DBUILD_matlab=ON -DMATLAB_DIR=/sw/Matlab/R2015b -DMatlab_mexext=/sw/Matlab/R2015b/bin/mex -DMatlab_mex=/sw/Matlab/R2015b/bin/mex  -DMatlab_DIR=/sw/Matlab/R2015b -DOctave_DIR=/sw/octave/3.8.0 -DCUDNN_INCLUDE="/sw/cuda/cuda_7.5.18/include" -DCUDNN_LIBRARY="/sw/cuda/cuda_7.5.18/lib64/libcudnn.so" -DAtlas_LAPACK_LIBRARY=/sw/library/lapack/lapack-3.6.0/3.6.0/lib64/liblapack.so .. 2>&1 | tee cmakelog.txt
make 2>&1 | tee makelog.txt

You will get an error at nearly 100% . It is due to matlab2015a stuff needing gcc compiler version 4.7X. 
Then just do this: module load compilers/gcc-4.7.1
make 2>&1 | tee makelog2.txt
make install 2>&1 | tee makeInstalllog.txt

No Format
>>>>>>>>>
cmake -D CMAKE_INSTALL_PREFIX=/sw/caffe/caffe -DBUILD_SHARED_LIBS=ON  -DBUILD_matlab=ON -DMATLAB_DIR=/sw/Matlab/R2015b -DMatlab_mexext=/sw/Matlab/R2015b/bin/mex -DMatlab_mex=/sw/Matlab/R2015b/bin/mex  -DMatlab_DIR=/sw/Matlab/R2015b -DOctave_DIR=/sw/octave/3.8.0 -DCUDNN_INCLUDE="/sw/cuda/cuda_7.5.18/include" -DCUDNN_LIBRARY="/sw/cuda/cuda_7.5.18/lib64/libcudnn.so" -DAtlas_LAPACK_LIBRARY=/sw/library/lapack/lapack-3.6.0/3.6.0/lib64/liblapack.so .. 2>&1 | tee cmakelog.txt
-- The C compiler identification is GNU 4.7.1
-- The CXX compiler identification is GNU 4.7.1
-- Check for working C compiler: /sw/gcc/4.7.1/bin/gcc
-- Check for working C compiler: /sw/gcc/4.7.1/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /sw/gcc/4.7.1/bin/g++
-- Check for working CXX compiler: /sw/gcc/4.7.1/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Boost version: 1.60.0
-- Found the following Boost libraries:
--   system
--   thread
--   filesystem
--   chrono
--   date_time
--   atomic
-- Found GFlags: /sw/caffe/gflags/usr/local/include
-- Found gflags  (include: /sw/caffe/gflags/usr/local/include, library: /sw/caffe/gflags/usr/local/lib/libgflags.a)/libgflags.a)
-- Found Glog: /sw/caffe/glog/0.3.3/include
-- Found glog    (include: /sw/caffe/glog/0.3.3/include, library: /sw/caffe/glog/0.3.3/lib/libglog.so)
-- Found PROTOBUF: /sw/caffe/protobuf/lib/libprotobuf.so
-- Found PROTOBUF Compiler: /sw/caffe/protobuf/bin/protoc
-- Found HDF5: /sw/library/hdf5/1.8.7/lib/libhdf5_hl.so;/sw/library/hdf5/1.8.7/lib/libhdf5.so;/usr/lib64/libz.so;/usr/lib64/libm.so (found version "1.8.7")
-- Found LMDB: /sw/caffe/caffelmdb/protobufusr/binlocal/protocinclude
-- Found lmdb    (include: /sw/caffe/lmdb/usr/local/include, library: /sw/caffe/lmdb/usr/local/lib/liblmdb.so)
-- Found LevelDB: /sw/caffe/leveldb/include
-- Found LevelDB (include: /sw/caffe/leveldb/include, library: /sw/caffe/leveldb/lib/libleveldb.so)
-- Found Snappy: /sw/caffe/snappy/include
-- Found Snappy  (include: /sw/caffe/snappy/include, library: /sw/caffe/snappy/lib/libsnappy.so)
-- CUDA detected: 7.5
-- Found cuDNN: ver. 4.0.7 found (include: /sw/cuda/cuda_7.5.18/include, library: /sw/cuda/cuda_7.5.18/lib64/libcudnn.so)
-- Added CUDA NVCC flags for: sm_20
-- OpenCVFound foundPkgConfig: (/usr/sw/opencv/opencv-3.1.0/cmakebin/pkg-config (found version "0.23")
-- Checking for module 'opencv'
--   Found opencv, version 3.1.0
-- Checking for module 'opencv'
--   Found opencv, version 3.1.0
-- LIBS3.1.0
-- OpenCV found ()
-- Found Atlas: /sw/library/atlas/3.10.2/include
-- Found Atlas (include: /sw/library/atlas/3.10.2/include, library: /sw/library/atlas/3.10.2/lib/libatlas.so)
-- NumPy ver. 1.12.0.dev0+1380fdd found (includeFound PythonInterp: /sw/python/2.7.1-shared/libbin/python2.7/site-packages/numpy-1.12.0.dev0+1380fdd-py2.7-linux-x86_64.egg/numpy/core/include)
-- Boost version: 1.60.0
-- Found the following Boost libraries:
--   python
dirname: missing operand
Try `dirname --help' for more information.
dirname: missing operand
Try `dirname --help' for more information.
-- Detected Doxygen OUTPUT_DIRECTORY: ./doxygen/
--
-- ******************* Caffe Configuration Summary *******************
-- General:
--   Version           :   1.0.0-rc3
--   Git               :   unknown
--   System            :   Linux
--   C++ compiler      :   /usr/bin/c++
--   Release CXX flags :   -O3 -DNDEBUG -fPIC -Wall -Wno-sign-compare -Wno-uninitialized
--   Debug CXX flags   :   -g -fPIC -Wall -Wno-sign-compare -Wno-uninitialized
--   Build type        :   Release
--
--   BUILD_SHARED_LIBS :   ON
--   BUILD_python      :   ON
--   BUILD_matlab      :   ON
--   BUILD_docs (found suitable version "2.7.1", minimum required is "2.7")
-- Found PythonLibs: /sw/python/2.7.1-shared/lib/libpython2.7.so (found suitable version "2.7.1", minimum required is "2.7")
-- Found NumPy: /sw/python/2.7.1-shared/lib/python2.7/site-packages/numpy-1.12.0.dev0+1380fdd-py2.7-linux-x86_64.egg/numpy/core/include (found suitable version "1.12.0.dev0+1380fdd", minimum required is "1.7.1")
-- NumPy ver. 1.12.0.dev0+1380fdd found (include: /sw/python/2.7.1-shared/lib/python2.7/site-packages/numpy-1.12.0.dev0+1380fdd-py2.7-linux-x86_64.egg/numpy/core/include)
-- Boost version: 1.60.0
-- Found the following Boost libraries:
--   python
dirname: missing operand
Try `dirname --help' for more information.
dirname: missing operand
Try `dirname --help' for more information.
-- Found MatlabMex: /sw/Matlab/R2015b/bin/mex
-- Found Doxygen: /usr/bin/doxygen (found version "1.6.1")
Not enough input arguments.
-- Detected Doxygen OUTPUT_DIRECTORY: ./doxygen/
-- Found Git: /usr/bin/git (found version "1.7.1")
--
-- ******************* Caffe Configuration Summary *******************
-- General:
--   Version           :   1.0.0-rc3
--   Git               :   ONunknown
--   CPU_ONLYSystem            :   OFFLinux
--   USE_OPENCV  C++ compiler      :   ON/sw/gcc/4.7.1/bin/g++
--   USE_LEVELDBRelease CXX flags :   -O3 :-DNDEBUG -fPIC  ON-Wall -Wno-sign-compare -Wno-uninitialized
--  USE_LMDB Debug CXX     flags   :   ON-g --   ALLOW_LMDB_NOLOCK :   OFFfPIC -Wall -Wno-
-- Dependencies:sign-compare -Wno-uninitialized
--  BLAS Build type            :   Yes (Atlas)Release
--
--   BUILD_SHARED_LIBS Boost:   ON
--   BUILD_python      :   Yes (ver. 1.60)ON
--   glog        BUILD_matlab      :   YesON
--   gflags    BUILD_docs        :   YesON
--   protobufCPU_ONLY          :   Yes (ver. 3.0.0)
OFF
--   lmdb      USE_OPENCV        :   Yes (ver. 0.9.70)
ON
--   LevelDBUSE_LEVELDB       :   ON
:--   Yes (ver. 1.18)
--USE_LMDB      Snappy    :   ON
--   ALLOW_LMDB_NOLOCK :   OFF
Yes (ver. 1.1.3)--
-- Dependencies:
--   BLAS  OpenCV            :   Yes (ver. 3.1.0Atlas)
--   CUDA Boost             :   Yes (ver. 71.560)
--
-- NVIDIA CUDA:
--   Target GPU(s) glog     :   Auto --   GPU arch(s)       :   sm_20Yes
--   cuDNN gflags            :   Yes (ver.
4.0.7)
-- -- Python:
--   Interpreter       :   /sw/python/2.7.1-shared/bin/python2.7 protobuf          :   Yes (ver. 23.70.10)
--   lmdb     Libraries         :   /sw/python/2.7.1-shared/lib/libpython2.7.soYes (ver. 20.79.170)
--   NumPy  LevelDB           :   /sw/python/2.7.1-shared/lib/python2.7/site-packages/numpy-1.12.0.dev0+1380fdd-py2.7-linux-x86_64.egg/numpy/core/includeYes (ver. 1.12.0.dev0+1380fdd)
--
-- Matlab:.18)
--   MatlabSnappy            :   Yes (/sw/Matlab/R2015b/toolbox/matlab/general, /sw/Matlab/R2015b/toolbox/matlab/generalver. 1.1.3)
--   OctaveOpenCV            :   Yes (/sw/octave/ver. 3.81.0/bin/mkoctfile)
--   Build mex using   :CUDA   Matlab -- -- Documentaion: --   Doxygen           :   /usr/bin/doxygenYes (1ver.6 7.15)
--
-- NVIDIA config_file CUDA:
--   Target GPU(s)  :   /sw/caffe/caffe-master/.Doxyfile
--
-- Install::   Auto
--   Install pathGPU arch(s)       :   /sw/caffe/caffe-mastersm_20
--
-- Configuring done
-- Generating done
-- Build files have been written to: /sw/caffe/caffe-master/build

>>>>>>>>> 
No Format
make
[  0%] Running C++/Python protocol buffer compiler on /sw/caffe/caffe-master/src/caffe/proto/caffe.proto
Scanning dependencies of target proto
[  1%] Building CXX object src/caffe/CMakeFiles/proto.dir/__/__/include/caffe/proto/caffe.pb.cc.o
[  1%] Linking CXX static library ../../lib/libproto.a
[  1%] Built target proto
[  1%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/util/cuda_compile_generated_math_functions.cu.o
[  1%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_absval_layer.cu.o
[  1%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_base_data_layer.cu.o
[  2%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_batch_norm_layer.cu.o
[  2%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_batch_reindex_layer.cu.o
[  2%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_bias_layer.cu.o
[  4%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_bnll_layer.cu.o
[  4%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_concat_layer.cu.o
[  5%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_contrastive_loss_layer.cu.o
[  5%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_conv_layer.cu.o
[  5%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_crop_layer.cu.o
[  6%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_cudnn_conv_layer.cu.o
[  6%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_cudnn_lcn_layer.cu.o
[  6%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_cudnn_lrn_layer.cu.o
[  8%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_cudnn_pooling_layer.cu.o
[  8%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_cudnn_relu_layer.cu.o   cuDNN             :   Yes (ver. 4.0.7)
--
-- Python:
--   Interpreter       :   /sw/python/2.7.1-shared/bin/python2.7 (ver. 2.7.1)
--   Libraries         :   /sw/python/2.7.1-shared/lib/libpython2.7.so (ver 2.7.1)
--   NumPy             :   /sw/python/2.7.1-shared/lib/python2.7/site-packages/numpy-1.12.0.dev0+1380fdd-py2.7-linux-x86_64.egg/numpy/core/include (ver 1.12.0.dev0+1380fdd)
--
-- Matlab:
--   Matlab            :   Yes (/sw/Matlab/R2015b/bin/mex, /sw/Matlab/R2015b/bin/mex
--   Octave            :   Yes (/sw/octave/3.8.0/bin/mkoctfile)
--   Build mex using   :   Matlab
--
-- Documentaion:
--   Doxygen           :   /usr/bin/doxygen (1.6.1)
--   config_file       :   /sw/caffe/caffe-master/.Doxyfile
--
-- Install:
--   Install path      :   /sw/caffe/caffe
--
-- LIBS3.1.0
-- Found Matlab: /sw/Matlab/R2015b/extern/include (found version "8.6")
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    MATLAB_DIR
    Octave_DIR


-- Build files have been written to: /sw/caffe/caffe-master/build

>>>>>>>>> 
No Format
make


snip <<< CLIP

[ 79%] Building CXX object src/caffe/CMakeFiles/caffe.dir/util/upgrade_proto.cpp.o
[ 80%] Linking CXX shared library ../../lib/libcaffe.so
[ 80%] Built target caffe
Scanning dependencies of target convert_imageset
[ 80%] Building CXX object tools/CMakeFiles/convert_imageset.dir/convert_imageset.cpp.o
[ 80%] Linking CXX executable convert_imageset
../lib/libcaffe.so.1.0.0-rc3: undefined reference to `cv::Mat::Mat(cv::Mat const&, cv::Rect_<int> const&)'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to `cv::Mat::copySize(cv::Mat const&)'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to `cv::imread(cv::String const&, int)'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to `cv::String::allocate(unsigned long)'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to `cv::String::deallocate()'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to `cv::imencode(cv::String const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to `cv::Mat::deallocate()'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to `cv::imdecode(cv::_InputArray const&, int)'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to `cv::fastFree(void*)'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to `cv::resize(cv::_InputArray const&, cv::_OutputArray const&, cv::Size_<int>, double, double, int)'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to `cv::flip(cv::_InputArray const&, cv::_OutputArray const&, int)'
collect2: ld returned 1 exit status
make[2]: *** [tools/convert_imageset] Error 1
make[1]: *** [tools/CMakeFiles/convert_imageset.dir/all] Error 2
make: *** [all] Error 2

...