#!/bin/csh

# Run a script to do the submission.  This will run each of the benchmarks
# separately, and seems somewhat more stable than running them all at once
# (goodness knows why).

bench-fft -submit -submit-info-only

echo 
echo "You are done entering information now, and the benchmark is"
echo "being run.  This will take some time.  When it is done, you"
echo 'should mail the file "submit.txt" to'
echo "               benchfft@theory.lcs.mit.edu"
echo 'with "SUBMIT" in the email subject.  This is a plain ASCII'
echo 'file, so please do not encode it in any way.  Also, be sure'
echo 'that your mailer does not perform line-wrapping.'
echo

echo "Running 1D benchmark (powers of two)"
bench-fft -1d -p2 -name "submit"
echo "------------------------------------------------------" >> submit.txt
echo "@@@@ bench.1d.p2.dat" >> submit.txt
cat submit.p2.1d.dat >> submit.txt

echo "Running 1D benchmark (non-powers of two)"
bench-fft -1d -np2 -name "submit"
echo "------------------------------------------------------" >> submit.txt
echo "@@@@ bench.1d.np2.dat" >> submit.txt
cat submit.np2.1d.dat >> submit.txt

echo "Running 3D benchmark (powers of two)"
bench-fft -3d -p2 -name "submit"
echo "------------------------------------------------------" >> submit.txt
echo "@@@@ bench.3d.p2.dat" >> submit.txt
cat submit.p2.3d.dat >> submit.txt

echo "Running 3D benchmark (non-powers of two)"
bench-fft -3d -np2 -name "submit"
echo "------------------------------------------------------" >> submit.txt
echo "@@@@ bench.3d.np2.dat" >> submit.txt
cat submit.np2.3d.dat >> submit.txt

echo "Running 1D real-complex benchmark (powers of two)"
bench-fft -r1d -p2 -name "submit"
echo "------------------------------------------------------" >> submit.txt
echo "@@@@ bench.r1d.p2.dat" >> submit.txt
cat submit.p2.r1d.dat >> submit.txt

echo "Running 1D real-complex benchmark (non-powers of two)"
bench-fft -r1d -np2 -name "submit"
echo "------------------------------------------------------" >> submit.txt
echo "@@@@ bench.r1d.np2.dat" >> submit.txt
cat submit.np2.r1d.dat >> submit.txt

echo "Running 2D real-complex benchmark (powers of two)"
bench-fft -r2d -p2 -name "submit"
echo "------------------------------------------------------" >> submit.txt
echo "@@@@ bench.r2d.p2.dat" >> submit.txt
cat submit.p2.r2d.dat >> submit.txt

echo "Running 2D real-complex benchmark (non-powers of two)"
bench-fft -r2d -np2 -name "submit"
echo "------------------------------------------------------" >> submit.txt
echo "@@@@ bench.r2d.np2.dat" >> submit.txt
cat submit.np2.r2d.dat >> submit.txt


echo "@@@@ end" >> submit.txt
