apache / mxnet

Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more
https://mxnet.apache.org
Apache License 2.0
20.78k stars 6.79k forks source link

Compilation error #17145

Open yelandgit opened 4 years ago

yelandgit commented 4 years ago

I'm trying to compile MXNet with different configurations in Linux Mint 19.2, RTX 2080 Ti

USE_CUDA = 0
USE_CUDNN = 1
USE_BLAS = open
USE_LAPACK = 1
USE_OPENCV = 1
USE_OPENMP = 1
USE_JEMALLOC = 0
USE_MKL_IF_AVAILABLE = 0
USE_CPP_PACKAGE = 1

ctest = ok (151 sec)

Ok, working

USE_CUDA = 1
USE_CUDNN = 0
USE_BLAS = open
USE_LAPACK = 1
USE_OPENCV = 1
USE_OPENMP = 1
USE_JEMALLOC = 0
USE_MKL_IF_AVAILABLE = 0
USE_CPP_PACKAGE = 1

ctest = ok (656 sec)

Ok, working again

USE_CUDA = 0
USE_CUDNN = 1
USE_BLAS = open
USE_LAPACK = 1
USE_OPENCV = 1
USE_OPENMP = 1
USE_JEMALLOC = 0
USE_MKL_IF_AVAILABLE = 1
USE_CPP_PACKAGE = 1

ctest = failed (1500 sec)

Why the ctest is failed?

USE_CUDA = 0
USE_CUDNN = 0
USE_BLAS = open
USE_LAPACK = 1
USE_OPENCV = 1
USE_OPENMP = 1
USE_JEMALLOC = 1
USE_MKL_IF_AVAILABLE = 1
USE_CPP_PACKAGE = 1

[ 96%] Built target mxnet
Scanning dependencies of target cpp_package_op_h
Running: OpWrapperGenerator.py
Traceback (most recent call last):
  File "OpWrapperGenerator.py", line 433, in <module>
    raise(e)
OSError: /usr/local/lib/libjemalloc.so.2: cannot allocate memory in static TLS block
cpp-package/CMakeFiles/cpp_package_op_h.dir/build.make:58: recipe for target 'cpp-package/CMakeFiles/cpp_package_op_h' failed
make[2]: *** [cpp-package/CMakeFiles/cpp_package_op_h] Error 1
CMakeFiles/Makefile2:2569: recipe for target 'cpp-package/CMakeFiles/cpp_package_op_h.dir/all' failed
make[1]: *** [cpp-package/CMakeFiles/cpp_package_op_h.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 96%] Built target image-classification-predict
[ 96%] Built target im2rec
[ 96%] Linking CXX executable mxnet_unit_tests
[ 96%] Built target mxnet_unit_tests
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

What did I make wrong? Invalid parameter combination? I need MXNet without GPU support, just CPU. How can I do it?

leezu commented 4 years ago

A change in upstream jemalloc means that we can't link with system jemalloc. This will be fixed once https://github.com/apache/incubator-mxnet/pull/17121 is merged. In the meantime you can use that PR if you like to build with jemalloc.