#! /bin/csh -v
#
# Run the mpptest -mbytes -cachesize 525000 -async -overlap tests to get 
# bandwidth communication performance
#
if ($#argv >= 1) then
    if (("$1" == "-help") || ("$1" == "--help")) then 
        echo "Run mpptest for round-trip messages from 0 to 4 MBytes."
	echo "myrunex <outfile_name> [-f confile]"
        exit
    endif
endif
#

if ($#argv < 1) then
	echo "Need a machine name for tagging the file"
	exit
endif


echo "Deleting the old data and command files."  
rm -i $1.mpichperf $1.gpl

../../bin/mpirun.ch_gm -np 2 $2 $3 $4 $5 $6 mpptest -mbytes -cachesize 525000 \
        -async -overlap -auto -gnuplot -fname $1.mpichperf

../../bin/mpirun.ch_gm -np 2 $2 $3 $4 $5 $6 mpptest -mbytes -cachesize 525000 \
        -size 1024 16384 128 \
        -async -overlap -gnuplot -fname $1.mpichperf

../../bin/mpirun.ch_gm -np 2 $2 $3 $4 $5 $6 mpptest -mbytes -cachesize 525000 \
        -size 16384 65536 1024 \
        -async -overlap -reps 30  -gnuplot -fname $1.mpichperf

../../bin/mpirun.ch_gm -np 2 $2 $3 $4 $5 $6 mpptest -mbytes -cachesize 525000 \
        -size 65536 1048576 16384 \
        -async -overlap -reps 20  -gnuplot -fname $1.mpichperf

../../bin/mpirun.ch_gm -np 2 $2 $3 $4 $5 $6  mpptest -mbytes -cachesize 2100000 \
        -size 1048576 4194304 524288 \
        -async -overlap -reps 20 -gnuplot -fname $1.mpichperf
