Simple UserGuide for MPICH2

From SpeechWiki

(Difference between revisions)
Jump to: navigation, search
Line 77: Line 77:
  wall clock time = 0.005883
  wall clock time = 0.005883
 +
=Using MPI with qsub on ifp-32=
 +
* '''Create a bash file''', such as:
 +
#!/bin/bash
 +
#$ -cwd
 +
#$ -pe mpich 4
 +
 +
/cworkspace/ifp-32-2/hasegawa/pineking/programs/mpich2/bin/mpiexec -n 3 ./cpi
 +
and submit:
 +
 +
qsub ./test.sh
=Administrators=
=Administrators=
Line 100: Line 110:
  compute-1-16
  compute-1-16
-
=Using MPI with qsub on ifp-32=
 
-
* '''Create a bash file''', such as:
 
-
#!/bin/bash
 
-
#$ -cwd
 
-
#$ -pe mpich 4
 
-
/cworkspace/ifp-32-2/hasegawa/pineking/programs/mpich2/bin/mpiexec -n 3 ./cpi
 
-
 
-
and submit:
 
-
 
-
qsub ./test.sh
 
Line 116: Line 116:
=Reference=
=Reference=
 +
# [http://www.mcs.anl.gov/research/projects/mpich2/ MPICH2 website]
 +
# [http://www.mcs.anl.gov/research/projects/mpich2/documentation/files/mpich2-1.2.1-installguide.pdf MPICH2 Installer's Guide]
 +
# [http://www.mcs.anl.gov/research/projects/mpich2/documentation/files/mpich2-1.2.1-userguide.pdf MPICH2 User's Guide]
 +
# [http://gridengine.sunsource.net/howto/mpich2-integration/mpich2-integration.html http://gridengine.sunsource.net/howto/mpich2-integration/mpich2-integration.html]

Revision as of 00:18, 3 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

Users

  • 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

Using MPI with qsub on ifp-32

  • Create a bash file, such as:
#!/bin/bash
#$ -cwd
#$ -pe mpich 4

/cworkspace/ifp-32-2/hasegawa/pineking/programs/mpich2/bin/mpiexec -n 3 ./cpi

and submit:

qsub ./test.sh

Administrators

  • 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
compute-1-3
compute-1-4
compute-1-5
compute-1-6
compute-1-7
compute-1-8
compute-1-9
compute-1-10
compute-1-11
compute-1-12
compute-1-13
compute-1-14
compute-1-15
compute-1-16




Reference

  1. MPICH2 website
  2. MPICH2 Installer's Guide
  3. MPICH2 User's Guide
  4. http://gridengine.sunsource.net/howto/mpich2-integration/mpich2-integration.html
Personal tools