Caffe

 

 

Introduction

Caffe is a deep learning framework made with expression, speed, and modularity in mind.

Ref: http://caffe.berkeleyvision.org/

Usage

module load caffe/caffe

 

Installation

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




Compilation issues on RHEL 6.5

 

OpenCV issues

 

The following needed to be done with openCV to make it compile on RGEL/Centos 6.5
 - Try to find OpenCV (using pkg-config)
cd /sw/caffe/caffe-master/cmake/Modules
vi FindOpenCV.cmake
<<<<<<

#
# If OpenCV was installed in a non-defaul location, set OpenCV_DIR
#
# Once done, this will define
#
#  OpenCV_FOUND - system has OpenCV
#  OpenCV_INCLUDE_DIRS - the OpenCV include directories
#  OpenCV_LIBRARIES - link these to use OpenCV
#  OpenCV_LIBRARY_DIRS - the OpenCV library directories
#
# Created: 10 Jan 2012 by bermaw (bermaw at gmail.com)

SET("OpenCV_DIR" "/sw/opencv/opencv-3.1.0")
SET(ENV{PKG_CONFIG_PATH} ${OpenCV_DIR}/lib/pkgconfig)
FIND_PACKAGE(PkgConfig REQUIRED)
pkg_check_modules(OpenCV REQUIRED opencv)

#--- OpenCV (with pkgconfig)
find_package(PkgConfig REQUIRED)
pkg_check_modules(OPENCV REQUIRED opencv)
# https://bugs.freedesktop.org/show_bug.cgi?id=82245
# list(APPEND LIBRARIES ${OPENCV_LIBRARIES})
list(APPEND LIBRARIES ${OPENCV_LDFLAGS})
message(STATUS LIBS ${OPENCV_VERSION})
include_directories(${OPENCV_INCLUDE_DIRS})


>>>>>>>>>>>>>>>>>



Here is the module file for opencv which included 3rdParty Software
module display opencv/3.1.0
-------------------------------------------------------------------
/sw/com/modulefiles/opencv/3.1.0:

setenv         OpenCV_DIR /sw/opencv/opencv-3.1.0
setenv         OPENCV_INCLUDE_INSTALL_PATH /sw/opencv/opencv-3.1.0/include
setenv         OpenCV_LIB_PATH /sw/opencv/opencv-3.1.0/lib
setenv         OpenCV_INCLUDE_DIRS /sw/opencv/opencv-3.1.0/include:/sw/opencv/opencv-3.1.0/include/opencv:/sw/opencv/opencv-3.1.0/include/opencv2
prepend-path     MANPATH /sw/opencv/opencv-3.1.0/share/OpenCV
prepend-path     LIBRARY_PATH /sw/opencv/opencv-3.1.0/3rdparty/ippicv/unpack/ippicv_lnx/lib/intel64:/sw/opencv/opencv-3.1.0/lib:/sw/opencv/opencv-3.1.0/lib/pkgconfig
prepend-path     FPATH /sw/opencv/opencv-3.1.0/include:/sw/opencv/opencv-3.1.0/3rdparty/include/opencl/1.2/CL:/sw/opencv/opencv-3.1.0/3rdparty/include:/sw/opencv/opencv-3.1.0/3rdparty/include/dshow:/sw/opencv/opencv-3.1.0/3rdparty/ippicv/unpack/ippicv_lnx/include:/sw/opencv/opencv-3.1.0/3rdparty/libjasper:/sw/opencv/opencv-3.1.0/3rdparty/libjasper/jasper:/sw/opencv/opencv-3.1.0/3rdparty/libjpeg:/sw/opencv/opencv-3.1.0/3rdparty/libpng:/sw/opencv/opencv-3.1.0/3rdparty/libtiff:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/cpu-features:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/dec:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/dsp:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/enc:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/mux:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/utils:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/webp:/sw/opencv/opencv-3.1.0/3rdparty/openexr/Half:/sw/opencv/opencv-3.1.0/3rdparty/openexr/IlmThread:/sw/opencv/opencv-3.1.0/3rdparty/openexr/Iex:/sw/opencv/opencv-3.1.0/3rdparty/openexr/IlmImf:/sw/opencv/opencv-3.1.0/3rdparty/openexr/Imath:/sw/opencv/opencv-3.1.0/3rdparty/tbb:/sw/opencv/opencv-3.1.0/3rdparty/zlib
prepend-path     LD_LIBRARY_PATH /sw/opencv/opencv-3.1.0/3rdparty/ippicv/unpack/ippicv_lnx/lib/intel64:/sw/opencv/opencv-3.1.0/lib
prepend-path     CPATH /sw/opencv/opencv-3.1.0/include:/sw/opencv/opencv-3.1.0/include/opencv:/sw/opencv/opencv-3.1.0/include/opencv2:/sw/opencv/opencv-3.1.0/3rdparty/include/opencl/1.2/CL:/sw/opencv/opencv-3.1.0/3rdparty/include:/sw/opencv/opencv-3.1.0/3rdparty/include/dshow:/sw/opencv/opencv-3.1.0/3rdparty/ippicv/unpack/ippicv_lnx/include:/sw/opencv/opencv-3.1.0/3rdparty/libjasper:/sw/opencv/opencv-3.1.0/3rdparty/libjasper/jasper:/sw/opencv/opencv-3.1.0/3rdparty/libjpeg:/sw/opencv/opencv-3.1.0/3rdparty/libpng:/sw/opencv/opencv-3.1.0/3rdparty/libtiff:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/cpu-features:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/dec:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/dsp:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/enc:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/mux:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/utils:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/webp:/sw/opencv/opencv-3.1.0/3rdparty/openexr/Half:/sw/opencv/opencv-3.1.0/3rdparty/openexr/IlmThread:/sw/opencv/opencv-3.1.0/3rdparty/openexr/Iex:/sw/opencv/opencv-3.1.0/3rdparty/openexr/IlmImf:/sw/opencv/opencv-3.1.0/3rdparty/openexr/Imath:/sw/opencv/opencv-3.1.0/3rdparty/tbb:/sw/opencv/opencv-3.1.0/3rdparty/zlib
prepend-path     C_INCLUDE_PATH /sw/opencv/opencv-3.1.0/include:/sw/opencv/opencv-3.1.0/include/opencv:/sw/opencv/opencv-3.1.0/include/opencv2:/sw/opencv/opencv-3.1.0/3rdparty/include/opencl/1.2/CL:/sw/opencv/opencv-3.1.0/3rdparty/include:/sw/opencv/opencv-3.1.0/3rdparty/include/dshow:/sw/opencv/opencv-3.1.0/3rdparty/ippicv/unpack/ippicv_lnx/include:/sw/opencv/opencv-3.1.0/3rdparty/libjasper:/sw/opencv/opencv-3.1.0/3rdparty/libjasper/jasper:/sw/opencv/opencv-3.1.0/3rdparty/libjpeg:/sw/opencv/opencv-3.1.0/3rdparty/libpng:/sw/opencv/opencv-3.1.0/3rdparty/libtiff:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/cpu-features:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/dec:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/dsp:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/enc:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/mux:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/utils:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/webp:/sw/opencv/opencv-3.1.0/3rdparty/openexr/Half:/sw/opencv/opencv-3.1.0/3rdparty/openexr/IlmThread:/sw/opencv/opencv-3.1.0/3rdparty/openexr/Iex:/sw/opencv/opencv-3.1.0/3rdparty/openexr/IlmImf:/sw/opencv/opencv-3.1.0/3rdparty/openexr/Imath:/sw/opencv/opencv-3.1.0/3rdparty/tbb:/sw/opencv/opencv-3.1.0/3rdparty/zlib
prepend-path     CPLUS_INCLUDE_PATH /sw/opencv/opencv-3.1.0/include:/sw/opencv/opencv-3.1.0/include/opencv:/sw/opencv/opencv-3.1.0/include/opencv2:/sw/opencv/opencv-3.1.0/3rdparty/include/opencl/1.2/CL:/sw/opencv/opencv-3.1.0/3rdparty/include:/sw/opencv/opencv-3.1.0/3rdparty/include/dshow:/sw/opencv/opencv-3.1.0/3rdparty/ippicv/unpack/ippicv_lnx/include:/sw/opencv/opencv-3.1.0/3rdparty/libjasper:/sw/opencv/opencv-3.1.0/3rdparty/libjasper/jasper:/sw/opencv/opencv-3.1.0/3rdparty/libjpeg:/sw/opencv/opencv-3.1.0/3rdparty/libpng:/sw/opencv/opencv-3.1.0/3rdparty/libtiff:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/cpu-features:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/dec:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/dsp:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/enc:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/mux:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/utils:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/webp:/sw/opencv/opencv-3.1.0/3rdparty/openexr/Half:/sw/opencv/opencv-3.1.0/3rdparty/openexr/IlmThread:/sw/opencv/opencv-3.1.0/3rdparty/openexr/Iex:/sw/opencv/opencv-3.1.0/3rdparty/openexr/IlmImf:/sw/opencv/opencv-3.1.0/3rdparty/openexr/Imath:/sw/opencv/opencv-3.1.0/3rdparty/tbb:/sw/opencv/opencv-3.1.0/3rdparty/zlib
prepend-path     INCLUDE /sw/opencv/opencv-3.1.0/include:/sw/opencv/opencv-3.1.0/include/opencv:/sw/opencv/opencv-3.1.0/include/opencv2:/sw/opencv/opencv-3.1.0/3rdparty/include/opencl/1.2/CL:/sw/opencv/opencv-3.1.0/3rdparty/include:/sw/opencv/opencv-3.1.0/3rdparty/include/dshow:/sw/opencv/opencv-3.1.0/3rdparty/ippicv/unpack/ippicv_lnx/include:/sw/opencv/opencv-3.1.0/3rdparty/libjasper:/sw/opencv/opencv-3.1.0/3rdparty/libjasper/jasper:/sw/opencv/opencv-3.1.0/3rdparty/libjpeg:/sw/opencv/opencv-3.1.0/3rdparty/libpng:/sw/opencv/opencv-3.1.0/3rdparty/libtiff:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/cpu-features:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/dec:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/dsp:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/enc:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/mux:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/utils:/sw/opencv/opencv-3.1.0/3rdparty/libwebp/webp:/sw/opencv/opencv-3.1.0/3rdparty/openexr/Half:/sw/opencv/opencv-3.1.0/3rdparty/openexr/IlmThread:/sw/opencv/opencv-3.1.0/3rdparty/openexr/Iex:/sw/opencv/opencv-3.1.0/3rdparty/openexr/IlmImf:/sw/opencv/opencv-3.1.0/3rdparty/openexr/Imath:/sw/opencv/opencv-3.1.0/3rdparty/tbb:/sw/opencv/opencv-3.1.0/3rdparty/zlib
prepend-path     PATH /sw/opencv/opencv-3.1.0/bin:/sw/opencv/opencv-3.1.0/share/OpenCV/:/sw/opencv/opencv-3.1.0/cmake
prepend-path     PKG_CONFIG_PATH /sw/opencv/opencv-3.1.0/lib/pkgconfig
-------------------------------------------------------------------


 

