Hani
Hani

Reputation: 1547

Why does MPI give run time Error

After i typed

sudo apt-get install mpich2

The mpich was installed but the first problem is that I dont know where the files were installed. On the other hand when I wrote

mpirun -np 3 ./hello.o

it gives me:

mpiexec_hani-laptop: cannot connect to local mpd (/tmp/mpd2.console_hani); possible causes:
  1. no mpd is running on this host
  2. an mpd is running but was started without a "console" (-n option)
In case 1, you can start an mpd on this host with:
    mpd &
and you will be able to run jobs just on this host.
For more details on starting mpds on a set of hosts, see
the MPICH2 Installation Guide.

Can any one help.

Upvotes: 4

Views: 9170

Answers (5)

Kareem Ali
Kareem Ali

Reputation: 21

try to add a line to my script exporting some libs:

export LD_LIBRARY_PATH=/usr/local/mpich2-1.0.5p4/lib:/usr/local/hdf5/lib:$LD_LIBRARY_PATH

Upvotes: 1

Cibin Joseph
Cibin Joseph

Reputation: 1273

Probably because the mpd (Multi- Purpose Daemon) is not running like it says. "Hydra" is another one of the popularly used process management system for parallel processes. Try this :

mpd &

or this :

mpiexec.hydra -np 3 ./hello.o

These daemons are used for scheduling processes to the required cores. Note: After running the above command once, mpirun also seems to work without issues.

Upvotes: 6

Peter Cordes
Peter Cordes

Reputation: 364039

You have to set up mpich's hosts file, and give it a way to start jobs on other hosts. e.g. with rsh and /etc/hosts.equiv in a trusted network environment.

For testing only, I think there's a local-host-only way to run mpich. Oh, but maybe not enabled by default: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=301551

Sorry I can't remember the tricks... It's been too long.

Upvotes: 0

Mike Heinz
Mike Heinz

Reputation: 1827

mpich2 uses mpd as a job scheduler. That means the mpd daemon has to be running before you can run MPI jobs.

In addition, to get mpd running correctly across multiple nodes, you will need to configure them all with matching passwords (or "secretkey", I can't remember which term mpich2 uses.)

Is there a reason you're using mpich2 instead of OpenMPI or LAM?

Upvotes: 0

davidtbernal
davidtbernal

Reputation: 13684

You can figure out where mpirun is by typing which mpirun (this works for any command). The mpd issue sounds like it might be that you need to be running an mpi daemon before you run anything. I have not used mpich, but I recall my advisor mentioning that this was the case.

Upvotes: 0

Related Questions