Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » mpiJava not building in eclipse - noob(mpiJava not building in eclipse)
mpiJava not building in eclipse - noob [message #819204] Mon, 12 March 2012 16:17 Go to next message
Rudolf Hoehler is currently offline Rudolf HoehlerFriend
Messages: 1
Registered: March 2012
Junior Member
Hey guys,

I'm rather new to Java, so please bare with me! Smile

I have downloaded and installed mpiJava, and I can compile and run java code that imports mpi routines in a bash terminal using the javac and java commands.

In order to get this to work I had to set some environmental paths for bash.


I cannot do the same in Eclipse.

Eclipse underlines import mpi.* with a red line. I then add an external class folder that points to the mpiJava classes folder, and the red lines go away. Now the IDE will allow me to build and run.

When I press play I get errors. I have edited the eclipse.ini file and made sure that eclipse uses the correct java vm. I don't get any errors when using the command line and emacs so I know at the very least the system is working.

The erros I get:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no savesignals in java.library.path
at java.lang.ClassLoader.loadLibrary(
at java.lang.Runtime.loadLibrary0(
at java.lang.System.loadLibrary(
at mpi.MPI.<clinit>(
at Hello.main(

I work on Ubuntu 11.10 with eclipse downloaded from the Ubuntu Repo's.

Any help or pointer will greatly be appreciated.

Thanks for taking the time to help me out - you're time is really appreciated! Smile



The code for what it is worth:

   * Author of revised version: Franklyn Pinedo
   * Adapted from Source Code in C of Tutorial/User's Guide for MPI by
   * Peter Pacheco.

import java.util.*;
import java.lang.*;
import mpi.* ;

class Hello
    static public void main(String[] args) throws MPIException

	MPI.Init(args) ;

	int my_rank = 0; // Rank of process
	int source = 0;  // Rank of sender
	int dest = 0;    // Rank of receiver 
	int tag=50;  // Tag for messages	
	int myrank = MPI.COMM_WORLD.Rank() ;
	int p = MPI.COMM_WORLD.Size() ;

	if(myrank != 0) // is another node!
	    char[] message = null;
		message = ( "Greetings from computer: " + InetAddress.getLocalHost().getHostName()  ).toCharArray();	   
	    catch ( Exception error )

	    MPI.COMM_WORLD.Send( message, 0, message.length, MPI.CHAR,dest, tag );
	{  // my_rank == 0
	    for ( source =1;source != p;source++)
		char[] message = new char[60];
		MPI.COMM_WORLD.Recv( message, 0, 60, MPI.CHAR, source, tag );
		System.out.println( message );

[Updated on: Mon, 12 March 2012 16:18]

Report message to a moderator

Re: mpiJava not building in eclipse - noob [message #906150 is a reply to message #819204] Fri, 31 August 2012 18:12 Go to previous message
Telles Nobrega is currently offline Telles NobregaFriend
Messages: 1
Registered: August 2012
Junior Member
I couldn't run the Hello example with mpirun, i installed mpijava and mpich2, keeps saying that it cant find the main class. How did you do it?
Previous Topic:how to synchronize files in eclipse
Next Topic:Eclipse failse to start after updating plugins
Goto Forum:

Current Time: Sun May 27 23:46:08 GMT 2018

Powered by FUDForum. Page generated in 0.01794 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top