Check the version of openCV

module load opencv/3.1.0
pkg-config --modversion opencv
pkg-config --static --libs opencv
pkg-config --cflags --libs opencv

 

 

 

Protobuf Issue

vi /sw/caffe/caffe-master/cmake/Modules/FindProtobuf.cmake
# Locate and configure the Google Protocol Buffers library.
# Defines the following variables:
#
#   PROTOBUF_FOUND - Found the Google Protocol Buffers library
#   PROTOBUF_INCLUDE_DIRS - Include directories for Google Protocol Buffers
#   PROTOBUF_LIBRARIES - The protobuf library
#
# The following cache variables are also defined:
#   PROTOBUF_LIBRARY - The protobuf library
#   PROTOBUF_PROTOC_LIBRARY   - The protoc library
#   PROTOBUF_INCLUDE_DIR - The include directory for protocol buffers
#   PROTOBUF_PROTOC_EXECUTABLE - The protoc compiler
#
#  ====================================================================
#  Example:
#
#   find_package(Protobuf REQUIRED)
#   include_directories(${PROTOBUF_INCLUDE_DIRS})
#
#   include_directories(${CMAKE_CURRENT_BINARY_DIR})
#   PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS foo.proto)
#   add_executable(bar bar.cc ${PROTO_SRCS} ${PROTO_HDRS})
#   target_link_libraries(bar ${PROTOBUF_LIBRARY})
#
# NOTE: You may need to link against pthreads, depending
# on the platform.
#  ====================================================================
#
# PROTOBUF_GENERATE_CPP (public function)
#   SRCS = Variable to define with autogenerated
#          source files
#   HDRS = Variable to define with autogenerated
#          header files
#   ARGN = proto files
#
#  ====================================================================


#=============================================================================
# Copyright 2009 Kitware, Inc.
# Copyright 2009 Philip Lowman <philip@yhbt.com>
# Copyright 2008 Esben Mose Hansen, Ange Optimization ApS
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
#  License text for the above reference.)

