Hello,
i did a fresh install of 3.0.4. on a linux laptop and since i dont
have much experience i followed the installation readme on the tar
file and everything went well expect the part when i test the
installation. The first test run : mpiexec -n <number>
./examples/cpi , went as planned but then the second test run on
multiple nodes (mpiexec -f machinefile -n <number>
./examples/cpi) returned some errors. As the readme states there
should be a machinefile. The thing is i cant find this file and
tried to create it my self in the given form, just using only my
laptops hostname a couple of times and placing it in the mpich
installation directory ( /home/<username>/mpich-install) and
that didnt fix the errors.
A machine file is necessary if you have multiple machines with MPICH installed and you want to run an MPI application across all of them. If you don’t have it installed on each machine, it won’t work. The normal use case is to have a cluster with an NFS shared directory where the installation resides (such as your home directory). On a network of laptops, this probably won’t be the case so you’ll have to install things manually. Note that if you’re using Linux, chances are that you can just install MPICH via your package manager so you don’t have to worry about prefixes, paths, etc.
The machine file just tells your local machine (where you’re starting the MPI application) where to try to execute the remote processes. It is just of the form:
host1
host2
host3
<etc.>
And is a flat file wherever you want to put it. To use it, you use the flag -machinefile <path_to_machinefile>.
One other thing i noticed is that on the readme states that hydra is
the primary process manager, but using the mpiexec -info it clearly
states that pmi ( or something similar ) is the primary pm.
To be honest, it probably makes very little difference to you what process manager you’re using unless you have a very specific need. All of that should be transparent to you.
And for a last thing my installation was made without using any
prefixes at the configuration.
Again, if you use a pre-built package, this will solve the problem, but otherwise you should either reinstall with a prefix or go add the directory where MPICH was installed by default to your PATH and LD_LIBRARY_PATH. I believe it’s /usr/local/bin and /usr/local/lib respectively. You don’t need to install as root to make this work.
PS.One other thing i just noticed is that when i did the
installation i could run mpich ( the test runs with the pi programm,
mpiexec -info , etc) , but now after a reboot i cant run mpich on
the terminal. For example mpiexec -info returns bash:
mpiexec: command not found . Whats the deal with that?
Didnt i installed mpich on my machine?
Same problem as above.