From Rizzo_Lab
Revision as of 10:24, 14 April 2010 by Tbalius (talk | contribs) (Run DOCK WITH MPICH2)
Jump to: navigation, search

See the following link for discussion of .mpi.conf file and running mpi jobs. 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\n”, $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


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
cd $workdir

sort \$PBS_NODEFILE | uniq  > mpd.nodes
set NUM =  \`cat \$PBS_NODEFILE | uniq | grep -v sunysb-52 | wc -l \`
set p   =  \`cat \$PBS_NODEFILE | wc -l\`

mpdboot --file="mpd.nodes" -n \$NUM --mpd="/sbhome0/balius/programs/mpich2-install/bin/mpd" --maxbranch=50 -v &

sleep 3
mpiexec -n \$p ${dock} -i -o dock.out

chmod +x dock.qsub.csh

qsub dock.qsub.csh