function(PROTOBUF_GENERATE_CPP SRCS HDRS)
  if(NOT ARGN)
    message(SEND_ERROR "Error: PROTOBUF_GENERATE_CPP() called without any proto files")
    return()
  endif(NOT ARGN)

  set(${SRCS})
  set(${HDRS})
  foreach(FIL ${ARGN})
    get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
    get_filename_component(FIL_WE ${FIL} NAME_WE)

    list(APPEND ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.cc")
    list(APPEND ${HDRS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.h")

    add_custom_command(
      OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.cc"
             "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.h"
      COMMAND  ${PROTOBUF_PROTOC_EXECUTABLE}
      ARGS --cpp_out  ${CMAKE_CURRENT_BINARY_DIR} --proto_path ${CMAKE_CURRENT_SOURCE_DIR} ${ABS_FIL}
      DEPENDS ${ABS_FIL}
      COMMENT "Running C++ protocol buffer compiler on ${FIL}"
      VERBATIM )
  endforeach()

  set_source_files_properties(${${SRCS}} ${${HDRS}} PROPERTIES GENERATED TRUE)
  set(${SRCS} ${${SRCS}} PARENT_SCOPE)
  set(${HDRS} ${${HDRS}} PARENT_SCOPE)
endfunction()


find_path(PROTOBUF_INCLUDE_DIR google/protobuf/service.h)

# Google's provided vcproj files generate libraries with a "lib"
# prefix on Windows
if(WIN32)
    set(PROTOBUF_ORIG_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}")
    set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")
endif()

find_library(PROTOBUF_LIBRARY NAMES protobuf
             DOC "The Google Protocol Buffers Library"
)
find_library(PROTOBUF_PROTOC_LIBRARY NAMES protoc
             DOC "The Google Protocol Buffers Compiler Library"
)
find_program(PROTOBUF_PROTOC_EXECUTABLE NAMES protoc
             DOC "The Google Protocol Buffers Compiler"
)

mark_as_advanced(PROTOBUF_INCLUDE_DIR
                 PROTOBUF_LIBRARY
                 PROTOBUF_PROTOC_LIBRARY
                 PROTOBUF_PROTOC_EXECUTABLE)

# Restore original find library prefixes
if(WIN32)
    set(CMAKE_FIND_LIBRARY_PREFIXES "${PROTOBUF_ORIG_FIND_LIBRARY_PREFIXES}")
endif()

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROTOBUF DEFAULT_MSG
    PROTOBUF_LIBRARY PROTOBUF_INCLUDE_DIR)

if(PROTOBUF_FOUND)
    set(PROTOBUF_INCLUDE_DIRS ${PROTOBUF_INCLUDE_DIR})
    set(PROTOBUF_LIBRARIES    ${PROTOBUF_LIBRARY})
endif()


FindMATLAB.cmake

Soruce: https://github.com/casadi/casadi/blob/master/cmake/FindMATLAB.cmake

# - this module looks for Matlab
# Defines:
#  MATLAB_INCLUDE_DIR: include path for mex.h, engine.h
#  MATLAB_LIBRARIES:   required libraries: libmex, etc
#  MATLAB_MEX_LIBRARY: path to libmex.lib
#  MATLAB_MX_LIBRARY:  path to libmx.lib
#  MATLAB_MAT_LIBRARY:  path to libmat.lib
#  MATLAB_ENG_LIBRARY: path to libeng.lib
#  MATLAB_ROOT: path to Matlab's root directory
#  MATLAB_MEX_EXE: path to mex program
#  MATLAB_MEX_EXT: mex extension
#  MATLAB_CFLAGS, MATLAB_CLINKER_FLAGS, MATLAB_CLIBS (and same for CXX and Fortran)
#
# Note: You cannot use MATLAB_CLIBS etc to "target_link_libraries" as that gets confused
# by the flag that specifies where the matlab libraries are (at least on Windows for Visual Studio).
# This variable also contains system libraries etc so it's probably not a good idea to use it in
# your CMake file. You should probably use
#
#  include_directories(${MATLAB_INCLUDE_DIR})
#  add_definitions(${MATLAB_CXXFLAGS})
#  target_link_libraries(yourmexfile ${MATLAB_LIBRARIES} )
#
# Reason for MATLAB_CXXFLAGS: on linux, mex files need to be compiled with -fPIC, but that means all
# linked libraries need to be compiled with -fPIC as well.

# This is a derivative work of file FindMatlab.cmake released with
# CMake v2.8, because the original seems to be a bit outdated
#
# This file uses ideas from Gerardus (Author: Ramon Casero <rcasero@...>, Tom Doel)
# and a post by Kent Williams
# http://www.cmake.org/pipermail/cmake/2013-December/056593.html
#
# Heavily modified by Kris Thielemans for WIN32 and recent versions of matlab

#=============================================================================
# Copyright 2005-2009 Kitware, Inc.
# Copyright 2014 University College London

# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
#  License text for the above reference.)

# If MATLAB_ROOT was defined in the environment, use it.
if (NOT MATLAB_ROOT AND NOT $ENV{MATLAB_ROOT} STREQUAL "")
  set(MATLAB_ROOT $ENV{MATLAB_ROOT} CACHE PATH "set this if CMake does not find it automatically")
  file(TO_CMAKE_PATH "${MATLAB_ROOT}" MATLAB_ROOT)
endif()


if (NOT MATLAB_ROOT)

  # get path to the Matlab executable
  find_program(MATLAB_EXE_PATH matlab
        PATHS /usr/local/bin)
  if (MATLAB_EXE_PATH)
    # found it, so let's find its absolute path and go one level up to find MATLAB_ROOT
    message(STATUS "MATLAB executable found: ${MATLAB_EXE_PATH}")
    # remove symbolic links
    get_filename_component(MATLAB_EXE_PATH "${MATLAB_EXE_PATH}" REALPATH )
    # find directory of executable
    get_filename_component(my_MATLAB_ROOT "${MATLAB_EXE_PATH}" PATH )
    # find root dir
    get_filename_component(my_MATLAB_ROOT "${my_MATLAB_ROOT}" PATH )
    # store it in the cache
    set(MATLAB_ROOT "${my_MATLAB_ROOT}" CACHE PATH "Location of MATLAB files")
  else()
    # First set MATLAB_ROOT to an empty string but as a cached variable
    # this avoids CMake creating a local variable with the same name
    set(MATLAB_ROOT "" CACHE PATH "Location of MATLAB files")

    # now go and look in more places
    if(WIN32)
      # Search for a version of Matlab available, starting from the most modern one to older versions
      foreach(MATVER "8.5" "8.4" "8.3" "8.2" "8.1" "8.0" "7.16" "7.15" "7.14" "7.13" "7.12" "7.11" "7.10" "7.9" "7.8" "7.7" "7.6" "7.5" "7.4")
        if((NOT DEFINED MATLAB_ROOT)
            OR ("${MATLAB_ROOT}" STREQUAL "")
            OR ("${MATLAB_ROOT}" STREQUAL "/registry"))
          get_filename_component(MATLAB_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\${MATVER};MATLABROOT]" ABSOLUTE)
        endif()
      endforeach()
      if("${MATLAB_ROOT}" STREQUAL "/registry")
        set(MATLAB_ROOT "")
      endif()

    elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")   # Check if this is a Mac
      # we look in the applications folder
      # Search for a version of Matlab available, starting from the most modern one to older versions
      foreach(MATVER "R2015b" "R2015a" "R2014b" "R2014a" "R2013b" "R2013a" "R2012b" "R2012a" "R2011b" "R2011a" "R2010b" "R2010a" "R2009b" "R2009a" "R2008b")
        if((NOT DEFINED MATLAB_ROOT) OR ("${MATLAB_ROOT}" STREQUAL ""))
          if(EXISTS /Applications/MATLAB_${MATVER}.app)
            set(MATLAB_ROOT /Applications/MATLAB_${MATVER}.app)
          endif()
        endif()
      endforeach()
    else()
      # could go and look in some other default places for other OSses
    endif()
  endif()
endif()

if ("${MATLAB_ROOT}" STREQUAL "")
  message(STATUS "MATLAB not found. Set MATLAB_ROOT")
  # TODO should really skip rest of configuration as it will all fail anyway.
else()
  message(STATUS "MATLAB_ROOT set to ${MATLAB_ROOT}")
endif()

# Find out where MATLAB libraries are
IF (NOT MATLAB_LIBRARIES)
  if (WIN32)
    # Directory name depending on whether the Windows architecture is 32
    # bit or 64 bit
    if(CMAKE_SIZEOF_VOID_P MATCHES "4")
      set(WINDIR "win32")
    elseif(CMAKE_SIZEOF_VOID_P MATCHES "8")
      set(WINDIR "win64")
    else()
      message(FATAL_ERROR
        "CMAKE_SIZEOF_VOID_P (${CMAKE_SIZEOF_VOID_P}) doesn't indicate a valid platform")
    endif()

    # Folder where the MEX libraries are, depending on the Windows compiler
    if(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
      set(MATLAB_LIBRARIES_DIR "${MATLAB_ROOT}/extern/lib/${WINDIR}/microsoft/msvc60")
    elseif(${CMAKE_GENERATOR} MATCHES "Visual Studio 7")
      # Assume people are generally using Visual Studio 7.1,
      # if using 7.0 need to link to: ../extern/lib/${WINDIR}/microsoft/msvc70
      set(MATLAB_LIBRARIES_DIR "${MATLAB_ROOT}/extern/lib/${WINDIR}/microsoft/msvc71")
      # set(MATLAB_LIBRARIES_DIR "${MATLAB_ROOT}/extern/lib/${WINDIR}/microsoft/msvc70")
    elseif(${CMAKE_GENERATOR} MATCHES "Borland")
      # Assume people are generally using Borland 5.4,
      # if using 7.0 need to link to: ../extern/lib/${WINDIR}/microsoft/msvc70
      set(MATLAB_LIBRARIES_DIR "${MATLAB_ROOT}/extern/lib/${WINDIR}/microsoft/bcc54")
      # set(MATLAB_LIBRARIES_DIR "${MATLAB_ROOT}/extern/lib/${WINDIR}/microsoft/bcc50")
      # set(MATLAB_LIBRARIES_DIR "${MATLAB_ROOT}/extern/lib/${WINDIR}/microsoft/bcc51")
    elseif(${CMAKE_GENERATOR} MATCHES "Visual Studio*")
      # If the compiler is Visual Studio, but not any of the specific
      # versions above, we try our luck with the microsoft directory
      set(MATLAB_LIBRARIES_DIR "${MATLAB_ROOT}/extern/lib/${WINDIR}/microsoft/")
    endif()

  else(WIN32)

    if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
      set(LIBRARY_EXTENSION .dylib)
    else()
      set(LIBRARY_EXTENSION .so)
    endif()

    # There seems to be no way to let cmake do a search in subdirectories, so use "find"
    execute_process(
      COMMAND find "${MATLAB_ROOT}/bin" -name libmex${LIBRARY_EXTENSION}
      COMMAND xargs echo -n
      OUTPUT_VARIABLE mex_lib
      )
    if (mex_lib)
      # find directory of executable
      get_filename_component(MATLAB_LIBRARIES_DIR ${mex_lib} PATH )
    endif()
  endif(WIN32)

  if (NOT MATLAB_LIBRARIES_DIR)
    set(MATLAB_LIBRARIES_DIR ${MATLAB_ROOT})
  endif()

  message(STATUS "Will look for MATLAB libraries in ${MATLAB_LIBRARIES_DIR}")

endif() # MATLAB_LIBRARIES

if (WIN32)
  set(BATEXT .bat)
  set(LIBPREFIX lib)
endif()
# This is common to all platforms:

# Get paths to the Matlab MEX libraries
find_library(MATLAB_MEX_LIBRARY
    ${LIBPREFIX}mex
    HINTS ${MATLAB_LIBRARIES_DIR}
    )
find_library(MATLAB_MX_LIBRARY
    ${LIBPREFIX}mx
    HINTS ${MATLAB_LIBRARIES_DIR}
    )
find_library(MATLAB_MAT_LIBRARY
    ${LIBPREFIX}mat
    HINTS ${MATLAB_LIBRARIES_DIR}
    )
find_library(MATLAB_ENG_LIBRARY
    ${LIBPREFIX}eng
    HINTS ${MATLAB_LIBRARIES_DIR}
    )
find_library(MATLAB_UT_LIBRARY
    ${LIBPREFIX}ut
    HINTS ${MATLAB_LIBRARIES_DIR}
    )

# Get path to the include directory
find_path(MATLAB_INCLUDE_DIR
    "mex.h"
    HINTS  "${MATLAB_ROOT}/extern/include"  "${MATLAB_ROOT}/include"
    )

find_program( MATLAB_MEX_PATH mex${BATEXT}
             HINTS ${MATLAB_ROOT}/bin
             DOC "The mex program path"
            )

find_program( MATLAB_MEXEXT_PATH mexext${BATEXT}
             HINTS ${MATLAB_ROOT}/bin
             DOC "The mexext program path"
            )

# find mex extension
execute_process(
    COMMAND ${MATLAB_MEXEXT_PATH}
    OUTPUT_STRIP_TRAILING_WHITESPACE
    OUTPUT_VARIABLE MATLAB_MEX_EXT
    )

set(MATLAB_LIBRARIES
  ${MATLAB_MEX_LIBRARY} ${MATLAB_MX_LIBRARY} ${MATLAB_ENG_LIBRARY} ${MATLAB_UT_LIBRARY}
  CACHE PATH "Libraries to link mex files"
)

######################### find flags using "mex -v"
# This is based on Kent Williams's post at
# http://www.cmake.org/pipermail/cmake/2013-December/056593.html

# mex -v outputs all the settings used for building MEX files, so
# we can use it to grab the important variables needed

# This sets MATLAB_CFLAGS, MATLAB_CLINKER_FLAGS, MATLAB_CLIBS (and same for CXX and Fortran)

macro(MATLAB_GETFLAGS FILENAME)
 execute_process(COMMAND ${MATLAB_MEX_PATH} -v -n ${FILENAME}
  OUTPUT_VARIABLE mexOut
  ERROR_VARIABLE mexErr)

# parse mex output line by line by turning file into CMake list of lines
string(REGEX REPLACE "\r?\n" ";" _mexOut "${mexOut}")
foreach(line ${_mexOut})
  if("${line}" MATCHES "[\t ]+DEFINES *:") # on Linux
    string(REGEX REPLACE "[\t ]+DEFINES *: *" "" mexDefines "${line}")
  elseif("${line}" MATCHES "[\t ]+COMPDEFINES *:") # on Windows
    string(REGEX REPLACE "[\t ]+COMPDEFINES *: *" "" mexDefines "${line}")
  elseif("${line}" MATCHES "[\t ]+LINKFLAGS *:")
    string(REGEX REPLACE "[\t ]+LINKFLAGS *: *" "" mexLdFlags "${line}")
    # get rid of /implib statement used on some older windows-matlab versions (refers to temp file)
    string(REGEX REPLACE "/implib:\".*\"" "" mexLdFlags "${mexLdFlags}")
  elseif("${line}" MATCHES "[\t ]+LINKLIBS *:")
    string(REGEX REPLACE "[\t ]+LINKLIBS *: *" "" mexLdLibs "${line}")
  elseif("${line}" MATCHES "[\t ]+LINKEXPORT *:")
    string(REGEX REPLACE "[\t ]+LINKEXPORT *: *" "" mexLdExport "${line}")
  elseif("${line}" MATCHES "[\t ]+CXXFLAGS *[:=]")
    string(REGEX REPLACE "[\t ]+CXXFLAGS *[:=] *" "" mexCxxFlags "${line}")
    #message(STATUS "mexcxx ${mexCxxFlags}")
  elseif("${line}" MATCHES "[\t ]+CFLAGS *[:=]")
    string(REGEX REPLACE "[\t ]+CFLAGS *[:=] *" "" mexCFlags "${line}")
  elseif("${line}" MATCHES "[\t ]+FFLAGS *[:=]")
    string(REGEX REPLACE "[\t ]+FFLAGS *[:=] *" "" mexFFlags "${line}")
  # pre-2014a flags
  elseif("${line}" MATCHES "[\t ]+CXXLIBS *[:=]")
    string(REGEX REPLACE "[\t ]+CXXLIBS *[:=] *" "" mexCxxLibs "${line}")
  elseif("${line}" MATCHES "[\t ]+CLIBS *[:=]")
    string(REGEX REPLACE "[\t ]+CLIBS *[:=] *" "" mexCLibs "${line}")
  elseif("${line}" MATCHES "[\t ]+FLIBS *[:=]")
    string(REGEX REPLACE "[\t ]+FLIBS *[:=] *" "" mexFLibs "${line}")
  elseif("${line}" MATCHES "[\t ]+LDFLAGS *[:=]")
    string(REGEX REPLACE "[\t ]+LDFLAGS *[:=] *" "" mexLdFlags "${line}")
  elseif("${line}" MATCHES "[\t ]+LDCXXFLAGS *[:=]")
    string(REGEX REPLACE "[\t ]+LDCXXFLAGS *[:=] *" "" mexLdCxxFlags "${line}")
  elseif("${line}" MATCHES "[\t ]+LDCFLAGS *[:=]")
    string(REGEX REPLACE "[\t ]+LDCFLAGS *[:=] *" "" mexLdCFlags "${line}")
  elseif("${line}" MATCHES "[\t ]+LDFLAGS *[:=]")
    string(REGEX REPLACE "[\t ]+LDFLAGS *[:=] *" "" mexLdFFlags "${line}")
  endif()
endforeach()
endmacro()

# Since 2014a or so, mex can only be used for one type of source and no longer
# reports all flags. We therefore need to run mex with different file types.
#### C
MATLAB_GETFLAGS(${PROJECT_SOURCE_DIR}/src/cmake/FindMATLAB_mextest.c)
set(MATLAB_CFLAGS "${mexDefines} ${mexCFlags}" CACHE STRING "Flags to compile C MATLAB Mex files (or libraries that link with them)")
set(MATLAB_CLINKER_FLAGS "${mexLdFlags} ${mexLdCFlags} ${mexLdExport}" CACHE STRING "Flags to link MATLAB C Mex files")
set(MATLAB_CLIBS "${mexLdLibs} ${mexCLibs}" CACHE STRING "Flags with libraries to link MATLAB C Mex files")

#### C++
MATLAB_GETFLAGS(${PROJECT_SOURCE_DIR}/src/cmake/FindMATLAB_mextest.cxx)
set(MATLAB_CXXFLAGS "${mexDefines} ${mexCxxFlags}" CACHE STRING "Flags to compile C++ MATLAB Mex files (or libraries that link with them)")
set(MATLAB_CXXLINKER_FLAGS "${mexLdFlags} ${mexLdCxxFlags} ${mexLdExport}" CACHE STRING "Flags to link MATLAB C++ Mex files")
set(MATLAB_CXXLIBS "${mexLdLibs} ${mexCxxLibs}" CACHE STRING "Flags with libraries to link MATLAB C++ Mex files")

#### Fortran
MATLAB_GETFLAGS(${PROJECT_SOURCE_DIR}/src/cmake/FindMATLAB_mextest.f)
set(MATLAB_FFLAGS "${mexDefines} ${mexFFlags}" CACHE STRING "Flags to compile Fortran MATLAB Mex files (or libraries that link with them)")
set(MATLAB_FLINKER_FLAGS "${mexLdFlags} ${mexLdFFlags} ${mexLdExport}" CACHE STRING "Flags to link MATLAB Fortran Mex files")
set(MATLAB_FLIBS "${mexLdLibs} ${mexFLibs}" CACHE STRING "Flags with libraries to link MATLAB Fortran Mex files")

# handle the QUIETLY and REQUIRED arguments and set MATLAB_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MATLAB "MATLAB not found. If you do have it, set MATLAB_ROOT and reconfigure"
  MATLAB_ROOT MATLAB_INCLUDE_DIR  MATLAB_LIBRARIES
  MATLAB_MEX_PATH
  MATLAB_MEXEXT_PATH
  MATLAB_MEX_EXT
)

mark_as_advanced(
  MATLAB_EXE_PATH
  MATLAB_LIBRARIES
  MATLAB_MEX_LIBRARY
  MATLAB_MX_LIBRARY
  MATLAB_ENG_LIBRARY
  MATLAB_INCLUDE_DIR
  MATLAB_FOUND
  MATLAB_MAT_LIBRARY
  MATLAB_MEX_PATH
  MATLAB_MEXEXT_PATH
  MATLAB_MEX_EXT
  MATLAB_CFLAGS
  MATLAB_CXXFLAGS
  MATLAB_FFLAGS
  MATLAB_CLINKER_FLAGS
  MATLAB_CXXLINKER_FLAGS
  MATLAB_FLINKER_FLAGS
  MATLAB_CLIBS
  MATLAB_CXXLIBS
  MATLAB_FLIBS
)

 

CMakeLists.txt

 

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

rpm -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%]

 

Actual Compilation

 

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 -lopencv_imgcodecs .. 2>&1 | tee cmakelog.txt

PS: Please NOTE that It needs version 4.4X of gcc to compile the first part due to the version of boost, cuda etc on this cluster

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. 
At this point onlym just do this: module load compilers/gcc-4.7.1
make 2>&1 | tee makelog2.txt
make install 2>&1 | tee makeInstalllog.txt

>>>>>>>>>
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 -lopencv_imgcodecs .. 2>&1 | tee cmakelog.txt
-- The C compiler identification is GNU 4.4.7
-- The CXX compiler identification is GNU 4.4.7
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- 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: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- 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)
-- 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/lmdb/usr/local/include
-- 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
-- Found PkgConfig: /usr/bin/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)
-- Found PythonInterp: /sw/python/2.7.1-shared/bin/python2.7 (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               :   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        :   ON
--   CPU_ONLY          :   OFF
--   USE_OPENCV        :   ON
--   USE_LEVELDB       :   ON
--   USE_LMDB          :   ON
--   ALLOW_LMDB_NOLOCK :   OFF
--
-- Dependencies:
--   BLAS              :   Yes (Atlas)
--   Boost             :   Yes (ver. 1.60)
--   glog              :   Yes
--   gflags            :   Yes
--   protobuf          :   Yes (ver. 3.0.0)
--   lmdb              :   Yes (ver. 0.9.70)
--   LevelDB           :   Yes (ver. 1.18)
--   Snappy            :   Yes (ver. 1.1.3)
--   OpenCV            :   Yes (ver. 3.1.0)
--   CUDA              :   Yes (ver. 7.5)
--
-- NVIDIA CUDA:
--   Target GPU(s)     :   Auto
--   GPU arch(s)       :   sm_20
--   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

>>>>>>>>> 
First attempt:

make
make 2>&1 | tee makelog.txt
[  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

snip <<< CLIP
[ 97%] Building CXX object examples/CMakeFiles/convert_cifar_data.dir/cifar10/convert_cifar_data.cpp.o
[ 98%] Linking CXX executable cifar10/convert_cifar_data
[ 98%] Built target convert_cifar_data
Scanning dependencies of target pycaffe
[ 98%] Building CXX object python/CMakeFiles/pycaffe.dir/caffe/_caffe.cpp.o
In file included from /sw/library/boost/1.60.0/ser/include/boost/type_traits/ice.hpp:15,
                 from /sw/library/boost/1.60.0/ser/include/boost/python/detail/def_helper.hpp:9,
                 from /sw/library/boost/1.60.0/ser/include/boost/python/class.hpp:29,
                 from /sw/library/boost/1.60.0/ser/include/boost/python.hpp:18,
                 from /sw/caffe/caffe-master/python/caffe/_caffe.cpp:7:
/sw/library/boost/1.60.0/ser/include/boost/type_traits/detail/ice_or.hpp:17: note: #pragma message: NOTE: Use of this header (ice_or.hpp) is deprecated
In file included from /sw/library/boost/1.60.0/ser/include/boost/type_traits/ice.hpp:16,
                 from /sw/library/boost/1.60.0/ser/include/boost/python/detail/def_helper.hpp:9,
                 from /sw/library/boost/1.60.0/ser/include/boost/python/class.hpp:29,
                 from /sw/library/boost/1.60.0/ser/include/boost/python.hpp:18,
                 from /sw/caffe/caffe-master/python/caffe/_caffe.cpp:7:
/sw/library/boost/1.60.0/ser/include/boost/type_traits/detail/ice_and.hpp:18: note: #pragma message: NOTE: Use of this header (ice_and.hpp) is deprecated
In file included from /sw/library/boost/1.60.0/ser/include/boost/type_traits/ice.hpp:17,
                 from /sw/library/boost/1.60.0/ser/include/boost/python/detail/def_helper.hpp:9,
                 from /sw/library/boost/1.60.0/ser/include/boost/python/class.hpp:29,
                 from /sw/library/boost/1.60.0/ser/include/boost/python.hpp:18,
                 from /sw/caffe/caffe-master/python/caffe/_caffe.cpp:7:
/sw/library/boost/1.60.0/ser/include/boost/type_traits/detail/ice_not.hpp:17: note: #pragma message: NOTE: Use of this header (ice_not.hpp) is deprecated
In file included from /sw/library/boost/1.60.0/ser/include/boost/type_traits/ice.hpp:18,
                 from /sw/library/boost/1.60.0/ser/include/boost/python/detail/def_helper.hpp:9,
                 from /sw/library/boost/1.60.0/ser/include/boost/python/class.hpp:29,
                 from /sw/library/boost/1.60.0/ser/include/boost/python.hpp:18,
                 from /sw/caffe/caffe-master/python/caffe/_caffe.cpp:7:
/sw/library/boost/1.60.0/ser/include/boost/type_traits/detail/ice_eq.hpp:17: note: #pragma message: NOTE: Use of this header (ice_eq.hpp) is deprecated
[100%] Linking CXX shared library ../lib/_caffe.so
Creating symlink /sw/caffe/caffe-master/python/caffe/_caffe.so -> /sw/caffe/caffe-master/build/lib/_caffe.so
[100%] Built target pycaffe
Scanning dependencies of target matlab
[100%] Building Matlab interface: /sw/caffe/caffe-master/matlab/+caffe/private/caffe_.mex
Building with 'g++'.
cc1plus: error: unrecognized command line option "-std=c++11"

make[2]: *** [../matlab/+caffe/private/caffe_.mex] Error 255
make[1]: *** [matlab/CMakeFiles/matlab.dir/all] Error 2
make: *** [all] Error 2


>>>>>>>>
module load compilers/gcc-4.7.1
make 2>&1 | tee makelog2.txt
-- Boost version: 1.60.0
-- Found the following Boost libraries:
--   system
--   thread
--   filesystem
--   chrono
--   date_time
--   atomic
-- Found gflags  (include: /sw/caffe/gflags/usr/local/include, library: /sw/caffe/gflags/usr/local/lib/libgflags.a)
-- Found glog    (include: /sw/caffe/glog/0.3.3/include, library: /sw/caffe/glog/0.3.3/lib/libglog.so)
-- Found PROTOBUF Compiler: /sw/caffe/protobuf/bin/protoc
-- Found lmdb    (include: /sw/caffe/lmdb/usr/local/include, library: /sw/caffe/lmdb/usr/local/lib/liblmdb.so)
-- Found LevelDB (include: /sw/caffe/leveldb/include, library: /sw/caffe/leveldb/lib/libleveldb.so)
-- 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
-- LIBS3.1.0
-- OpenCV found ()
-- 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 (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.
Not enough input arguments.
-- 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        :   ON
--   CPU_ONLY          :   OFF
--   USE_OPENCV        :   ON
--   USE_LEVELDB       :   ON
--   USE_LMDB          :   ON
--   ALLOW_LMDB_NOLOCK :   OFF
--
-- Dependencies:
--   BLAS              :   Yes (Atlas)
--   Boost             :   Yes (ver. 1.60)
--   glog              :   Yes
--   gflags            :   Yes
--   protobuf          :   Yes (ver. 3.0.0)
--   lmdb              :   Yes (ver. 0.9.70)
--   LevelDB           :   Yes (ver. 1.18)
--   Snappy            :   Yes (ver. 1.1.3)
--   OpenCV            :   Yes (ver. 3.1.0)
--   CUDA              :   Yes (ver. 7.5)
--
-- NVIDIA CUDA:
--   Target GPU(s)     :   Auto
--   GPU arch(s)       :   sm_20
--   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
-- Configuring done
-- Generating done
-- Build files have been written to: /sw/caffe/caffe-master/build
[  1%] Built target proto
Scanning dependencies of target caffe
[  2%] Linking CXX shared library ../../lib/libcaffe.so
[ 80%] Built target caffe
[ 82%] Linking CXX executable device_query
[ 82%] Built target device_query
[ 82%] Linking CXX executable compute_image_mean
[ 83%] Built target compute_image_mean
[ 83%] Linking CXX executable extract_features
[ 84%] Built target extract_features
[ 86%] Linking CXX executable upgrade_net_proto_text
[ 86%] Built target upgrade_net_proto_text
[ 87%] Linking CXX executable finetune_net
[ 87%] Built target finetune_net
[ 89%] Linking CXX executable caffe
[ 89%] Built target caffe.bin
[ 90%] Linking CXX executable upgrade_solver_proto_text
[ 90%] Built target upgrade_solver_proto_text
[ 90%] Linking CXX executable test_net
[ 90%] Built target test_net
[ 90%] Linking CXX executable net_speed_benchmark
[ 91%] Built target net_speed_benchmark
[ 91%] Linking CXX executable upgrade_net_proto_binary
[ 93%] Built target upgrade_net_proto_binary
[ 94%] Linking CXX executable convert_imageset
[ 94%] Built target convert_imageset
[ 94%] Linking CXX executable train_net
[ 95%] Built target train_net
[ 95%] Linking CXX executable mnist/convert_mnist_data
[ 95%] Built target convert_mnist_data
[ 95%] Linking CXX executable siamese/convert_mnist_siamese_data
[ 97%] Built target convert_mnist_siamese_data
[ 97%] Linking CXX executable cpp_classification/classification
[ 97%] Built target classification
[ 98%] Linking CXX executable cifar10/convert_cifar_data
[ 98%] Built target convert_cifar_data
[100%] Linking CXX shared library ../lib/_caffe.so
Creating symlink /sw/caffe/caffe-master/python/caffe/_caffe.so -> /sw/caffe/caffe-master/build/lib/_caffe.so
[100%] Built target pycaffe
[100%] Building Matlab interface: /sw/caffe/caffe-master/matlab/+caffe/private/caffe_.mex
Building with 'g++'.
MEX completed successfully.
[100%] Built target matlab

SUCCESS!!!!!! 
make install 2>&1 | tee makeInstalllog.txt
[  1%] Built target proto
[ 80%] Built target caffe
[ 82%] Built target device_query
[ 83%] Built target compute_image_mean
[ 84%] Built target extract_features
[ 86%] Built target upgrade_net_proto_text
[ 87%] Built target finetune_net
[ 89%] Built target caffe.bin
[ 90%] Built target upgrade_solver_proto_text
[ 90%] Built target test_net
[ 91%] Built target net_speed_benchmark
[ 93%] Built target upgrade_net_proto_binary
[ 94%] Built target convert_imageset
[ 95%] Built target train_net
[ 95%] Built target convert_mnist_data
[ 97%] Built target convert_mnist_siamese_data
[ 97%] Built target classification
[ 98%] Built target convert_cifar_data
[100%] Built target pycaffe
[100%] Building Matlab interface: /sw/caffe/caffe-master/matlab/+caffe/private/caffe_.mex
Building with 'g++'.
MEX completed successfully.
[100%] Built target matlab
Install the project...
-- Install configuration: "Release"
-- Installing: /sw/caffe/caffe/share/Caffe/CaffeConfig.cmake
-- Installing: /sw/caffe/caffe/share/Caffe/CaffeTargets.cmake
-- Installing: /sw/caffe/caffe/share/Caffe/CaffeTargets-release.cmake
-- Installing: /sw/caffe/caffe/include/caffe
-- Installing: /sw/caffe/caffe/include/caffe/blob.hpp
-- Installing: /sw/caffe/caffe/include/caffe/caffe.hpp
-- Installing: /sw/caffe/caffe/include/caffe/common.hpp
-- Installing: /sw/caffe/caffe/include/caffe/data_reader.hpp
-- Installing: /sw/caffe/caffe/include/caffe/data_transformer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/filler.hpp
-- Installing: /sw/caffe/caffe/include/caffe/internal_thread.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layer_factory.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers
-- Installing: /sw/caffe/caffe/include/caffe/layers/absval_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/accuracy_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/argmax_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/base_conv_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/base_data_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/batch_norm_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/batch_reindex_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/bias_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/bnll_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/concat_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/contrastive_loss_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/conv_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/crop_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/cudnn_conv_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/cudnn_lcn_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/cudnn_lrn_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/cudnn_pooling_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/cudnn_relu_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/cudnn_sigmoid_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/cudnn_softmax_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/cudnn_tanh_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/data_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/deconv_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/dropout_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/dummy_data_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/eltwise_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/elu_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/embed_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/euclidean_loss_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/exp_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/filter_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/flatten_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/hdf5_data_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/hdf5_output_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/hinge_loss_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/im2col_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/image_data_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/infogain_loss_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/inner_product_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/input_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/log_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/loss_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/lrn_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/memory_data_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/multinomial_logistic_loss_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/mvn_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/neuron_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/pooling_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/power_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/prelu_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/python_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/reduction_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/relu_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/reshape_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/scale_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/sigmoid_cross_entropy_loss_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/sigmoid_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/silence_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/slice_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/softmax_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/softmax_loss_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/split_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/spp_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/tanh_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/threshold_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/tile_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/layers/window_data_layer.hpp
-- Installing: /sw/caffe/caffe/include/caffe/net.hpp
-- Installing: /sw/caffe/caffe/include/caffe/parallel.hpp
-- Installing: /sw/caffe/caffe/include/caffe/sgd_solvers.hpp
-- Installing: /sw/caffe/caffe/include/caffe/solver.hpp
-- Installing: /sw/caffe/caffe/include/caffe/solver_factory.hpp
-- Installing: /sw/caffe/caffe/include/caffe/syncedmem.hpp
-- Installing: /sw/caffe/caffe/include/caffe/test
-- Installing: /sw/caffe/caffe/include/caffe/test/test_caffe_main.hpp
-- Installing: /sw/caffe/caffe/include/caffe/test/test_gradient_check_util.hpp
-- Installing: /sw/caffe/caffe/include/caffe/util
-- Installing: /sw/caffe/caffe/include/caffe/util/benchmark.hpp
-- Installing: /sw/caffe/caffe/include/caffe/util/blocking_queue.hpp
-- Installing: /sw/caffe/caffe/include/caffe/util/cudnn.hpp
-- Installing: /sw/caffe/caffe/include/caffe/util/db.hpp
-- Installing: /sw/caffe/caffe/include/caffe/util/db_leveldb.hpp
-- Installing: /sw/caffe/caffe/include/caffe/util/db_lmdb.hpp
-- Installing: /sw/caffe/caffe/include/caffe/util/device_alternate.hpp
-- Installing: /sw/caffe/caffe/include/caffe/util/format.hpp
-- Installing: /sw/caffe/caffe/include/caffe/util/gpu_util.cuh
-- Installing: /sw/caffe/caffe/include/caffe/util/hdf5.hpp
-- Installing: /sw/caffe/caffe/include/caffe/util/im2col.hpp
-- Installing: /sw/caffe/caffe/include/caffe/util/insert_splits.hpp
-- Installing: /sw/caffe/caffe/include/caffe/util/io.hpp
-- Installing: /sw/caffe/caffe/include/caffe/util/math_functions.hpp
-- Installing: /sw/caffe/caffe/include/caffe/util/mkl_alternate.hpp
-- Installing: /sw/caffe/caffe/include/caffe/util/rng.hpp
-- Installing: /sw/caffe/caffe/include/caffe/util/signal_handler.h
-- Installing: /sw/caffe/caffe/include/caffe/util/upgrade_proto.hpp
-- Installing: /sw/caffe/caffe/include/caffe/proto/caffe.pb.h
-- Installing: /sw/caffe/caffe/lib/libcaffe.so.1.0.0-rc3
-- Installing: /sw/caffe/caffe/lib/libcaffe.so
-- Set runtime path of "/sw/caffe/caffe/lib/libcaffe.so.1.0.0-rc3" to "/sw/caffe/caffe/lib:/sw/library/boost/1.60.0/ser/lib:/sw/library/hdf5/1.8.7/lib:/usr/local/cuda/lib64:/sw/cuda/cuda_7.5.18/lib64:/sw/library/lapack/lapack-3.6.0/3.6.0/lib64:/sw/library/atlas/3.10.2/lib:/sw/python/2.7.1-shared/lib"
-- Installing: /sw/caffe/caffe/lib/libproto.a
-- Installing: /sw/caffe/caffe/python/caffe/proto/caffe_pb2.py
-- Installing: /sw/caffe/caffe/python/caffe/proto/__init__.py
-- Installing: /sw/caffe/caffe/bin/caffe
-- Set runtime path of "/sw/caffe/caffe/bin/caffe" to "/sw/caffe/caffe/lib:/sw/library/boost/1.60.0/ser/lib:/sw/library/hdf5/1.8.7/lib:/usr/local/cuda/lib64:/sw/cuda/cuda_7.5.18/lib64:/sw/library/lapack/lapack-3.6.0/3.6.0/lib64:/sw/library/atlas/3.10.2/lib:/sw/python/2.7.1-shared/lib"
-- Installing: /sw/caffe/caffe/bin/compute_image_mean
-- Set runtime path of "/sw/caffe/caffe/bin/compute_image_mean" to "/sw/caffe/caffe/lib:/sw/library/boost/1.60.0/ser/lib:/sw/library/hdf5/1.8.7/lib:/usr/local/cuda/lib64:/sw/cuda/cuda_7.5.18/lib64:/sw/library/lapack/lapack-3.6.0/3.6.0/lib64:/sw/library/atlas/3.10.2/lib:/sw/python/2.7.1-shared/lib"
-- Installing: /sw/caffe/caffe/bin/convert_imageset
-- Set runtime path of "/sw/caffe/caffe/bin/convert_imageset" to "/sw/caffe/caffe/lib:/sw/library/boost/1.60.0/ser/lib:/sw/library/hdf5/1.8.7/lib:/usr/local/cuda/lib64:/sw/cuda/cuda_7.5.18/lib64:/sw/library/lapack/lapack-3.6.0/3.6.0/lib64:/sw/library/atlas/3.10.2/lib:/sw/python/2.7.1-shared/lib"
-- Installing: /sw/caffe/caffe/bin/device_query
-- Set runtime path of "/sw/caffe/caffe/bin/device_query" to "/sw/caffe/caffe/lib:/sw/library/boost/1.60.0/ser/lib:/sw/library/hdf5/1.8.7/lib:/usr/local/cuda/lib64:/sw/cuda/cuda_7.5.18/lib64:/sw/library/lapack/lapack-3.6.0/3.6.0/lib64:/sw/library/atlas/3.10.2/lib:/sw/python/2.7.1-shared/lib"
-- Installing: /sw/caffe/caffe/bin/extract_features
-- Set runtime path of "/sw/caffe/caffe/bin/extract_features" to "/sw/caffe/caffe/lib:/sw/library/boost/1.60.0/ser/lib:/sw/library/hdf5/1.8.7/lib:/usr/local/cuda/lib64:/sw/cuda/cuda_7.5.18/lib64:/sw/library/lapack/lapack-3.6.0/3.6.0/lib64:/sw/library/atlas/3.10.2/lib:/sw/python/2.7.1-shared/lib"
-- Installing: /sw/caffe/caffe/bin/finetune_net
-- Set runtime path of "/sw/caffe/caffe/bin/finetune_net" to "/sw/caffe/caffe/lib:/sw/library/boost/1.60.0/ser/lib:/sw/library/hdf5/1.8.7/lib:/usr/local/cuda/lib64:/sw/cuda/cuda_7.5.18/lib64:/sw/library/lapack/lapack-3.6.0/3.6.0/lib64:/sw/library/atlas/3.10.2/lib:/sw/python/2.7.1-shared/lib"
-- Installing: /sw/caffe/caffe/bin/net_speed_benchmark
-- Set runtime path of "/sw/caffe/caffe/bin/net_speed_benchmark" to "/sw/caffe/caffe/lib:/sw/library/boost/1.60.0/ser/lib:/sw/library/hdf5/1.8.7/lib:/usr/local/cuda/lib64:/sw/cuda/cuda_7.5.18/lib64:/sw/library/lapack/lapack-3.6.0/3.6.0/lib64:/sw/library/atlas/3.10.2/lib:/sw/python/2.7.1-shared/lib"
-- Installing: /sw/caffe/caffe/bin/test_net
-- Set runtime path of "/sw/caffe/caffe/bin/test_net" to "/sw/caffe/caffe/lib:/sw/library/boost/1.60.0/ser/lib:/sw/library/hdf5/1.8.7/lib:/usr/local/cuda/lib64:/sw/cuda/cuda_7.5.18/lib64:/sw/library/lapack/lapack-3.6.0/3.6.0/lib64:/sw/library/atlas/3.10.2/lib:/sw/python/2.7.1-shared/lib"
-- Installing: /sw/caffe/caffe/bin/train_net
-- Set runtime path of "/sw/caffe/caffe/bin/train_net" to "/sw/caffe/caffe/lib:/sw/library/boost/1.60.0/ser/lib:/sw/library/hdf5/1.8.7/lib:/usr/local/cuda/lib64:/sw/cuda/cuda_7.5.18/lib64:/sw/library/lapack/lapack-3.6.0/3.6.0/lib64:/sw/library/atlas/3.10.2/lib:/sw/python/2.7.1-shared/lib"
-- Installing: /sw/caffe/caffe/bin/upgrade_net_proto_binary
-- Set runtime path of "/sw/caffe/caffe/bin/upgrade_net_proto_binary" to "/sw/caffe/caffe/lib:/sw/library/boost/1.60.0/ser/lib:/sw/library/hdf5/1.8.7/lib:/usr/local/cuda/lib64:/sw/cuda/cuda_7.5.18/lib64:/sw/library/lapack/lapack-3.6.0/3.6.0/lib64:/sw/library/atlas/3.10.2/lib:/sw/python/2.7.1-shared/lib"
-- Installing: /sw/caffe/caffe/bin/upgrade_net_proto_text
-- Set runtime path of "/sw/caffe/caffe/bin/upgrade_net_proto_text" to "/sw/caffe/caffe/lib:/sw/library/boost/1.60.0/ser/lib:/sw/library/hdf5/1.8.7/lib:/usr/local/cuda/lib64:/sw/cuda/cuda_7.5.18/lib64:/sw/library/lapack/lapack-3.6.0/3.6.0/lib64:/sw/library/atlas/3.10.2/lib:/sw/python/2.7.1-shared/lib"
-- Installing: /sw/caffe/caffe/bin/upgrade_solver_proto_text
-- Set runtime path of "/sw/caffe/caffe/bin/upgrade_solver_proto_text" to "/sw/caffe/caffe/lib:/sw/library/boost/1.60.0/ser/lib:/sw/library/hdf5/1.8.7/lib:/usr/local/cuda/lib64:/sw/cuda/cuda_7.5.18/lib64:/sw/library/lapack/lapack-3.6.0/3.6.0/lib64:/sw/library/atlas/3.10.2/lib:/sw/python/2.7.1-shared/lib"
-- Installing: /sw/caffe/caffe/bin/convert_cifar_data
-- Set runtime path of "/sw/caffe/caffe/bin/convert_cifar_data" to "/sw/caffe/caffe/lib:/sw/library/boost/1.60.0/ser/lib:/sw/library/hdf5/1.8.7/lib:/usr/local/cuda/lib64:/sw/cuda/cuda_7.5.18/lib64:/sw/library/lapack/lapack-3.6.0/3.6.0/lib64:/sw/library/atlas/3.10.2/lib:/sw/python/2.7.1-shared/lib"
-- Installing: /sw/caffe/caffe/bin/classification
-- Set runtime path of "/sw/caffe/caffe/bin/classification" to "/sw/caffe/caffe/lib:/sw/library/boost/1.60.0/ser/lib:/sw/library/hdf5/1.8.7/lib:/usr/local/cuda/lib64:/sw/cuda/cuda_7.5.18/lib64:/sw/library/lapack/lapack-3.6.0/3.6.0/lib64:/sw/library/atlas/3.10.2/lib:/sw/python/2.7.1-shared/lib"
-- Installing: /sw/caffe/caffe/bin/convert_mnist_data
-- Set runtime path of "/sw/caffe/caffe/bin/convert_mnist_data" to "/sw/caffe/caffe/lib:/sw/library/boost/1.60.0/ser/lib:/sw/library/hdf5/1.8.7/lib:/usr/local/cuda/lib64:/sw/cuda/cuda_7.5.18/lib64:/sw/library/lapack/lapack-3.6.0/3.6.0/lib64:/sw/library/atlas/3.10.2/lib:/sw/python/2.7.1-shared/lib"
-- Installing: /sw/caffe/caffe/bin/convert_mnist_siamese_data
-- Set runtime path of "/sw/caffe/caffe/bin/convert_mnist_siamese_data" to "/sw/caffe/caffe/lib:/sw/library/boost/1.60.0/ser/lib:/sw/library/hdf5/1.8.7/lib:/usr/local/cuda/lib64:/sw/cuda/cuda_7.5.18/lib64:/sw/library/lapack/lapack-3.6.0/3.6.0/lib64:/sw/library/atlas/3.10.2/lib:/sw/python/2.7.1-shared/lib"
-- Installing: /sw/caffe/caffe/python/classify.py
-- Installing: /sw/caffe/caffe/python/detect.py
-- Installing: /sw/caffe/caffe/python/draw_net.py
-- Installing: /sw/caffe/caffe/python/requirements.txt
-- Installing: /sw/caffe/caffe/python/caffe/__init__.py
-- Installing: /sw/caffe/caffe/python/caffe/classifier.py
-- Installing: /sw/caffe/caffe/python/caffe/coord_map.py
-- Installing: /sw/caffe/caffe/python/caffe/detector.py
-- Installing: /sw/caffe/caffe/python/caffe/draw.py
-- Installing: /sw/caffe/caffe/python/caffe/io.py
-- Installing: /sw/caffe/caffe/python/caffe/net_spec.py
-- Installing: /sw/caffe/caffe/python/caffe/pycaffe.py
-- Installing: /sw/caffe/caffe/python/caffe/_caffe.so
-- Set runtime path of "/sw/caffe/caffe/python/caffe/_caffe.so" to "/sw/caffe/caffe/lib:/sw/python/2.7.1-shared/lib:/sw/library/boost/1.60.0/ser/lib:/sw/library/hdf5/1.8.7/lib:/usr/local/cuda/lib64:/sw/cuda/cuda_7.5.18/lib64:/sw/library/lapack/lapack-3.6.0/3.6.0/lib64:/sw/library/atlas/3.10.2/lib"
-- Installing: /sw/caffe/caffe/python/caffe/imagenet
-- Installing: /sw/caffe/caffe/python/caffe/imagenet/ilsvrc_2012_mean.npy
-- Up-to-date: /sw/caffe/caffe/python/caffe/proto
-- Installing: /sw/caffe/caffe/python/caffe/proto/__init__.py
-- Installing: /sw/caffe/caffe/python/caffe/proto/caffe_pb2.py
-- Installing: /sw/caffe/caffe/python/caffe/test
-- Installing: /sw/caffe/caffe/python/caffe/test/test_coord_map.py
-- Installing: /sw/caffe/caffe/python/caffe/test/test_io.py
-- Installing: /sw/caffe/caffe/python/caffe/test/test_layer_type_list.py
-- Installing: /sw/caffe/caffe/python/caffe/test/test_net.py
-- Installing: /sw/caffe/caffe/python/caffe/test/test_net_spec.py
-- Installing: /sw/caffe/caffe/python/caffe/test/test_python_layer.py
-- Installing: /sw/caffe/caffe/python/caffe/test/test_python_layer_with_param_str.py
-- Installing: /sw/caffe/caffe/python/caffe/test/test_solver.py
CMake Error at matlab/cmake_install.cmake:36 (file):
  file INSTALL cannot find
  "/sw/caffe/caffe-master/matlab/+caffe/private/caffe_.mex".
Call Stack (most recent call first):
  cmake_install.cmake:65 (include)



make: *** [install] Error 1

 

 

Reference

  1. https://github.com/BVLC/caffe
  2. http://caffe.berkeleyvision.org/
  3. https://github.com/casadi/casadi/blob/master/cmake/FindMATLAB.cmake

Â