Directory: --------------------- 1. what is MPICH22. system preparation before installation 3. installation step 4. set environment variables 5. add the mpd configuration file 6. start standalone testing 7. after installation, configure (multi-machine test) (1) Modify/etc/hosts (2) create mpd. hosts (3) Configure SSH & nbs
Directory:
---------------------
1. What is MPICH2?
2. system preparation before installation
3. Installation Steps
4. Set Environment Variables
5. Add the mpd configuration file
6. Start standalone Testing
7. Configuration after installation (multi-machine test)
(1) Modify/etc/hosts
(2) create mpd. hosts
(3) Configure SSH
(4) Configure samba sharing
(5) configure the environment variables of the Test Machine
(6) start testing
8. Run the test program in parallel.
9. Key Points of Successful Running
10. Troubleshooting
---------------------
1. What is MPICH2?
Note: This is taken from MPICH2 Official Website: http://www.mcs.anl.gov/research/projects/MPICH2
MPICH2 is a high-performance and widely portable implementation of the Message Passing Interface (MPI) standard (both MPI-1 and MPI-2 ).
The goals of MPICH2 are:
(1) to provide an MPI implementation that efficiently supports defferent computation and communication platforms including commodity clusters (desktop system, shared-memory systems, multicore ubuntures ), high-speed networks (10 Gigabit Ethernet, InfiniBand, Myrinet, Quadrics) and proprietary high-end computing systems (Blue Gene, Cray ).
(2) to enable cutting-edge research in MPI through an easy-to-extend modular framework for other derived implementations.
MPICH2 source code: http://www.mcs.anl.gov/research/projects/mpich2/downloads/tarballs/1.2.1/mpich2-1.2.1.tar.gz
2. system preparation before installation
Make sure that your system has installed the gcc and g ++ compilers, as well as the g77 or gfortran compilers. You also need to install Python 2.2 or later in your system.
Linuxidc@www.linuxidc.com :~ $ Gcc -- version
Gcc (Ubuntu 4.3.2-1ubuntu12) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
Warranty; not even for MERCHANTABILITY or fitness for a particle PURPOSE.
Linuxidc@www.linuxidc.com :~ $ G ++ -- version
G ++ (Ubuntu 4.3.2-1ubuntu12) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
Warranty; not even for MERCHANTABILITY or fitness for a particle PURPOSE.
Linuxidc@www.linuxidc.com :~ $ Python-V
Python 2.5.2
Linuxidc@www.linuxidc.com :~ $ Gfortran -- version
GNU Fortran (Ubuntu 4.3.2-1ubuntu12) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.
GNU Fortran comes with no warranty, to the extent permitted by law.
You may redistribute copies of GNU Fortran
Under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
Another thing to confirm is that your current user is not a root user. The root user is not recommended for installation in the official MPICH2 documentation.
3. Installation Steps
The standard configure, make, and make install steps are very simple!
Linuxidc@www.linuxidc.com:/home/zzm/Downloads/mpich2 $ tar xzf mpich2-1.2.1.tar.gz
Linuxidc@www.linuxidc.com:/home/zzm/Downloads/mpich2 $ cd mpich2-1.2.1/
Linuxidc@www.linuxidc.com:/home/zzm/Downloads/mpich2/mpich2-1.2.1 $./configure -- prefix =/home/zzm/bin/mpich2
(... I promise you never want to read a lot of output)
Linuxidc@www.linuxidc.com:/home/zzm/Downloads/mpich2/mpich2-1.2.1 $ make
(... I promise you never want to read a lot of output)
Linuxidc@www.linuxidc.com:/home/zzm/Downloads/mpich2/mpich2-1.2.1 $ make install
(... I promise you never want to read a lot of output)
Finally, copy the examples folder to the installation directory (this directory is not copied during mpich2 installation, and the contents in this directory are for testing)
Linuxidc@www.linuxidc.com:/home/zzm/Downloads/mpich2/mpich2-1.2.1 $ cp-r examples // home/zzm/bin/mpich2/
Installation is complete!
4. Set Environment Variables
Add the following line to the end of the/etc/profile file and restart the system to make the environment variables take effect permanently.
Export PATH =/home/zzm/bin/mpich2/bin: $ PATH
You can test whether the environment variables have been set:
Linuxidc@www.linuxidc.com :~ $ Which mpd
/Home/zzm/bin/mpich2/bin/mpd
Linuxidc@www.linuxidc.com :~ $ Which mpiexec
/Home/zzm/bin/mpich2/bin/mpiexec
Linuxidc@www.linuxidc.com :~ $ Which mpirun
/Home/zzm/bin/mpich2/bin/mpirun
5. Add the mpd configuration file
Create a configuration file named ". mpd. conf" under the home Directory of the current user. The content of the file should include the following line:
Secretword =
For example:
Linuxidc@www.linuxidc.com :~ $ More. mpd. conf
Secretword = nicegiving
Is your key, and is the basis for connecting each machine and building mutual trust in parallel environments.
Next, you need to set the access permission for the file. This step is required. Otherwise, an error will be reported during subsequent operations.
Linuxidc@www.linuxidc.com :~ $ Chmod 600. mpd. conf
Linuxidc@www.linuxidc.com :~ $ Ls-ll. mpd. conf
-Rw ------- 1 zzm 1003 22 2010-01-07. mpd. conf
Note: Now you only need to add this file on the local machine, but when you perform multi-host parallel testing, you need to add this file on each machine that participates in computing. Do not forget it!
6. Start standalone Testing
If you can get the following results without any errors, it means that your MPICH2 has been installed successfully.
Linuxidc@www.linuxidc.com :~ $ Mpd &
[1] 22679
Linuxidc@www.linuxidc.com :~ $ Mpdtrace
Zzm-desktop
Linuxidc@www.linuxidc.com :~ $ Mpdallexit
[1] + Done mpd
Linuxidc@www.linuxidc.com :~ $