I mpj-v0_44 heruntergeladen und extrahiert es C:\mpj
MPJ Express (Java MPI) läuft in IntelliJ IDEA
Setzen Sie Windows-System env. Variablen MPJ_HOME
zu C:\mpj
und in PATH Mehrwert C:\mpj\bin
fügte ich mpi.jar
, mpj.jar
in Projektstruktur -> Bibliotheken
und einfaches Hello World mpi Programm geschrieben:
import mpi.MPI;
public class Main {
public static void main(String[] args) {
MPI.Init(args);
int me = MPI.COMM_WORLD.Rank();
int size = MPI.COMM_WORLD.Size();
System.out.println("Hello world from <"+me+"> from <"+size);
MPI.Finalize();
}
}
I erstellt Laufkonfiguration wie auf Bild beschrieben:
Aber ich erhalte den folgenden Fehler:
MPJ Express (0.44) is started in the multicore configuration
java.lang.reflect.InvocationTargetException
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:497)
at runtime.starter.MulticoreStarter$1.run(MulticoreStarter.java:281)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: 0
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:122)
... 6 more
ich ähnliche Probleme in Eclipse geschrieben, aber keine Lösung gearbeitet gefunden:
java.io.FileNotFoundException: null\conf\wrapper.conf (The system cannot find the path specified)
"Unresolved compilation problems" from running MPJ express in Eclipse Indigo
in Eclipse alles funktioniert gut, aber Ich brauche Intellij IDEA!
PS: (wenn Sie javadoc hinzufügen ganze C:\mpj\lib
Ordner und C:\mpj\src
Ordner für Bibliotheksquellen benötigen)
Es funktionierte nur mit dem Hinzufügen von Klassennamen zu VM-Optionen "-jar $ MPJ_HOME $ \ lib \ starter.jar Main-np 4" – fpopic