Reputation: 60
I tried to install mxnet as follows: Operating System: RHEL 6.9 (2.6.32-696.el6.x86_64) Compiler: gcc (GCC) 5.3.0 also tried with 6.2.0
A. OpenBLAS build as
1. git clone https://github.com/xianyi/OpenBLAS.git
2. cd OpenBLAS
3. make DYNAMIC_ARCH=1 NO_AVX2=1
4. make PREFIX=~/test/OpenBLAS-1.0 install
B. mxnet install
1. git clone --recursive https://github.com/dmlc/mxnet
2. cd mxnet
3. modified make/config.mk as follows
USE_OPENCV = 0
USE_BLAS = openblas (#Line no : 93)
ADD_LDFLAGS = -I/home_dir/test/OpenBLAS-1.0/lib
ADD_CFLAGS = -I/home_dir/test/OpenBLAS-1.0/include
4. make -j4 #It successfully created lib dir containing libmxnet.a and libmxnet.so
Then exported PYTHONPATH as export
`PYTHONPATH=~/test/mxnet/python/`
After running python in interactive mode I get the following error:
[c244728_lx@brainiac-login-0001 lib]$ python --version
Python 3.5.1
[c244728_lx@brainiac-login-0001 lib]$ python
Python 3.5.1 (default, Mar 2 2016, 08:58:17)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mxnet
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/c244728_lx/test/mxnet/python/mxnet/__init__.py", line 25, in <module>
from .base import MXNetError
File "/home/c244728_lx/test/mxnet/python/mxnet/base.py", line 86, in <module>
_LIB = _load_lib()
File "/home/c244728_lx/test/mxnet/python/mxnet/base.py", line 78, in _load_lib
lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL)
File "/lrlhps/apps/python/python-3.5.1/lib/python3.5/ctypes/__init__.py", line 347, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /home/c244728_lx/test/mxnet/python/mxnet/../../lib/libmxnet.so: undefined symbol: cblas_ddot
>>>
For more description please follow: github issue
Upvotes: 0
Views: 884
Reputation: 60
Specifying
make -j8 ADD_CFLAGS="-I/home_dir/OpenBLAS_build/include" ADD_LDFLAGS="-L/home_dir/OpenBLAS_build/lib -lopenblas"
and exporting path
LD_LIBRARY_PATH=/OpenBLAS_build/lib:$LD_LIBRARY_PATH
solved the issue.
Upvotes: 1