amd / OpenCL-caffe

This is a Experimental version of OpenCL by AMD Research, we now recommend you to use The official BVLC Caffe OpenCL branch is over at Caffe branch now at https://github.com/BVLC/caffe/tree/opencl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

multiarray import error

ebadawy opened this issue · comments

It seems that it can not import multiarray for numpy with me. However, importing numpy in a regular python script throws no error.
That's what I get when running cmake ..

-- Boost version: 1.60.0
-- Found the following Boost libraries:
--   system
--   thread
--   chrono
--   date_time
--   atomic
-- Found gflags  (include: /usr/include, library: /usr/lib64/libgflags.so)
-- Found glog    (include: /usr/include, library: /usr/lib64/libglog.so)
-- Found PROTOBUF Compiler: /usr/bin/protoc
-- Found lmdb    (include: /usr/include, library: /usr/lib64/liblmdb.so)
-- Found LevelDB (include: /usr/include, library: /usr/lib64/libleveldb.so)
-- Found Snappy  (include: /usr/include, library: /usr/lib64/libsnappy.so)
-- Found OpenCL  (include: /usr/include, library: /lib64/libOpenCL.so)
-- Found clBLAS  (include: /opt/clBLAS/include, library: /usr/lib64/libclBLAS.so)
-- OpenCV found (/usr/local/share/OpenCV)
-- Found OpenBLAS libraries: /opt/OpenBLAS/lib/libopenblas.so
-- Found OpenBLAS include: /usr/include
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.5/site-packages/numpy/__init__.py", line 180, in <module>
    from . import add_newdocs
  File "/usr/lib/python3.5/site-packages/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/usr/lib/python3.5/site-packages/numpy/lib/__init__.py", line 8, in <module>
    from .type_check import *
  File "/usr/lib/python3.5/site-packages/numpy/lib/type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "/usr/lib/python3.5/site-packages/numpy/core/__init__.py", line 14, in <module>
    from . import multiarray
ImportError: cannot import name multiarray
-- Could NOT find NumPy (missing:  NUMPY_INCLUDE_DIR NUMPY_VERSION) (Required is at least version "1.7.1")
-- Boost version: 1.60.0
-- Found the following Boost libraries:
--   python
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
-- Python interface is disabled or not all required dependecies found. Building without it...
-- 
-- ******************* Caffe Configuration Summary *******************
-- General:
--   Version           :   <TODO> (Caffe doesn't declare its version in headers)
--   Git               :   aaa1c2c
--   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      :   OFF
--   BUILD_docs        :   ON
--   CPU_ONLY          :   OFF
-- 
-- Dependencies:
--   BLAS              :   Yes (open)
--   Boost             :   Yes (ver. 1.60)
--   glog              :   Yes
--   gflags            :   Yes
--   protobuf          :   Yes (ver. 2.6.1)
--   lmdb              :   Yes (ver. 0.9.18)
--   Snappy            :   Yes (ver. 1.1.3)
--   LevelDB           :   Yes (ver. 1.18)
--   OpenCV            :   Yes (ver. 3.1.0)
--   OpenCL            :   Yes
--   clBLAS            :   Yes
-- 
-- Documentaion:
--   Doxygen           :   No
--   config_file       :   
-- 
-- Install:
--   Install path      :   /home/ebadawy/git/OpenCL-caffe/build/install
-- 
-- Configuring done
CMake Warning (dev) at CMakeLists.txt:67 (add_dependencies):
  Policy CMP0046 is not set: Error on non-existent dependency in
  add_dependencies.  Run "cmake --help-policy CMP0046" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  The dependency target "pycaffe" of target "pytest" does not exist.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /home/ebadawy/git/OpenCL-caffe/build
commented

hello,l alse meet the same question,do you solve it ,please?@ebadawy

No, I didn't. I've switched to caffe from the main repo, not depending on the GPU anymore.

@ebadawy
The Caffe main repo now has an OpenCL variant if you want to use a GPU again.

commented

I downloaded the .tar.gz package for the version 1.8.0 from here-->(https://sourceforge.net/projects/numpy/files/NumPy/), unpacked it, moved inside the folder and run the commands:

python setup.py build --fcompiler=gnu95
python setup.py install --user

the method helps me my top question,so ,l hope it can help you!@ebadawy

@naibaf7 , That's great! I think I will give it a try.

@wqlw , I don't think that I'll switch back to this version, but thanks for sharing your solution in case anyone else face the same error.

This was experimental branch of Caffe for OpenCL, we know recommend you use the now official OpenCL port of Caffe in BVLC GitHub Repo at https://github.com/BVLC/caffe/tree/opencl