Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Program execution error “org.nd4j.linalg.cpu.nativecpu.ops.NativeOpExecutioner” #1010

Open
Qin244038694 opened this issue Oct 29, 2020 · 0 comments

Comments

@Qin244038694
Copy link

Qin244038694 commented Oct 29, 2020

The same error occurs when executing any program:

Exception in thread "main" java.lang.ExceptionInInitializerError
at org.nd4j.linalg.cpu.nativecpu.ops.NativeOpExecutioner.(NativeOpExecutioner.java:86)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.nd4j.linalg.factory.Nd4j.initWithBackend(Nd4j.java:5178)
at org.nd4j.linalg.factory.Nd4j.initContext(Nd4j.java:5092)
at org.nd4j.linalg.factory.Nd4j.(Nd4j.java:270)
at Learning.ForTest.App.main(App.java:10)
Caused by: java.lang.RuntimeException: ND4J is probably missing dependencies. For more information, please refer to: https://deeplearning4j.konduit.ai/nd4j/backend
at org.nd4j.nativeblas.NativeOpsHolder.(NativeOpsHolder.java:112)
at org.nd4j.nativeblas.NativeOpsHolder.(NativeOpsHolder.java:35)
... 10 more
Caused by: java.lang.UnsatisfiedLinkError: no jnind4jcpu in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:1631)
at org.bytedeco.javacpp.Loader.load(Loader.java:1265)
at org.bytedeco.javacpp.Loader.load(Loader.java:1109)
at org.nd4j.nativeblas.Nd4jCpu.(Nd4jCpu.java:14)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.nd4j.nativeblas.NativeOpsHolder.(NativeOpsHolder.java:85)
... 11 more
Caused by: java.lang.UnsatisfiedLinkError: no nd4jcpu in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:1631)
at org.bytedeco.javacpp.Loader.load(Loader.java:1213)
... 16 more

The pom.xml file configuration is as follows:

deeplearning4j-core (1.0.0-beta7),
nd4j-native-platform (1.0.0-beta7),
slf4j-nop (2.0.0-alpha1)

Execute the java file as follows:

package Learning.ForTest;

import java.io.IOException;

import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.factory.Nd4j;

public class App {
public static void main(String[] args) throws IOException{
System.out.println(Nd4j.getBackend());
INDArray tensor1 = Nd4j.create(new double[]{1,2,3});
INDArray tensor2 = Nd4j.create(new double[]{10.0,20.0,30.0});
System.out.println(tensor1.add(tensor2));
}
}

Please indicate relevant versions, including, if relevant:

My computer system is windows. I tried to execute other java programs and encountered the same problem. Please help me see what is the reason, thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant