java.lang.UnsatisfiedLinkError:java.library.path中没有mkl_rt

问题描述 投票:0回答:1

我在Windows10中有一个使用Smile库的Java8应用程序。例如,当我运行LLE算法时,我收到此警告:

smile-netlib模块在类路径中不可用。纯Java将使用矩阵库。因此,我决定在github中添加一个微笑(如smile所示),通过maven添加smile-ntelib。但是再次运行后,我得到了这个堆栈跟踪:

java.lang.UnsatisfiedLinkError: no mkl_rt in java.library.path
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at smile.netlib.NLMatrix.<clinit>(NLMatrix.java:41)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at smile.math.matrix.Factory.<clinit>(Factory.java:39)
    at smile.math.matrix.Matrix.zeros(Matrix.java:98)
    at smile.manifold.LLE.<init>(LLE.java:155)
    at TestLLE.TestLLETetCase(TestLLE.java:44)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)

1)什么是mkl_rt,如何将其插入Java?这意味着数学内核库?2)同时微笑还建议“在运行时将它们经过机器优化的libblas3(CBLAS)和liblapack3(Fortran)用作共享库。”我怎样才能做到这一点?

java cblas liblas netlib smile
1个回答
0
投票

您必须找到包含mkl_rt.dll的文件夹,然后将该文件夹添加到系统属性java.library.path。通常,这是通过在启动时将选项-Djava.library.path=/path/to/folder传递给JVM来完成的。

[mkl_rt.dll包含本机(非Java)代码中算法的有效实现。

© www.soinside.com 2019 - 2024. All rights reserved.