Instructions about available machines can be found at the Experimental machines section of the class web page.
In order to build and test your MPI programs on the experiment machines, there are a few steps you need to follow.
.bashrc in your home directory.
ARCH=`uname -m`
MPI_HOME=''
if [ "${ARCH}" == "i686" ]
then
# echo "Setting up x86 MPI env"
MPI_HOME=/u/cs458/installed/mpi/3.0.2/x86
elif [ "${ARCH}" == "x86_64" ]
then
# echo "Setting up x86-64 MPI env"
MPI_HOME=/u/cs458/installed/mpi/3.0.2/x86_64
else
# echo "Architecture ${ARCH} not recognized; cannot set up MPI env"
exit 1;
fi
LD_LIBRARY_PATH=${MPI_HOME}/lib:${LD_LIBRARY_PATH};
PATH=${MPI_HOME}/bin:${PATH}
unset MPI_HOME
unset ARCH
export LD_LIBRARY_PATH
export PATH
If you don't want to make permanent changes to your environment variables,
you can set-up a script that makes temporary changes before you run
compile and run your MPI program. A related Bash script can be found in
the sample MPI version of SOR at /u/cs458/apps/sor/mpi/mpi_test.sh.
If you do not use Bash or you want to have full control of your shell
environment, please feel free to do it in your own way. In that case,
reading the above script should at least help you figure out what you
need to do.
cycle1.$),
run the following command: $ ssh-keygen -t rsa. $ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
$ chmod 700 ~/.ssh$ chmod 600 ~/.ssh/authorized_keysgcc, you should use mpicc to
compile and link your MPI programs. A sample Makefile can
be found in the sample MPI version of SOR at
/u/cs458/apps/sor/mpi/Makefile .
You can follow this makefile to compile and link your own programs.
Run make clean; make to compile your code. hosts) can be found in /u/cs458/apps/sor/mpi/.
For a specific example, if your system contains two machines
(node17/node23) with two processors on each machine, then your file may
look like this:
node17.cs.rochester.edu:2
node23.cs.rochester.edu:2
You can run your MPI program in the following way:
mpirun -np 4 -machinefile hosts linux/sor
Flag -np is followed by the number of MPI processes in the run.
Flag -machinefile is followed by the hosts file described above.