Kamran Hameed
2008-03-26 09:07:20 UTC
folks i am new to MPI. i am trying to write a simple Hello World
Program using some one's written code of MPI
the code is
import mpi.*;
public class Hello
{
public Hello(){}
public static void main(String[]args) throws Exception
{
MPI.Init(args);
System.out.println("Hello World");
MPI.Finalize();
}
}
Now when i run it.. as
mpirun -np 2 Hello.sh
it gives me error
Exception in thread "main" java.lang.UnsatisfiedLinkError:
mpjdev.Status.init()V
at mpjdev.Status.init(Native Method)
at mpjdev.Status.<clinit>(Status.java:41)
at mpi.MPI.<clinit>(MPI.java:78)
at Hello.main(Hello.java:8)
Now what i get from this error is that in file Status.java at line 41
there is a native call which it is not able to find.
Now i have already added the native folder in my CLASSPATH as
export CLASSPATH=$CLASSPATH:/home/kamran/code/src/native/
but still the exception persists
Note that the native folder contains files Status.c Status.h
Status.o
Apparantly it should work but exception still persists
Program using some one's written code of MPI
the code is
import mpi.*;
public class Hello
{
public Hello(){}
public static void main(String[]args) throws Exception
{
MPI.Init(args);
System.out.println("Hello World");
MPI.Finalize();
}
}
Now when i run it.. as
mpirun -np 2 Hello.sh
it gives me error
Exception in thread "main" java.lang.UnsatisfiedLinkError:
mpjdev.Status.init()V
at mpjdev.Status.init(Native Method)
at mpjdev.Status.<clinit>(Status.java:41)
at mpi.MPI.<clinit>(MPI.java:78)
at Hello.main(Hello.java:8)
Now what i get from this error is that in file Status.java at line 41
there is a native call which it is not able to find.
Now i have already added the native folder in my CLASSPATH as
export CLASSPATH=$CLASSPATH:/home/kamran/code/src/native/
but still the exception persists
Note that the native folder contains files Status.c Status.h
Status.o
Apparantly it should work but exception still persists