You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/11/02 21:41:28 UTC

[GitHub] kohr-h opened a new issue #13096: [Scala] `make scalapkg` fails if MKL-DNN is used

kohr-h opened a new issue #13096: [Scala] `make scalapkg` fails if MKL-DNN is used
URL: https://github.com/apache/incubator-mxnet/issues/13096
 
 
   I've built the core library from source with MKL-DNN activated (`USE_MKLDNN=1`), and in [examples/image-classification/benchmark_score.py](https://github.com/apache/incubator-mxnet/blob/master/example/image-classification/benchmark_score.py) I get a memory allocation message from MKL-DNN, so the core library is fine.
   
   But when I run `make scalapkg`, the build fails at `mxnet-macros_2.11` with this output (relevant part only):
   ```
   [INFO] --- maven-scala-plugin:2.15.2:testCompile (default) @ mxnet-macros_2.11 ---
   [INFO] Checking for multiple versions of scala
   [WARNING]  Expected all dependencies to require Scala version: 2.11.8
   [WARNING]  org.apache.mxnet:mxnet-init_2.11:1.3.1-SNAPSHOT requires scala version: 2.11.8
   [WARNING]  org.apache.mxnet:mxnet-init_2.11:1.3.1-SNAPSHOT requires scala version: 2.11.8
   [WARNING]  org.apache.mxnet:mxnet-macros_2.11:1.3.1-SNAPSHOT requires scala version: 2.11.8
   [WARNING]  org.scala-lang:scala-reflect:2.11.8 requires scala version: 2.11.8
   [WARNING]  org.scalatest:scalatest_2.11:3.0.4 requires scala version: 2.11.11
   [WARNING] Multiple versions of scala libraries detected!
   [INFO] includes = [**/*.java,**/*.scala,]
   [INFO] excludes = []
   [INFO] Nothing to compile - all classes are up to date
   [INFO] 
   [INFO] --- maven-surefire-plugin:2.19:test (default-test) @ mxnet-macros_2.11 ---
   [INFO] Tests are skipped.
   [INFO] 
   [INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) @ mxnet-macros_2.11 ---
   [INFO] Building jar: /home/hkohr/git/mxnet/scala-package/macros/target/mxnet-macros_2.11-1.3.1-SNAPSHOT.jar
   [INFO] 
   [INFO] --- maven-source-plugin:2.2.1:jar-no-fork (attach-sources) @ mxnet-macros_2.11 ---
   [INFO] Building jar: /home/hkohr/git/mxnet/scala-package/macros/target/mxnet-macros_2.11-1.3.1-SNAPSHOT-sources.jar
   [INFO] 
   [INFO] --- exec-maven-plugin:1.6.0:java (apidoc-generation) @ mxnet-macros_2.11 ---
   [WARNING] 
   java.lang.UnsatisfiedLinkError: /home/hkohr/git/mxnet/scala-package/init-native/linux-x86_64/target/libmxnet-init-scala-linux-x86_64.so: /home/hkohr/git/mxnet/scala-package/init-native/linux-x86_64/target/libmxnet-init-scala-linux-x86_64.so: undefined symbol: mkldnn_primitive_destroy
       at java.lang.ClassLoader$NativeLibrary.load (Native Method)
       at java.lang.ClassLoader.loadLibrary0 (ClassLoader.java:1941)
       at java.lang.ClassLoader.loadLibrary (ClassLoader.java:1824)
       at java.lang.Runtime.load0 (Runtime.java:809)
       at java.lang.System.load (System.java:1086)
       at org.apache.mxnet.init.Base$.tryLoadInitLibrary (Base.scala:49)
       at org.apache.mxnet.init.Base$.<init> (Base.scala:21)
       at org.apache.mxnet.init.Base$.<clinit> (Base.scala)
       at org.apache.mxnet.APIDocGenerator$.getSymbolNDArrayMethods (APIDocGenerator.scala:165)
       at org.apache.mxnet.APIDocGenerator$.absClassGen (APIDocGenerator.scala:57)
       at org.apache.mxnet.APIDocGenerator$.main (APIDocGenerator.scala:41)
       at org.apache.mxnet.APIDocGenerator.main (APIDocGenerator.scala)
       at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke (Method.java:498)
       at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:282)
       at java.lang.Thread.run (Thread.java:748)
   [INFO] ------------------------------------------------------------------------
   [INFO] Reactor Summary:
   [INFO] 
   [INFO] MXNet Scala Package - Parent ....................... SUCCESS [  1.649 s]
   [INFO] MXNet Scala Package - Initializer .................. SUCCESS [  2.713 s]
   [INFO] MXNet Scala Package - Initializer Native Parent .... SUCCESS [  0.092 s]
   [INFO] MXNet Scala Package - Initializer Native Linux-x86_64 SUCCESS [  4.586 s]
   [INFO] MXNet Scala Package - Macros ....................... FAILURE [  0.385 s]
   [INFO] MXNet Scala Package - Core ......................... SKIPPED
   [INFO] MXNet Scala Package - Native Parent ................ SKIPPED
   [INFO] MXNet Scala Package - Native Linux-x86_64 CPU-only . SKIPPED
   [INFO] MXNet Scala Package - Inference .................... SKIPPED
   [INFO] MXNet Scala Package - Examples ..................... SKIPPED
   [INFO] MXNet Scala Package - Spark ML ..................... SKIPPED
   [INFO] MXNet Scala Package - Full Parent .................. SKIPPED
   [INFO] MXNet Scala Package - Full Linux-x86_64 CPU-only ... SKIPPED
   [INFO] ------------------------------------------------------------------------
   [INFO] BUILD FAILURE
   [INFO] ------------------------------------------------------------------------
   [INFO] Total time: 9.877 s
   [INFO] Finished at: 2018-11-02T22:19:52+01:00
   [INFO] Final Memory: 43M/880M
   [INFO] ------------------------------------------------------------------------
   [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (apidoc-generation) on project mxnet-macros_2.11: An exception occured while executing the Java class. /home/hkohr/git/mxnet/scala-package/init-native/linux-x86_64/target/libmxnet-init-scala-linux-x86_64.so: /home/hkohr/git/mxnet/scala-package/init-native/linux-x86_64/target/libmxnet-init-scala-linux-x86_64.so: undefined symbol: mkldnn_primitive_destroy -> [Help 1]
   [ERROR] 
   [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
   [ERROR] Re-run Maven using the -X switch to enable full debug logging.
   [ERROR] 
   [ERROR] For more information about the errors and possible solutions, please read the following articles:
   [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
   [ERROR] 
   [ERROR] After correcting the problems, you can resume the build with the command
   [ERROR]   mvn <goals> -rf :mxnet-macros_2.11
   Makefile:607: recipe for target 'scalapkg' failed
   make: *** [scalapkg] Error 1
   ```
   For reference, [here](https://gist.github.com/kohr-h/e1ee1f2b18a5db2ab6bb79aefa9bd9cb) is the relevant part where `maven` was run with the `-e -X` options.
   
   At the very top, I have this output:
   ```
   Makefile:178: "USE_LAPACK disabled because libraries were not found"
   (cd /home/hkohr/git/mxnet/scala-package; \
   	mvn package -Plinux-x86_64-cpu,scala-2.11 -Dcxx="g++" \
   	    -Dbuild.platform="linux-x86_64-cpu" \
   		-Dcflags="-DMSHADOW_FORCE_STREAM -Wall -Wsign-compare -O3 -DNDEBUG=1 -I/home/hkohr/git/mxnet/3rdparty/mshadow/ -I/home/hkohr/git/mxnet/3rdparty/dmlc-core/include -fPIC -I/home/hkohr/git/mxnet/3rdparty/tvm/nnvm/include -I/home/hkohr/git/mxnet/3rdparty/dlpack/include -I/home/hkohr/git/mxnet/3rdparty/tvm/include -Iinclude -funroll-loops -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs -msse3 -mf16c -DMSHADOW_USE_CUDA=0 -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DMSHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1 -I/usr/include/opencv -fopenmp -DMXNET_USE_OPERATOR_TUNING=1  -DMXNET_USE_NCCL=0 -DMXNET_USE_LIBJPEG_TURBO=0" -Dldflags="-pthread -lm -lcblas -fopenmp -lrt -lopencv_dnn -lopencv_ml -lopencv_objdetect -lopencv_shape -lopencv_stitching -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_imgproc -lopencv_flann -lopencv_viz -lopencv_core " \
   		-Dcurrent_libdir="/home/hkohr/git/mxnet/lib" \
   		-Dlddeps="/home/hkohr/git/mxnet/3rdparty/dmlc-core/libdmlc.a /home/hkohr/git/mxnet/3rdparty/tvm/nnvm/lib/libnnvm.a /home/hkohr/git/mxnet/lib/libmxnet.a")
   ```
   There's no MKL-DNN here, so this may well be the issue.
   
   ## Environment info (Required)
   
   ```
   ----------Python Info----------
   Version      : 3.6.7
   Compiler     : GCC 7.3.0
   Build        : ('default', 'Oct 23 2018 19:16:44')
   Arch         : ('64bit', '')
   ------------Pip Info-----------
   Version      : 10.0.1
   Directory    : /home/hkohr/miniconda/envs/mxnet_src/lib/python3.6/site-packages/pip
   ----------MXNet Info-----------
   Version      : 1.3.1
   Directory    : /home/hkohr/git/mxnet/python/mxnet
   Hashtag not found. Not installed from pre-built package.
   ----------System Info----------
   Platform     : Linux-4.15.0-36-generic-x86_64-with-debian-buster-sid
   system       : Linux
   node         : pop-os
   release      : 4.15.0-36-generic
   version      : #39-Ubuntu SMP Mon Sep 24 16:19:09 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):              8
   On-line CPU(s) list: 0-7
   Thread(s) per core:  2
   Core(s) per socket:  4
   Socket(s):           1
   NUMA node(s):        1
   Vendor ID:           GenuineIntel
   CPU family:          6
   Model:               142
   Model name:          Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
   Stepping:            10
   CPU MHz:             2448.670
   CPU max MHz:         4000.0000
   CPU min MHz:         400.0000
   BogoMIPS:            3984.00
   Virtualization:      VT-x
   L1d cache:           32K
   L1i cache:           32K
   L2 cache:            256K
   L3 cache:            8192K
   NUMA node0 CPU(s):   0-7
   Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d
   ```
   
   Package used (Python/R/Scala/Julia): Scala
   
   For Scala user, please provide:
   1. Java version: (`java -version`)
      ```
      openjdk version "1.8.0_181"
      OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-1ubuntu0.18.04.1-b13)
      OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
      ```
   2. Maven version: (`mvn -version`)
      ```
      Apache Maven 3.5.2
      Maven home: /usr/share/maven
      Java version: 1.8.0_181, vendor: Oracle Corporation
      Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
      Default locale: en_US, platform encoding: UTF-8
      OS name: "linux", version: "4.15.0-36-generic", arch: "amd64", family: "unix"
      ```
   3. Scala runtime if applicable: (`scala -version`)
      ```
      Scala code runner version 2.11.12 -- Copyright 2002-2017, LAMP/EPFL
      ```
   
   ## Build info (Required if built from source)
   
   Compiler (gcc/clang/mingw/visual studio): GCC
   
   MXNet commit hash: 24d49030e2f2b245e3968af39742918fdd13f1f5
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services