Hi all,

I'm trying to build Singa from source with OpenCL support on my Ubuntu
14.04 with AMD Radeon Mobility HD5650. Compilation and installation of
ViennaCL works alright.
Trying cmake -DUSE_MODULES=ON -DUSE_PYTHON=ON -DUSE_OPENCL=ON ..
in the build directory gives me the error:

   "CMake Error at cmake/Dependencies.cmake:95 (FIND_PACKAGE):
     By not providing "FindOpenCL.cmake" in CMAKE_MODULE_PATH this project has
     asked CMake to find a package configuration file provided by
   "OpenCL", but
     CMake did not find one.

     Could not fi..."

although I set several paths in environment variables in .bashrc:

   export
   
CMAKE_INCLUDE_PATH=/opt/AMDAPPSDK-3.0/include:/usr/local/include:$CMAKE_INCLUDE_PATH
   export
   
CMAKE_LIBRARY_PATH=/opt/AMDAPPSDK-3.0/lib:/usr/local/lib/cmake/viennacl:$CMAKE_LIBRARY_PATH
   export
   
LD_LIBRARY_PATH="/opt/AMDAPPSDK-3.0/lib/x86:/opt/AMDAPPSDK-3.0/lib/x86_64:/usr/local/lib/cmake/viennacl":$LD_LIBRARY_PATH
   export PATH=~/Downloads/ViennaCL-1.7.1:$PATH
   export OpenCL_DIR="/opt/AMDAPPSDK-3.0:/usr/local/lib/cmake/viennacl"
   export OPENCL_ROOT_DIR=/opt/AMDAPPSDK-3.0
   export AMDAPPSDKROOT="opt/AMDAPPSDK-3.0"

Somewhere I found, that adding a line to the cmake/Dependencies.cmake:
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "/usr/local/lib/cmake/viennacl")
will help, and something changed while executing cmake -DUSE...

   "-- Found OPENCL: /usr/lib/x86_64-linux-gnu/libOpenCL.so
   CMake Error at cmake/Dependencies.cmake:97 (MESSAGE):
     OpenCL was requested, but not found."

So OpenCL was found but on the next line again not recognized.
A further hack of the Dependencies.cmake, commenting out the following
lines:
     FIND_PACKAGE(OpenCL REQUIRED)
     IF(NOT OpenCL_FOUND)
#        MESSAGE(SEND_ERROR "OpenCL was requested, but not found.")
#    ELSE()
        #MESSAGE(STATUS "Found OpenCL headers at ${OpenCL_INCLUDE_DIRS}")
        INCLUDE_DIRECTORIES(SYSTEM ${OpenCL_INCLUDE_DIR})

lead to a successful cmake and make compilation (although with much
"unused variables" warnings).
Executing the unit tests with ./bin/test_singa then give me much code
output and 3 failed tests:
   [  FAILED  ] OpenCL_TensorMath.Bernoulli
   [  FAILED  ] OpenCL_TensorMath.Gaussian
   [  FAILED  ] OpenCL_TensorMath.Uniform

So my question: Is it a problem of the cmake configuration or do I have
i.e. only to add another directory to the environment variables or what
is wrong? :)

Best regards,
Holger

Reply via email to