Sunday, May 18, 2003

Demo MPI jobs in the PBS

This technical note may only apply on OSCAR software

This shows how you submit an MPI job using OpenPBS under our cluster (OSCAR System).

1. Download this file from the MPC server. Save it to mpihello.c or hello.c

2. Run this:

$ mpicc hello.c -o hello
3. Modify the following pbs script, save it as, say, hello.pbs. Please modify the variables nodes, N and change the current path.
#!/bin/csh
#PBS -N "Test"
#PBS -l nodes=10:ppn=1
#PBS -q workq
#PBS -S /bin/sh

set NP=`(wc -l < $PBS_NODEFILE) | awk '{print $1}'`

# Edit this line to reflect your directory.
cd /home/mjhsieh

mpirun -machinefile $PBS_NODEFILE -np $NP ./hello >& log-hello
4. Run this:
$ qsub hello.pbs

No comments: