Java – unresolved compilation issues when running MPJ express in eclipse indigo
Following the tutorial of utube, I introduced how to run parallel applications using MPJ express in the IDE I downloaded the latest version of MPJ express and used eclipse indigo
I do include MPI. XML in my project jar file When I try to compile a simple "Hello program", I receive this error:
My code is
import mpi.*; public class HelloEclipsWorld { public static void main(String[] args) throws Exception { MPI.Init(args); int rank = MPI.COMM_WORLD.Rank(); int size = MPI.COMM_WORLD.Size(); System.out.println("I am process < " + rank + " > of total < " + size + " > processes."); MPI.Finalize(); } }
What on earth did I do wrong?
Solution
This looks like a classpath error According to your edits, it looks like you're using eclipse When you right-click the project, select build path > configure build path... And then go to the library (or order and export) tab, you should see MPJ jar. I guess it won't exist. You need to add it
This is the same as you said MPI Jar is different I just use the code you provided and MPJ Jar (downloaded from here) set up a simple test project, and everything is normal