#!/bin/sh -x
#
#
rm save.out

if [ $# != 1 ] ; then 
	echo "Usage: ./tes.sh [num]"
	exit;
fi

starttime=`date`
#------------------------------
# data dir
#------------------------------
datadir=../../../data/testMpi2Data
# datadir=../../mpi2data/my_soda

#------------------------------
# machine file
#------------------------------
mpirunoption="-machinefile /usr/local/mpi/util/machines/machines.local"
# mpirunoption="-machinefile /usr/local/mpi/util/machines/machines.local"
# mpirunoption='-machinefile /usr/local/mpich/util/machines/machines.local'
# mpirunoption='-machinefile /usr/local/mpich/util/machines/machines.ultra'

#------------------------------
# mpi2 option
#------------------------------
mpi2option=-dv
# mpi2option=-vs

#------------------------------
# data file basename
#------------------------------
file=4tri.mpi2
# file=room16.mpi2
# file=my_soda.mpi2
# file=head


datadir=../../../data/volumedata/3Dhead_pgm

# allscan 	noskip 
mpirun $mpirunoption -np $1 ./mpi2 $mpi2option -fspc $datadir/head.spc -fsys sysinfosamples/sysinfo.sample${1}.all.noskip -fview $datadir/head.view -fvinl $datadir/head.volin.list2 -fsaveppm save.out.all.noskip > log.all.noskip 2>&1

# allscan 	sobokuskip 
mpirun $mpirunoption -np $1 ./mpi2 $mpi2option -fspc $datadir/head.spc -fsys sysinfosamples/sysinfo.sample${1}.all.sobokuskip -fview $datadir/head.view -fvinl $datadir/head.volin.list2 -fsaveppm save.out.all.sobokuskip > log.all.sobokuskip 2>&1

# scanlinescan 	noskip 
mpirun $mpirunoption -np $1 ./mpi2 $mpi2option -fspc $datadir/head.spc -fsys sysinfosamples/sysinfo.sample${1}.scanline.noskip -fview $datadir/head.view -fvinl $datadir/head.volin.list2 -fsaveppm save.out.scanline.noskip > log.scanline.noskip 2>&1

# scanlinescan 	sobokuskip
mpirun $mpirunoption -np $1 ./mpi2 $mpi2option -fspc $datadir/head.spc -fsys sysinfosamples/sysinfo.sample${1}.scanline.noskip -fview $datadir/head.view -fvinl $datadir/head.volin.list2 -fsaveppm save.out.scanline.sobokuskip > log.scanline.sobokuskip 2>&1

echo "start time = $starttime"
echo "end   time = `date`"



