MPICH

From Rizzo_Lab
Revision as of 08:41, 8 February 2010 by Tbalius (talk | contribs)
Jump to: navigation, search

See the following link for discussion of .mpi.conf file and running mpi jobs.

vscentrum.be how to use mpich2

Making MPICH-2 work like MPICH1

MPICH1 provided the mpirun command to start MPICH1 jobs. The MPI-2 Forum recommended a standard, portable command, called mpiexec, for this purpose. MPICH2 implements mpiexec and all of its standard arguments, together with some extensions. See Section 5.1 for standard arguments to mpiexec and various subsections of Section 5 for extensions particular to various process management systems. MPICH2 also provides an mpirun command for simple backward compatibility, but MPICH2’s mpirun does not provide all the options of mpiexec or all of the options of MPICH1’s mpirun.


MPD in the PBS environment

PBS specifies the machines allocated to a particular job in the file $PBS NODEFILE. But the format used by PBS is different from that of MPD. Specifically, PBS lists each node on a single line; if a node (n0) has two processors, it is listed twice. MPD on the other hand uses an identifier (ncpus) to describe how many processors a node has. So, if n0 has two processors, it is listed as n0:2. One way to convert the node file to the MPD format is as follows:

sort $PBS NODEFILE | uniq -C | awk ’{ printf(”%s:%s”, $2, $1); }’ > mpd.nodes

Once the PBS node file is converted, MPD can be normally started within the PBS job script using mpdboot and torn down using mpdallexit.

mpdboot -f mpd.hosts -n [NUM NODES REQUESTED]
mpiexec -n [NUM PROCESSES] ./my test program
mpdallexit

Run DOCK WITH MPICH2

cat << EOF > dock.qsub.csh
#! /bin/tcsh
#PBS -l nodes=5:ppn=2
#PBS -l walltime=00:10:00
#PBS -o zzz.qsub.out
#PBS -e zzz.qsub.err
#PBS -V
cd $workdir

cat \$PBS_NODEFILE | sort | uniq > mpd.nodes

mpdboot --totalnum=-1 --ncpus=2 -f mpd.nodes
mpiexec -n 10 $dock -i dock.in -o dock.out
mpdallexit

EOF

chmod +x dock.qsub.csh

qsub dock.qsub.csh

References

http://www.mcs.anl.gov/research/projects/mpich2/documentation/files/mpich2-1.2.1-userguide.pdf