#! /bin/sh
#
# Run some sample mpptest etc programs (for the paper "Characterizing
# the parallel performance of message-passing environments")
#
MPIRUN=mpirun
NPARG=-np
FNAME=mpp
SIZEARG="-size 0 2048 16"
# The escaped blanks are needed for many mpirun programs.
#
# Stair step example
$MPIRUN $NPARG 2 mpptest -auto $SIZEARG -title 'Blocking\ Send' \
	>${FNAME}-stair.cit
#
# Overlap example
$MPIRUN $NPARG 2 mpptest -auto $SIZEARG -overlap -overlapsize 2048 \
	-title 'Send\ with\ 2048\ overlap' >${FNAME}-overlap.cit
#
# Cache effects
$MPIRUN $NPARG 2 mpptest -auto $SIZEARG -cachesize 10000000 \
	-title 'Send\ not\ in\ cache' >${FNAME}-cache.cit
#
# Scaling of performance
$MPIRUN $NPARG 4 mpptest -auto $SIZEARG -bisect \
	-title 'Send\ with\ 4\ processes' >${FNAME}-scaling4.cit
$MPIRUN $NPARG 8 mpptest -auto $SIZEARG -bisect \
	-title 'Send\ with\ 8\ processes' >${FNAME}-scaling8.cit
#$MPIRUN $NPARG 16 mpptest -auto $SIZEARG -bisect \
#	-title 'Send\ with\ 16\ processes' >${FNAME}-scaling16.cit
#$MPIRUN $NPARG 32 mpptest -auto $SIZEARG -bisect \
#	-title 'Send\ with\ 32\ processes' >${FNAME}-scaling32.cit
#
# Variation of performance
$MPIRUN $NPARG 2 mpptest -auto $SIZEARG -givedy \
	-title 'Blocking\ send' >${FNAME}-variation.cit
#
# Nonblocking tests
$MPIRUN $NPARG 2 mpptest -auto $SIZEARG -async \
	-title 'Nonblocking\ send' >${FNAME}-isend.cit
