mpiexec.hydra - how to run MPI process on machines

2019-02-17 09:37发布

问题:

I am trying to run a simple MPI program using MPICH over a cluster of two machines. However, one is running Fedora 17 and the other is running Debian Squeeze - not necessarily a problem, but the issue is that the two distros put their mpi execs in different directories:

When I run the following from host1:

mpiexec -hosts host2 -np 1 -wdir /home/chris/src/mpi/ ./mpitest

it fails with the following error

bash: /usr/lib/mpich2/bin/hydra_pmi_proxy: No such file or directory

This seems to be because hydra_pmi_proxy is installed in /usr/lib/mpich2/bin on the Fedora machine but in /usr/bin on the Debian machine. I assume that when I spawn the process from host1 via ssh, it expects to find hydra_pmi_proxy in the same place on host2.

The program runs ok on both machines if I just run it locally on that node - I only get a problem when trying to run it on both.

I have searched the MPICH documentation for a way to override to remote path to hydra_pmi_proxy, but to no avail.

Can I do this somehow? I thought one of the advantages of MPICH was that it can easily handle hetrogeneous hosts....

Any insights would be most appreciated!

回答1:

I managed to solve this problem not installing mpich hydra and the terminal (eg apt-get install MPICH2 or hydra). But instead I downloaded the source code: http://www.mpich.org/downloads/ (being the stable version). Then I ran the following command on the machines Master and slave: export PATH = / home / you / mpich: $ PATH (On my computer I installed on my mpich directory).

Just solved this problem!

Thanks!



回答2:

This can be solved by installing MPICH via its source code and mount the installation directory in the node in the same directory as the directory on server. then use export PATH = /home/you/mpich-installation-directory/bin: $PATH only on server.



回答3:

This problem can be solved in NFS configuration with: exportfs -var (in master machine).

You have your /mirror directory, but it is necessary to add the directory /usr in /etc/exports:

/usr *(rw,sync,no_subtree_check)

In the client machine, edit /etc/fstab and add:

master-ip/usr   /usr nfs defaults 0 0

Save and run the command mount -a.

After run df -h to see the mounted directory from master in slave/client.



标签: mpi mpich