简体   繁体   中英

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.

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.

尝试在导出一些libs的脚本中添加一行:

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

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.

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?

You have to set up mpich's hosts file, and give it a way to start jobs on other hosts. eg 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM