vnrun usage

vnfe1% vnrun -h

vnrun: What the heck do you want to vnrun?
 
usage: vnrun [-h] [-t] -n <nproc> <cmd> [<cmd args>]
 
       -h          -- Generate this message
       -t          -- Spawn terminal windows running top on bracketing machines
       -n <nproc>  -- <nproc> = number of processors
       <cmd>       -- Command to run in parallel
       <cmd args>  -- Command arguments

Sample invocation

# Change to some directory visible from ALL nodes
vnfe1% cd

# Untar the examples tarball
vnfe1% tar zxf ~matt/examples.tar.gz

# Change to the cpi/PGI directory
vnfe1% cd examples
vnfe1% ls
cpi-mpi-intel/ cpi-mpi-pgi/ fpi-mpi-intel/ fpi-mpi-pgi/ Makefile
vnfe1% cd cpi-mpi-pgi

# Here's a handy alias for setting up various environment variables
# to expedite parallel computation with the PGI compilers
vnfe1% alias | grep poptp
poptp source ~matt/scripts/soPG-parallel

vnfe1% poptp
MPI_HOME=/usr/local/PGI
CC = /usr/local/PGI/bin/mpicc
CXX = /usr/local/PGI/bin/mpiCC
.
.
.
INCLUDE_PATHS = /usr/local/PGI/include
LDFLAGS = -L/usr/local/PGI/lib

# Build the application
vnfe1% make
/usr/local/PGI/bin/mpicc -I/usr/local/PGI/include -fast -B -c cpi.c
/usr/local/PGI/bin/mpicc -fast -B -fast -L/usr/local/PGI/lib cpi.o -o cpi
echo "Type 'run4' or 'run40' to run with 4 or 40 processors'"
Type 'run4' or 'run40' to run with 4 or 40 processors'

# Run the job in parallel using vnrun
# Least idle processors, according to ruptime, will be used
# For long jobs, the '-t' option is HIGHLY RECOMMENDED. This will
# automatically launch two addition terminal windows running top
# on the least and most busy machines in the machine file, which in turn
# will allow you to guard against accidental node overloading that
# can occur when more than one user goes after one or more of the
# same nodes at roughly the same time

vnfe1% vnrun -n 4 cpi

Will execute 'ssh vn10 cd /d/vnfe2/home/idle/examples/cpi-mpi-pgi; time mpirun -np 4 -machinefile mfile cpi '
Will use the following machine file
vn12
vn14
vn15
Process 0 on vn10.physics.ubc.ca: n_intervals=16384
Process 1 on vn12.physics.ubc.ca: n_intervals=-1
Process 2 on vn14.physics.ubc.ca: n_intervals=-1
Process 3 on vn15.physics.ubc.ca: n_intervals=-1
pi is approximately 3.1415926539002337, Error is 0.0000000003104406
wall clock time = 0.001800
0.189u 0.316s 0:01.38 35.5% 0+0k 0+0io 0pf+0w