#! /bin/csh -v
#
# Run the mpptest -mbytes -cachesize 525000 tests to get 
# latency 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 \
        -auto -gnuplot -fname $1.mpichperf

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

../../bin/mpirun.ch_gm -np 2 $2 $3 $4 $5 $6 mpptest -mbytes -cachesize 525000 \
        -size 16384 65536 1024 \
        -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 \
        -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 \
        -reps 20 -gnuplot -fname $1.mpichperf



#./runmpptest -pair -blocking -givedy -gnuplot -fname newp2p
#
#set fname = "-gnuplot $fname"
#
#set GRAPH11 = "$fname"
#set GRAPH12 = "$fname"
#set GRAPH21 = "$fname"
#set GRAPH22 = "$fname"
#set MPPTEST = "$mpirun $MPIRUNOPT -np $NP mpptest"
#echo "Round trip tests-blocking"
#Round trip tests-blocking
#$MPPTEST $GRAPH11 $GIVEDY -size 1 100 1 -np 2 -tgoal 0.1
#$MPPTEST $GRAPH11 $GIVEDY -size 100 1032 10 -np 2 -tgoal 0.1
#$MPPTEST $GRAPH12 $GIVEDY -np 2 -tgoal 0.1 -auto -size 1024 16384 256 -autodx 128
#$MPPTEST $GRAPH21 $GIVEDY -np 2 -tgoal 0.5 -auto -size 16384 65536 1024 -autodx 512 -reps 100
#$MPPTEST $GRAPH22 $GIVEDY -np 2 -tgoal 1.0 -auto -size 65536 1048576 8192 -autodx 8192 -reps 25
#$MPPTEST $GRAPH22 $GIVEDY -np 2 -tgoal 1.0 -auto -size 1048576 4194304 524288 -autodx 8192 -reps 15
#
