From be92cc63ce20f354ff9f6aa6f7af0ad558cc5fd3 Mon Sep 17 00:00:00 2001 From: Carin Meier Date: Sat, 2 Nov 2019 14:29:06 -0400 Subject: [PATCH] change the wording and log level to be more in line with the general use (#16626) case of loading from the jar --- .../core/src/main/scala/org/apache/mxnet/Base.scala | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/scala-package/core/src/main/scala/org/apache/mxnet/Base.scala b/scala-package/core/src/main/scala/org/apache/mxnet/Base.scala index 001bd04d2c95..c3378ec4074c 100644 --- a/scala-package/core/src/main/scala/org/apache/mxnet/Base.scala +++ b/scala-package/core/src/main/scala/org/apache/mxnet/Base.scala @@ -62,18 +62,17 @@ private[mxnet] object Base { // The primitives currently supported for NDArray operations val MX_PRIMITIVES = new Group ((Double, Float)) + + /* Find the native libray either on the path or copy it from + * the jar in the dependency + * jar into a temp directory and load it + */ try { try { tryLoadLibraryOS("mxnet-scala") } catch { case e: UnsatisfiedLinkError => - logger.warn("MXNet Scala native library not found in path. " + - "Copying native library from the archive. " + - "Consider installing the library somewhere in the path " + - "(for Windows: PATH, for Linux: LD_LIBRARY_PATH), " + - "or specifying by Java cmd option -Djava.library.path=[lib path].") - logger.warn("LD_LIBRARY_PATH=" + System.getenv("LD_LIBRARY_PATH")) - logger.warn("java.library.path=" + System.getProperty("java.library.path")) + logger.info("Copying and loading native library from the jar archive") NativeLibraryLoader.loadLibrary("mxnet-scala") } } catch {