Simple UserGuide for MPICH2
From SpeechWiki
(Difference between revisions)
(→MPICH2 on ifp-32) |
(→Configuration) |
||
Line 28: | Line 28: | ||
=Configuration= | =Configuration= | ||
- | add MPICH2 binary path to your PATH | + | |
+ | |||
+ | * '''add MPICH2 binary path to your PATH''' | ||
export PATH=/cworkspace/ifp-32-2/hasegawa/pineking/programs/mpich2/bin:$PATH | export PATH=/cworkspace/ifp-32-2/hasegawa/pineking/programs/mpich2/bin:$PATH | ||
Check we can find them: | Check we can find them: | ||
Line 35: | Line 37: | ||
which mpirun | which mpirun | ||
- | MPI expects the configuration file in your home directory named | + | |
+ | * '''.mpd.conf''' | ||
+ | MPI expects the configuration file in your home directory named ~/.mpd.conf (/etc/mpd.conf if root). It should contain one line: | ||
secretword=<secretword> | secretword=<secretword> | ||
where <secretword> is a password, that should not be your user password. Make it readable/writable only by you: | where <secretword> is a password, that should not be your user password. Make it readable/writable only by you: | ||
chmod 600 .mpd.conf | chmod 600 .mpd.conf | ||
+ | |||
+ | * '''check mpd daemon''' | ||
+ | [pineking@ifp-32 test]$ mpdtrace | ||
+ | ifp-32 | ||
+ | compute-1-14 | ||
+ | compute-1-13 | ||
+ | compute-1-11 | ||
+ | compute-1-8 | ||
+ | compute-1-12 | ||
+ | compute-1-2 | ||
+ | compute-1-16 | ||
+ | compute-1-15 | ||
+ | compute-1-7 | ||
+ | compute-1-6 | ||
+ | compute-1-1 | ||
+ | compute-1-10 | ||
+ | compute-1-9 | ||
+ | compute-1-3 | ||
+ | compute-1-5 | ||
+ | compute-1-4 | ||
+ | |||
+ | The information above show that mpd daemon is already run on each node. | ||
+ | |||
+ | * '''run a MPI program to check the parallel environment''' | ||
+ | |||
+ | [pineking@ifp-32 test]$ mpiexec -n 4 ./cpi | ||
+ | Process 0 on ifp-32.ifp.uiuc.edu | ||
+ | Process 1 on compute-1-14.local | ||
+ | Process 3 on compute-1-11.local | ||
+ | Process 2 on compute-1-13.local | ||
+ | pi is approximately 3.1416009869231249, Error is 0.0000083333333318 | ||
+ | wall clock time = 0.005883 | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | * '''MPI host file: mpd.hosts''' | ||
+ | Create a host file named "mpd.hosts" in your home directory ~/mpd.hosts , it contains the hosts list, such as: | ||
+ | compute-1-1 | ||
+ | compute-1-2 | ||
=Example= | =Example= |
Revision as of 23:54, 2 May 2010
Contents |
MPICH2 on ifp-32
Version and configure information:
[pineking@ifp-32 mpich2]$ mpich2version MPICH2 Version: 1.2.1 MPICH2 Release date: Unknown, built on Sun Jan 10 18:06:02 CST 2010 MPICH2 Device: ch3:nemesis MPICH2 configure: --prefix=/cworkspace/ifp-32-2/hasegawa/pineking/programs/mpich2/ --enable-cxx --enable-threads=multiple MPICH2 CC: gcc -O2 MPICH2 CXX: g++ -O2 MPICH2 F77: gfortran -O2 MPICH2 F90: f95 -O2
Parallel environment on SGE:
[pineking@ifp-32 test]$ qconf -sp mpich pe_name mpich slots 9999 user_lists NONE xuser_lists NONE start_proc_args /opt/gridengine/mpi/startmpi.sh -catch_rsh $pe_hostfile stop_proc_args /opt/gridengine/mpi/stopmpi.sh allocation_rule $fill_up control_slaves TRUE job_is_first_task FALSE urgency_slots min accounting_summary TRUE
Configuration
- add MPICH2 binary path to your PATH
export PATH=/cworkspace/ifp-32-2/hasegawa/pineking/programs/mpich2/bin:$PATH
Check we can find them:
which mpd which mpiexec which mpirun
- .mpd.conf
MPI expects the configuration file in your home directory named ~/.mpd.conf (/etc/mpd.conf if root). It should contain one line:
secretword=<secretword>
where <secretword> is a password, that should not be your user password. Make it readable/writable only by you:
chmod 600 .mpd.conf
- check mpd daemon
[pineking@ifp-32 test]$ mpdtrace
ifp-32 compute-1-14 compute-1-13 compute-1-11 compute-1-8 compute-1-12 compute-1-2 compute-1-16 compute-1-15 compute-1-7 compute-1-6 compute-1-1 compute-1-10 compute-1-9 compute-1-3 compute-1-5 compute-1-4
The information above show that mpd daemon is already run on each node.
- run a MPI program to check the parallel environment
[pineking@ifp-32 test]$ mpiexec -n 4 ./cpi Process 0 on ifp-32.ifp.uiuc.edu Process 1 on compute-1-14.local Process 3 on compute-1-11.local Process 2 on compute-1-13.local pi is approximately 3.1416009869231249, Error is 0.0000083333333318 wall clock time = 0.005883
- MPI host file: mpd.hosts
Create a host file named "mpd.hosts" in your home directory ~/mpd.hosts , it contains the hosts list, such as:
compute-1-1 compute-1-2