kkurni opened a new issue #15998: Build MXNET with GPU but fail to import mxnet on CPU machine URL: https://github.com/apache/incubator-mxnet/issues/15998 ## Description I tried to build mxnet with WARP_CTC enabled. I need to run this mxnet on docker image with GPU But I also need to run testing on CPU machine. What is the build parameter that best for this purpose? I tried to build using this make parameter ``` make -j$(nproc) USE_OPENCV=0 USE_BLAS=openblas USE_CUDA=1 USE_CUDA_PATH=/usr/local/cuda USE_CUDNN=1 USE_MKLDNN=0 WARPCTC_PATH=$(HOME)/warp-ctc MXNET_PLUGINS+=plugin/warpctc/warpctc.mk ``` But I get error on CPU machine during the import mxnet ``` import mxnet as mx File "/root/.local/lib/python2.7/site-packages/mxnet-1.5.0-py2.7.egg/mxnet/__init__.py", line 24, in <module> from .context import Context, current_context, cpu, gpu, cpu_pinned File "/root/.local/lib/python2.7/site-packages/mxnet-1.5.0-py2.7.egg/mxnet/context.py", line 24, in <module> from .base import classproperty, with_metaclass, _MXClassPropertyMetaClass File "/root/.local/lib/python2.7/site-packages/mxnet-1.5.0-py2.7.egg/mxnet/base.py", line 213, in <module> _LIB = _load_lib() File "/root/.local/lib/python2.7/site-packages/mxnet-1.5.0-py2.7.egg/mxnet/base.py", line 204, in _load_lib lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL) File "/usr/lib/python2.7/ctypes/__init__.py", line 366, in __init__ self._handle = _dlopen(self._name, mode) ``` ## Environment info (Required) ``` ----------System Info---------- ('Platform :', 'Linux-4.9.137-0.1.ac.218.74.329.metal1.x86_64-x86_64-with-Ubuntu-18.04-bionic') ('system :', 'Linux') ('node :', '587cde01f292') ('release :', '4.9.137-0.1.ac.218.74.329.metal1.x86_64') ('version :', '#1 SMP Wed Dec 5 15:11:05 UTC 2018') ----------Hardware Info---------- ('machine :', 'x86_64') ('processor :', 'x86_64') Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 36 On-line CPU(s) list: 0-35 Thread(s) per core: 2 Core(s) per socket: 9 Socket(s): 2 NUMA node(s): 2 Vendor ID: GenuineIntel CPU family: 6 Model: 63 Model name: Intel(R) Xeon(R) CPU E5-2666 v3 @ 2.90GHz Stepping: 2 CPU MHz: 3200.195 CPU max MHz: 3500.0000 CPU min MHz: 1200.0000 BogoMIPS: 5800.11 Hypervisor vendor: Xen Virtualization type: full L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 25600K NUMA node0 CPU(s): 0-8,18-26 NUMA node1 CPU(s): 9-17,27-35 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq monitor est ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm invpcid_single kaiser fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt ida ----------Network Test---------- Setting timeout: 10 Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0069 sec, LOAD: 0.4071 sec. Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0088 sec, LOAD: 0.3336 sec. Timing for FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.0143 sec, LOAD: 0.0973 sec. Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0198 sec, LOAD: 0.0754 sec. Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.0266 sec, LOAD: 0.1091 sec. Timing for Gluon Tutorial(cn): https://zh.gluon.ai, DNS: 0.0143 sec, LOAD: 0.0627 sec. ``` Package used (Python/R/Scala/Julia): Python ``` Python 2.7.15+ (default, Nov 27 2018, 23:36:35) [GCC 7.3.0] on linux2 ``` ## Build info (Required if built from source) Compiler (gcc/clang/mingw/visual studio): ``` make -j$(nproc) USE_OPENCV=0 USE_BLAS=openblas USE_CUDA=1 USE_CUDA_PATH=/usr/local/cuda USE_CUDNN=1 USE_MKLDNN=0 WARPCTC_PATH=$(HOME)/warp-ctc MXNET_PLUGINS+=plugin/warpctc/warpctc.mk ``` MXNet commit hash: (Paste the output of `git rev-parse HEAD` here.) v1.5.x ``` commit 42746bc73e8bcb75bfcadd1398e6f71bc170fa10 (HEAD -> v1.5.x, origin/v1.5.x) ``` Build config: (Paste the content of config.mk, or the build command.) ``` make -j$(nproc) USE_OPENCV=0 USE_BLAS=openblas USE_CUDA=1 USE_CUDA_PATH=/usr/local/cuda USE_CUDNN=1 USE_MKLDNN=0 WARPCTC_PATH=$(HOME)/warp-ctc MXNET_PLUGINS+=plugin/warpctc/warpctc.mk ``` ## Error Message: (Paste the complete error message, including stack trace.) on CPU machine ``` import mxnet as mx File "/root/.local/lib/python2.7/site-packages/mxnet-1.5.0-py2.7.egg/mxnet/__init__.py", line 24, in <module> from .context import Context, current_context, cpu, gpu, cpu_pinned File "/root/.local/lib/python2.7/site-packages/mxnet-1.5.0-py2.7.egg/mxnet/context.py", line 24, in <module> from .base import classproperty, with_metaclass, _MXClassPropertyMetaClass File "/root/.local/lib/python2.7/site-packages/mxnet-1.5.0-py2.7.egg/mxnet/base.py", line 213, in <module> _LIB = _load_lib() File "/root/.local/lib/python2.7/site-packages/mxnet-1.5.0-py2.7.egg/mxnet/base.py", line 204, in _load_lib lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL) File "/usr/lib/python2.7/ctypes/__init__.py", line 366, in __init__ self._handle = _dlopen(self._name, mode) ``` ## Minimum reproducible example (If you are using your own code, please provide a short script that reproduces the error. Otherwise, please provide link to the existing example.) ## Steps to reproduce (Paste the commands you ran that produced the error.) 1. build with CUDA enabled 2. import mxnet on CPU machine
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services